@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@300;400;500;600&display=swap');
/* Garik Binary: терминал бинарных опционов на OTC-рынках. Плоский тёмный интерфейс, один акцент, только зелёный и красный по делу.
   Мобильная раскладка по умолчанию, два столбца от 720px, три от 1080px. */
.otc {
    --up: #22c37f; --dn: #f0505f;
    --bg: #0d1015; --panel: #141920; --panel2: #1a2028; --line: #232b36; --line2: #2d3744;
    --txt: #e8ecf2; --mut: #7d899a; --dim: #56616f;
    position: fixed; inset: 0; z-index: 3000;
    display: none; flex-direction: column;
    background: var(--bg); color: var(--txt);
    font-family: 'IBM Plex Sans', 'Inter', -apple-system, 'Segoe UI', sans-serif; font-weight: 400; font-variant-numeric: tabular-nums;
    padding-top: calc(env(safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px));
    -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none;
}
html[data-theme="light"] .otc { --up: #189d61; --dn: #ff7574; }
.otc.show { display: flex; }
.otc * { box-sizing: border-box; }
.otc button, .otc input { font-family: inherit; color: inherit; }
.otc [hidden] { display: none !important; }
.otc .num { font-variant-numeric: tabular-nums; }
.otc .up { color: var(--up); } .otc .dn { color: var(--dn); }

/* ── Шапка ─────────────────────────────────────────────── */
.gb-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px 8px; flex: 0 0 auto; }
.gb-icon { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--mut); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; transition: color 0.15s, border-color 0.15s; }
.gb-icon:hover { color: var(--txt); border-color: var(--line2); }
.gb-icon:active { transform: scale(0.95); }
.gb-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.gb-logo { width: 34px; height: 34px; flex: 0 0 auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.gb-brandtxt { min-width: 0; line-height: 1.1; }
.gb-word { display: block; font-size: 15px; letter-spacing: 0.16em; font-weight: 500; text-transform: uppercase; white-space: nowrap; }
.gb-word b { font-weight: 600; }
.gb-word span { font-weight: 400; color: var(--mut); margin-left: 0.5em; }
.gb-sub { display: block; margin-top: 3px; font-size: 11px; letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; font-weight: 500; }
.gb-session { text-align: right; line-height: 1.15; }
.gb-session .lbl { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.gb-session .val { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.gb-session .sub { display: block; font-size: 11px; color: var(--mut); font-weight: 500; margin-top: 1px; }

/* ── Полоса дуэли ───────────────────────────────────────── */
.gb-duel { flex: 0 0 auto; margin: 0 14px 8px; padding: 9px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.gb-duel-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.gb-duel-p.opp { text-align: right; }
.gb-duel-name { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.gb-duel-net { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.gb-duel-sub { font-size: 11px; color: var(--dim); }
.gb-timer { text-align: center; min-width: 72px; }
.gb-timer b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.gb-timer small { font-size: 11px; letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; font-weight: 500; }
.gb-timer.low b { color: var(--dn); animation: gbBlink 0.9s ease-in-out infinite; }
@keyframes gbBlink { 50% { opacity: 0.5; } }
.gb-tug { position: relative; height: 3px; border-radius: 2px; background: var(--line); margin-top: 8px; overflow: hidden; }
.gb-tug i { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; background: var(--up); transition: width 0.5s ease; }
.gb-tug::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--mut); }
.gb-opp { margin-top: 7px; display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; font-size: 11px; color: var(--dim); min-height: 18px; white-space: nowrap; }
.gb-opp::-webkit-scrollbar { display: none; }
.gb-opp .chip { flex: 0 0 auto; padding: 2px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line2); color: var(--txt); font-weight: 500; }

/* ── Раскладка ─────────────────────────────────────────── */
.gb-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 0 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
.glogo { width: 28px; height: 28px; flex: 0 0 auto; display: block; }
.tr { display: inline-block; width: 0; height: 0; margin-left: 3px; border-left: 3px solid transparent; border-right: 3px solid transparent; vertical-align: 1px; }
.tr.u { border-bottom: 5px solid var(--up); } .tr.d { border-top: 5px solid var(--dn); }

.gb-main { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.gb-chead { display: flex; align-items: center; gap: 10px; padding: 9px 12px 0; flex-wrap: wrap; }
.gb-now { display: flex; align-items: center; gap: 8px; min-width: 0; background: none; border: 1px solid transparent; border-radius: 10px; padding: 3px 8px 3px 3px; margin-left: -3px; cursor: pointer; text-align: left; transition: background 0.15s, border-color 0.15s; }
.gb-now:hover, .gb-now.open { background: var(--panel2); border-color: var(--line2); }
.gb-now .nmrow { display: inline-flex; align-items: center; gap: 5px; }
.gb-now .caret { color: var(--mut); transition: transform 0.2s; }
.gb-now.open .caret { transform: rotate(180deg); }
.gb-now .glogo { width: 26px; height: 26px; }
.gb-now .nm { font-size: 14px; font-weight: 500; line-height: 1.15; white-space: nowrap; }
.gb-now .nm small { display: none; font-size: 11px; color: var(--mut); font-weight: 500; }
.gb-price { margin-left: auto; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.gb-chg { font-size: 11px; font-weight: 500; color: var(--mut); }
.gb-tools { display: flex; gap: 6px; width: 100%; padding-bottom: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.gb-tools::-webkit-scrollbar { display: none; }
.gb-seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--bg); gap: 1px; flex: 0 0 auto; border: 1px solid var(--line); }
.gb-seg button { border: none; background: transparent; color: var(--mut); font-size: 11px; font-weight: 500; padding: 5px 8px; border-radius: 6px; cursor: pointer; min-width: 28px; }
.gb-seg button.on { background: var(--line2); color: var(--txt); }
.gb-seg button svg { display: block; margin: 0 auto; }
.gb-tools .grow { flex: 1; }
.gb-wrap { position: relative; flex: 1; min-height: 200px; }
.gb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.gb-toasts { position: absolute; left: 10px; right: 10px; top: 8px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; align-items: center; }
@keyframes gbIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gbOut { to { transform: translateY(-6px); opacity: 0; } }
.gb-msg { position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 6; padding: 6px 12px; border-radius: 8px; background: rgba(13,16,21,0.95); border: 1px solid var(--dn); color: var(--dn); font-size: 11px; font-weight: 500; white-space: nowrap; max-width: 94%; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gb-msg:empty { display: none; }

.gb-amenu { position: absolute; left: 8px; top: 50px; z-index: 30; width: min(380px, calc(100% - 16px)); max-height: calc(100% - 60px); overflow-y: auto; padding: 8px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 18px 44px rgba(0,0,0,0.5); scrollbar-width: thin; }
.gb-amenu-t { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 500; padding: 4px 6px 8px; }
.gb-arow { position: relative; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; }
.gb-arow:hover { background: var(--panel); }
.gb-arow.on { background: var(--panel); border-color: var(--line2); }
.gb-arow .at { flex: 1; min-width: 0; line-height: 1.25; }
.gb-arow .an { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; }
.gb-arow .as { display: block; font-size: 11px; color: var(--mut); font-weight: 500; }
.gb-arow .as b { color: var(--txt); font-weight: 500; }
.gb-arow .ap { font-size: 13px; font-weight: 500; text-align: right; }
.gb-arow .spark { width: 52px; height: 21px; }
.gb-arow .chg.up { color: var(--up); } .gb-arow .chg.dn { color: var(--dn); }
.gb-arow .adot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--txt); }

/* ── Панель сделки ─────────────────────────────────────── */
.gb-panel { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.gb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gb-field { position: relative; }
.gb-field label { display: flex; align-items: center; gap: 5px; margin: 0 0 4px 2px; font-size: 11px; color: var(--mut); font-weight: 500; }
.gb-field label i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--dim); color: var(--dim); font-style: normal; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.gb-input { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; cursor: pointer; text-align: left; transition: border-color 0.15s; }
.gb-input:hover, .gb-field.open .gb-input { border-color: var(--mut); }
.gb-input svg { color: var(--mut); flex: 0 0 auto; }
.gb-input input { flex: 1; min-width: 0; width: 100%; border: none; outline: none; background: transparent; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; padding: 0; user-select: text; -webkit-user-select: text; }
.gb-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 20; padding: 8px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 12px 30px rgba(0,0,0,0.45); min-width: 240px; }
.gb-field:last-child .gb-pop { left: auto; right: 0; }
.gb-pop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.gb-pop button { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 2px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--txt); }
.gb-pop button:hover:not(:disabled) { border-color: var(--mut); }
.gb-pop button.on { background: var(--txt); color: var(--bg); border-color: var(--txt); }
.gb-pop button:disabled { opacity: 0.3; cursor: not-allowed; }
.gb-pop-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 6px; }
.gb-pop-note { margin-top: 6px; font-size: 11px; color: var(--dim); text-align: center; }
.gb-yield { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px; font-size: 12px; color: var(--mut); font-weight: 500; }
.gb-yield b { font-size: 15px; font-weight: 500; color: var(--txt); letter-spacing: -0.01em; }
.gb-yield b.up { color: var(--up); }
.gb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gb-btn { border: none; border-radius: 10px; height: 54px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; transition: filter 0.15s, transform 0.1s; position: relative; overflow: hidden; }
.gb-btn.up { background: var(--up); } .gb-btn.dn { background: var(--dn); }
.otc .gb-btn.up, .otc .gb-btn.dn { color: #fff; }

.gb-btn:active:not(:disabled) { transform: scale(0.98); }
.gb-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.gb-btn.flash::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.35); animation: gbFlash 0.35s ease-out forwards; }
@keyframes gbFlash { to { opacity: 0; } }
.gb-keys { display: none; text-align: center; font-size: 11px; color: var(--dim); }
.gb-sec-t { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 500; display: flex; justify-content: space-between; margin-bottom: 5px; }
.gb-open { display: flex; flex-direction: column; gap: 6px; }
.gb-tcard { flex: 0 0 auto; min-width: 132px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line2); }
.gb-tcard.win { border-color: var(--up); } .gb-tcard.lose { border-color: var(--dn); }
.gb-ring { position: relative; width: 30px; height: 30px; flex: 0 0 auto; }
.gb-ring svg { width: 30px; height: 30px; transform: rotate(-90deg); }
.gb-ring circle { fill: none; stroke-width: 3; }
.gb-ring .bg { stroke: var(--line2); } .gb-ring .fg { stroke: var(--txt); stroke-linecap: round; }
.gb-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; }
.gb-tinfo { min-width: 0; line-height: 1.25; }
.gb-tinfo .l1 { font-size: 11px; font-weight: 500; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.gb-tinfo .l2 { font-size: 11px; color: var(--mut); white-space: nowrap; }
.gb-empty { font-size: 11px; color: var(--dim); padding: 4px 2px; }
.gb-hist { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.gb-hrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 11px; font-weight: 500; }
.gb-hrow .h1 { display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-hrow .h2 { font-size: 11px; color: var(--mut); font-weight: 500; }
.gb-hrow b { font-size: 13px; font-weight: 500; }
.gb-hrow b.flat { color: var(--mut); }

/* ── Справка и окна ────────────────────────────────────── */
.gb-sheet { position: absolute; inset: 0; z-index: 40; background: rgba(6,8,11,0.82); display: flex; align-items: center; justify-content: center; padding: 18px; }
.gb-card { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; padding: 20px 18px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line2); }
.gb-card h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.gb-card .lead { margin: 0 0 12px; font-size: 12px; color: var(--mut); line-height: 1.5; }
.gb-steps { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.gb-step { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: #cfd6e0; }
.gb-step i { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line2); color: var(--mut); font-style: normal; font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
.gb-step b { color: var(--txt); }
.gb-example { padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; line-height: 1.5; color: #b9c2ce; margin-bottom: 10px; }
.gb-example b.up { color: var(--up); } .gb-example b.dn { color: var(--dn); }
.otc .gb-cta { width: 100%; color: var(--bg); border: none; border-radius: 10px; padding: 12px; font-size: 13px; font-weight: 500; background: var(--txt); color: var(--bg); cursor: pointer; letter-spacing: 0.04em; }

/* ── Итоги дуэли ───────────────────────────────────────── */
.otcr { width: 100%; max-width: 560px; margin: 0 auto; text-align: left; }
.otcr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.otcr-col { padding: 12px 12px 10px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); min-width: 0; text-align: center; }
.otcr-col.win { border-color: var(--green); }
.otcr-col.loss { border-color: rgba(255,62,62,0.45); }
.otcr-name { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #8a94a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.otcr-net { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; margin: 4px 0 2px; }
.otcr-net.up { color: var(--green); } .otcr-net.down { color: var(--red); } .otcr-net.flat { color: #9aa4b2; }
.otcr-stats { font-size: 10.5px; line-height: 1.6; color: #9aa4b2; font-weight: 500; }
.otcr-chip { display: inline-block; margin-top: 7px; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.1em; }
.otcr-chip.win { background: rgba(0,255,163,0.14); color: var(--green); } .otcr-chip.loss { background: rgba(255,62,62,0.14); color: var(--red); }
.otcr-why { margin-top: 10px; padding: 11px 13px; border-radius: 10px; background: rgba(255,255,255,0.05); font-size: 13px; line-height: 1.45; color: #e3e9f0; }
.otcr-list-title { margin: 14px 2px 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #7d8794; }
.otcr-list { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; }
.otcr .gb-hrow { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: #e8ecf2; }
.otcr .gb-hrow b.up { color: var(--green); } .otcr .gb-hrow b.dn { color: var(--red); }
.otcr .gb-hrow .h2 { color: #9aa4b2; }
.otcr .up { color: var(--green); } .otcr .dn { color: var(--red); }

/* ── Планшет / ПК ──────────────────────────────────────── */
@media (min-width: 720px) {
    .gb-top { padding: 14px 22px 10px; }
    .gb-duel { margin: 0 22px 10px; }
    .gb-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-rows: minmax(0, 1fr); gap: 14px; padding: 0 22px 22px; }
    .gb-main { grid-column: 1; grid-row: 1; }
    .gb-panel { grid-column: 2; grid-row: 1; overflow-y: auto; min-height: 0; gap: 12px; padding-right: 2px; }
    .gb-fields { grid-template-columns: 1fr; }
    .gb-actions { grid-template-columns: 1fr; }
    .gb-btn { height: 58px; font-size: 15px; }
    .gb-input, .gb-input input { font-size: 18px; }
    .gb-input { height: 48px; }
    .gb-tcard { min-width: 0; }
    .gb-now .nm small { display: block; }
    .gb-price { font-size: 26px; }
    .gb-wrap { min-height: 320px; }
    .gb-msg { bottom: 34px; }
    .gb-pop { left: 0; right: 0; min-width: 0; top: calc(100% + 6px); bottom: auto; }
    .gb-amenu { top: 56px; }
    .gb-field:last-child .gb-pop { left: 0; right: 0; }
    .gb-duel-net { font-size: 24px; }
    .gb-timer b { font-size: 28px; }
}
@media (min-width: 1080px) {
    .gb-body { grid-template-columns: minmax(0, 1fr) 350px; }
    .gb-keys { display: block; }
    .gb-duel { max-width: 780px; margin-left: auto; margin-right: auto; width: calc(100% - 44px); }
}
@media (max-height: 640px) and (max-width: 719px) {
    .gb-top { padding: 6px 12px; }
    .gb-wrap { min-height: 110px; }
    .gb-btn { height: 44px; }
    .gb-input { height: 38px; }
}

/* ── Выбор режима симуляции: неоновые карточки ─────────────────────────────────── */
.simpick {
    --panel: #070b1d; --up: #19e68c; --dn: #ff4d6d;
    position: fixed; inset: 0; z-index: 9990; display: flex; align-items: flex-start; justify-content: center;
    padding: 22px 16px 30px; overflow-y: auto; font-family: 'Inter', -apple-system, sans-serif; color: #eef2fb;
    background:
        radial-gradient(60% 40% at 15% 0%, rgba(58, 96, 255, 0.34), transparent 65%),
        radial-gradient(55% 45% at 100% 100%, rgba(120, 70, 255, 0.28), transparent 65%),
        radial-gradient(50% 40% at 0% 100%, rgba(0, 200, 255, 0.22), transparent 65%),
        #03050d;
    animation: spkIn 0.3s ease;
}
html[data-theme="light"] .simpick { filter: saturate(0.87) contrast(1.075) hue-rotate(180deg) invert(1); }
@keyframes spkIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spkRise { from { opacity: 0; transform: translateY(22px) scale(0.97); } to { opacity: 1; transform: none; } }
.spk-wrap { width: 100%; max-width: 1040px; margin: auto; }
.spk-head { text-align: center; margin: 4px 0 20px; animation: spkRise 0.45s ease both; }
.spk-head h2 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: #fff; text-shadow: 0 0 30px rgba(90, 130, 255, 0.5); }
.spk-head p { margin: 0; font-size: 14px; color: rgba(200, 214, 245, 0.62); }
.spk-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.spk-card {
    --c1: #22e6ff; --c2: #1aa9ff; --glow: rgba(34, 230, 255, 0.4);
    position: relative; overflow: hidden; isolation: isolate; text-align: left; cursor: pointer; color: inherit; font-family: inherit;
    padding: 16px 16px 18px; border-radius: 26px; border: 1.5px solid var(--c1);
    background: radial-gradient(90% 60% at 100% 100%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 70%), linear-gradient(160deg, #071328 0%, #050a17 60%, #060a18 100%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c1) 18%, transparent), 0 0 34px -6px var(--glow), inset 0 0 40px -18px var(--glow);
    transition: transform 0.28s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s ease, border-color 0.3s;
    animation: spkRise 0.5s cubic-bezier(.2,.8,.2,1) both;
}
.spk-card.bn { --c1: #6f5cff; --c2: #7b4dff; --glow: rgba(120, 92, 255, 0.5); background: radial-gradient(90% 60% at 100% 100%, rgba(110, 70, 255, 0.34), transparent 70%), linear-gradient(160deg, #0b0f30 0%, #070a20 60%, #0a0a26 100%); animation-delay: 0.1s; }
.spk-card::before { content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; z-index: 0; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.10), transparent); transform: skewX(-18deg); opacity: 0; pointer-events: none; }
.spk-card:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c1) 35%, transparent), 0 0 60px -4px var(--glow), 0 30px 60px -20px rgba(0,0,0,0.8), inset 0 0 50px -14px var(--glow); }
.spk-card:hover::before { opacity: 1; animation: spkShine 1s ease; }
.spk-card:active { transform: scale(0.985); }
@keyframes spkShine { from { left: -70%; } to { left: 130%; } }
.spk-card > * { position: relative; z-index: 1; }
.spk-deco { position: absolute !important; right: 0; bottom: 0; width: 62%; height: 46%; z-index: 0 !important; pointer-events: none; opacity: 0.85; animation: spkFloat 6s ease-in-out infinite; }
.spk-deco.cl { color: #22b8ff; } .spk-deco.bn { color: #8a5cff; }
@keyframes spkFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.spk-art { position: relative; aspect-ratio: 360 / 170; border-radius: 20px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--c1) 40%, transparent); box-shadow: inset 0 0 30px -10px var(--glow); margin-bottom: 18px; }
.spk-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.spk-cd { transform-box: fill-box; transform-origin: 50% 100%; animation: spkGrow 0.55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes spkGrow { from { transform: scaleY(0.05); opacity: 0; } to { transform: none; opacity: 1; } }
.spk-cd:last-child { animation: spkGrow 0.55s cubic-bezier(.2,.8,.2,1) 1.4s both, spkBlink 1.6s ease-in-out 2.2s infinite; }
@keyframes spkBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.spk-dash { animation: spkFlow 1.4s linear infinite; }
@keyframes spkFlow { to { stroke-dashoffset: -22; } }
.spk-tgt { animation: spkPulseS 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spkPulseS { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.spk-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: spkDraw 2.2s ease 0.3s forwards; }
.spk-fill { opacity: 0; animation: spkFade 1.2s ease 1.6s forwards; }
@keyframes spkDraw { to { stroke-dashoffset: 0; } }
@keyframes spkFade { to { opacity: 1; } }
.spk-halo { transform-box: fill-box; transform-origin: center; animation: spkHalo 2s ease-out 2.4s infinite; opacity: 0; }
@keyframes spkHalo { 0% { transform: scale(0.5); opacity: 0.7; } 100% { transform: scale(2.4); opacity: 0; } }
.spk-mark { transform-box: fill-box; transform-origin: center; animation: spkPop 0.5s cubic-bezier(.3,1.6,.5,1) 1.1s both, spkBeat 2.4s ease-in-out 1.8s infinite; }
@keyframes spkPop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes spkBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

.spk-pair { position: absolute; left: 3%; top: 6%; display: flex; align-items: center; gap: 8px; padding: 3px 14px 3px 4px; border-radius: 999px; background: rgba(6, 18, 36, 0.85); border: 1px solid rgba(120, 180, 255, 0.28); }
.spk-flags { display: inline-flex; } .spk-flags .glogo { width: 28px; height: 28px; }
.spk-pair b { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.spk-tf { position: absolute; left: 3%; top: 30%; display: flex; flex-direction: column; gap: 5px; }
.spk-tf span { min-width: 34px; text-align: center; padding: 5px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #9fb4d8; background: rgba(20, 34, 62, 0.85); border: 1px solid rgba(120, 160, 230, 0.16); }
.spk-tf span.on { color: #04222b; background: linear-gradient(135deg, #22e6ff, #1ac6ff); border-color: transparent; box-shadow: 0 0 16px rgba(34, 230, 255, 0.6); animation: spkTf 3s ease-in-out infinite; }
@keyframes spkTf { 0%, 100% { box-shadow: 0 0 12px rgba(34, 230, 255, 0.45); } 50% { box-shadow: 0 0 22px rgba(34, 230, 255, 0.85); } }
.spk-lvl { position: absolute; right: 2.5%; transform: translateY(-50%); padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; background: rgba(4, 12, 26, 0.9); border: 1.5px solid; }
.spk-lvl.tp { color: #19e68c; border-color: #19e68c; box-shadow: 0 0 14px rgba(25, 230, 140, 0.4); }
.spk-lvl.mid { color: #ffd23f; border-color: #ffd23f; box-shadow: 0 0 14px rgba(255, 210, 63, 0.35); }
.spk-lvl.sl { color: #ff4d6d; border-color: #ff4d6d; box-shadow: 0 0 14px rgba(255, 77, 109, 0.4); }

.spk-logos { position: absolute; left: 3.5%; top: 7%; display: flex; align-items: center; }
.spk-logos .glogo { width: 30px; height: 30px; margin-right: -9px; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.55)); }
.spk-logos b { margin-left: 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: rgba(225, 232, 255, 0.85); }
.spk-timer { position: absolute; right: 3%; top: 7%; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 12px; background: rgba(8, 10, 26, 0.85); border: 1.5px solid #ffd23f; color: #fff; box-shadow: 0 0 14px rgba(255, 210, 63, 0.28); }
.spk-timer svg { color: #fff; } .spk-timer b { font-size: 14px; font-weight: 800; }
.spk-win { position: absolute; left: 57%; top: 26%; padding: 4px 13px; border-radius: 10px; background: rgba(6, 22, 26, 0.9); border: 1.5px solid #19e68c; box-shadow: 0 0 18px rgba(25, 230, 140, 0.45); animation: spkBob 3s ease-in-out infinite; }
.spk-win span { font-size: 15px; font-weight: 800; color: #3dffaa; text-shadow: 0 0 12px rgba(25, 230, 140, 0.8); font-variant-numeric: tabular-nums; }
@keyframes spkBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.spk-new { position: absolute; left: 3.5%; bottom: 8%; padding: 6px 15px; border-radius: 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: #fff; background: linear-gradient(135deg, rgba(90, 100, 255, 0.55), rgba(140, 80, 255, 0.5)); border: 1.5px solid rgba(150, 130, 255, 0.75); box-shadow: 0 0 20px rgba(120, 92, 255, 0.5); }

.spk-title { display: flex; align-items: center; gap: 12px; font-size: 32px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; color: #f4f7ff; text-shadow: 0 2px 18px rgba(120, 150, 255, 0.35); }
.spk-title em { -webkit-text-fill-color: #b9b3ff; font-style: normal; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; padding: 4px 13px; border-radius: 999px; border: 1.5px solid rgba(140, 120, 255, 0.7); background: rgba(90, 70, 220, 0.18); }
.spk-sub { font-size: 16px; font-weight: 600; margin: 6px 0 16px; color: #22d6ff; }
.spk-card.bn .spk-sub { color: #8fa8ff; }
.spk-card ul { margin: 0 0 20px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.spk-card li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(230, 238, 255, 0.92); line-height: 1.3; }
.spk-card li i { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #22e6ff; border: 1.5px solid #22e6ff; box-shadow: 0 0 10px rgba(34, 230, 255, 0.28); }
.spk-card.bn li i { color: #b9b3ff; border-color: #7b6bff; background: rgba(110, 90, 255, 0.28); box-shadow: 0 0 10px rgba(120, 92, 255, 0.35); }
.spk-go { display: inline-flex; align-items: center; gap: 14px; height: 52px; padding: 0 30px; border-radius: 999px; font-size: 16px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #032331; background: linear-gradient(135deg, #37f0ff, #16bfff); box-shadow: 0 8px 26px -6px rgba(34, 230, 255, 0.7), inset 0 1px 0 rgba(255,255,255,0.5); transition: transform 0.2s, box-shadow 0.25s; }
.spk-card.bn .spk-go { color: #fff; background: linear-gradient(135deg, #6a4dff, #8a5cff); box-shadow: 0 8px 26px -6px rgba(120, 92, 255, 0.8), inset 0 1px 0 rgba(255,255,255,0.35); }
.spk-go svg { transition: transform 0.25s; }
.spk-card:hover .spk-go { transform: translateY(-1px); box-shadow: 0 12px 34px -6px var(--glow), inset 0 1px 0 rgba(255,255,255,0.5); }
.spk-card:hover .spk-go svg { transform: translateX(5px); }
.spk-cancel { display: block; margin: 20px auto 0; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); color: rgba(230, 238, 255, 0.85); font-size: 13px; font-weight: 600; padding: 10px 22px; border-radius: 999px; cursor: pointer; font-family: inherit; transition: background 0.2s, color 0.2s; }
.spk-cancel:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
@media (min-width: 760px) { .spk-grid { grid-template-columns: 1fr 1fr; gap: 22px; } .spk-head h2 { font-size: 36px; } .simpick { align-items: center; } }
@media (max-width: 420px) { .spk-title { font-size: 26px; } .spk-sub { font-size: 14px; } .spk-card li { font-size: 13px; } .spk-lvl { font-size: 9.5px; padding: 3px 8px; } .spk-pair b { font-size: 12px; } .spk-timer b { font-size: 12px; } .spk-win span { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .spk-card, .spk-cd, .spk-line, .spk-dash, .spk-deco, .spk-win, .spk-mark, .spk-halo { animation: none !important; } .spk-line { stroke-dashoffset: 0; } .spk-fill { opacity: 1; } }

.gb-live { position: absolute; right: 70px; bottom: 30px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(20,25,32,0.92); color: var(--txt); font-size: 11px; font-weight: 500; cursor: pointer; animation: gbIn 0.2s ease; }
.gb-live:hover { border-color: var(--mut); }

/* ── Вкладка сделок ───────────────────────────────────── */
.gb-tabbtn { position: relative; margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--mut); font-size: 11px; font-weight: 500; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.gb-tabbtn:hover { color: var(--txt); border-color: var(--line2); }
.gb-tabbtn.on { color: var(--txt); background: var(--line2); border-color: var(--line2); }
.gb-badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--txt); color: var(--bg); font-size: 10px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
.gb-trades { position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; max-height: 62%; display: flex; flex-direction: column; background: var(--panel2); border-top: 1px solid var(--line2); border-radius: 14px 14px 0 0; box-shadow: 0 -14px 34px rgba(0,0,0,0.4); animation: gbSlide 0.22s ease; }
@keyframes gbSlide { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.gb-trades-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px; flex: 0 0 auto; }
.gb-cnt { margin-left: 6px; color: var(--txt); font-weight: 500; }
.gb-trades-body { padding: 0 12px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.gb-trades .gb-tcard { min-width: 0; width: 100%; background: var(--panel); }
.gb-tcard .gb-tinfo { flex: 1; }
.gb-tpnl { font-size: 14px; font-weight: 500; flex: 0 0 auto; }
.gb-tpnl.up { color: var(--up); } .gb-tpnl.dn { color: var(--dn); }
.gb-trades .gb-hrow { background: var(--panel); }

.gb-tools { overflow: visible; }
.gb-tscroll { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.gb-tscroll::-webkit-scrollbar { display: none; }
.gb-tabbtn { margin-left: 0; }

/* ── Инструменты рисования ───────────────────────────── */
.gb-toolp { position: absolute; z-index: 40; top: 46px; right: 8px; width: min(430px, calc(100% - 16px)); max-height: calc(100% - 56px); overflow-y: auto; padding: 14px 14px 10px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 18px 44px rgba(0,0,0,0.5); animation: gbIn 0.18s ease; }
.gb-toolp-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.gb-toolp-h b { font-size: 15px; font-weight: 500; }
.gb-toolp-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, auto); grid-template-columns: 1fr 1fr; column-gap: 18px; }
.gb-toolp-i { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border: none; border-bottom: 1px solid var(--line); background: none; color: var(--txt); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.gb-toolp-i svg { color: var(--mut); flex: 0 0 auto; transition: color 0.15s; }
.gb-toolp-i:hover svg, .gb-toolp-i:hover { color: #fff; }
.gb-toolp-f { display: flex; gap: 8px; margin-top: 10px; }
.gb-toolp-f button { flex: 1; padding: 9px 6px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--mut); font-size: 12px; font-weight: 500; cursor: pointer; }
.gb-toolp-f button:hover { color: var(--txt); border-color: var(--mut); }
.gb-dbar { position: absolute; left: 8px; top: 8px; z-index: 8; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 100px); padding: 5px 6px 5px 10px; border-radius: 10px; background: rgba(20,25,32,0.94); border: 1px solid var(--line2); font-size: 11px; font-weight: 500; }
.gb-dbar span { color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-dbar button { border: none; border-radius: 6px; padding: 4px 9px; font-size: 11px; font-weight: 500; cursor: pointer; background: var(--line2); color: var(--txt); flex: 0 0 auto; }
.gb-dbar button[data-act="ddel"] { background: var(--dn); color: #fff; }
.gb-dbar button[data-act="dfinish"] { background: var(--up); color: #fff; }

.gb-banner { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 14px 8px; padding: 8px 10px 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); font-size: 12px; font-weight: 500; }
.gb-banner span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-banner button { flex: 0 0 auto; border: 1px solid var(--line2); background: var(--panel2); color: var(--mut); border-radius: 8px; padding: 5px 10px; font-size: 11px; font-weight: 500; cursor: pointer; }
.gb-banner button:hover { color: var(--txt); }
@media (min-width: 720px) { .gb-banner { margin: 0 22px 10px; } }

/* ── Заголовок актива прямо на графике, без фона ─────────── */
.gb-tools { padding: 8px 10px 4px; }
.gb-float { position: absolute; left: 6px; top: 4px; z-index: 7; pointer-events: none; max-width: calc(100% - 80px); }
.gb-float .gb-now { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; margin: 0; border-radius: 12px; border: none; background: none; text-align: left; cursor: pointer; }
.gb-float .gb-now:hover, .gb-float .gb-now.open { background: rgba(127,140,160,0.12); border: none; }
.gb-float .gb-now .lg { display: block; flex: 0 0 auto; }
.gb-float .gb-now .glogo { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35)); }
.gb-float .nm { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.15; }
.gb-float .nmrow { display: flex; align-items: center; gap: 7px; }
.gb-float .nmrow b { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
.gb-otc { font-style: normal; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line2); color: var(--mut); background: rgba(127,140,160,0.10); }
.gb-float .pay { font-style: normal; font-size: 15px; font-weight: 600; color: var(--txt); }
.gb-float .caret { color: var(--mut); }
.gb-float .nmsub { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.gb-float .gb-price { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.gb-float .gb-chg { font-size: 11px; }
.gb-clock { color: var(--dim); font-size: 11px; font-weight: 500; }
.gb-amenu { top: 52px; }
.gb-toasts { top: 58px; }
.gb-dbar { top: 60px; }
@media (max-width: 420px) { .gb-clock { display: none; } .gb-float .nmrow b { font-size: 16px; } }

/* ── Кнопки инструментов и сделок в правой панели ────────── */
.gb-rail { display: flex; gap: 8px; }
.gb-railbtn { position: relative; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--mut); font-size: 12px; font-weight: 500; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.gb-railbtn:hover { color: var(--txt); border-color: var(--line2); }
.gb-railbtn.on { color: var(--txt); background: var(--line2); border-color: var(--line2); }
.gb-toolsbtn { width: 44px; flex: 0 0 44px; margin: 0; padding: 0; }
.gb-tradesbtn { flex: 1; margin: 0; padding: 0 12px; }
@media (min-width: 720px) { .gb-railbtn { height: 44px; } .gb-toolsbtn { width: 52px; flex-basis: 52px; } .gb-amenu { top: 58px; } }
@media (max-height: 640px) and (max-width: 719px) { .gb-railbtn { height: 34px; } }

/* ── Стеклянная кнопка: зелёное свечение сверху, красное снизу, при наведении сияет сильнее ── */
.gb-glass { position: relative; isolation: isolate; border: 1px solid transparent; background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--txt); overflow: hidden; box-shadow: inset 0 10px 14px -14px color-mix(in srgb, var(--up) 45%, transparent), inset 0 -10px 14px -14px color-mix(in srgb, var(--dn) 45%, transparent); transition: box-shadow 0.25s ease, transform 0.15s ease, color 0.2s; }
.gb-glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(165deg, var(--up), rgba(255,255,255,0.10) 42%, rgba(255,255,255,0.10) 58%, var(--dn)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask-composite: exclude; opacity: 0.7; transition: opacity 0.25s ease; pointer-events: none; z-index: 1; }
.gb-glass::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; background: radial-gradient(85% 75% at 50% -10%, color-mix(in srgb, var(--up) 26%, transparent), transparent 70%), radial-gradient(85% 75% at 50% 110%, color-mix(in srgb, var(--dn) 26%, transparent), transparent 70%); opacity: 0.5; transition: opacity 0.25s ease; pointer-events: none; }
.gb-glass:hover, .gb-glass.on { background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)); color: var(--txt); border-color: transparent; box-shadow: inset 0 14px 18px -14px color-mix(in srgb, var(--up) 70%, transparent), inset 0 -14px 18px -14px color-mix(in srgb, var(--dn) 70%, transparent); }
.gb-glass:hover::before, .gb-glass.on::before { opacity: 1; }
.gb-glass:hover::after, .gb-glass.on::after { opacity: 1; }
.gb-glass:active { transform: scale(0.97); }
.gb-glass svg { position: relative; z-index: 2; }
.gb-glass > span, .gb-glass > b { position: relative; z-index: 2; }

/* ── Светлая тема: настоящая палитра вместо серой каши ─────────────────────────────
   Страница в светлой теме получается инверсией (filter на body), поэтому здесь значения "до инверсии":
   на экране они превращаются в фон #d9e0ea, карточки #f5f6f8, чёткие рамки и тёмный текст. */
html[data-theme="light"] .otc {
    --up: #22a975; --dn: #ff879c;
    --bg: #131923; --panel: #000002; --panel2: #060a0f; --line: #252e3c; --line2: #3c4859;
    --txt: #e8effb; --mut: #9ca8bb; --dim: #717d92;
}
html[data-theme="light"] .otc .gb-main,
html[data-theme="light"] .otc .gb-input,
html[data-theme="light"] .otc .gb-icon,
html[data-theme="light"] .otc .gb-railbtn,
html[data-theme="light"] .otc .gb-duel,
html[data-theme="light"] .otc .gb-seg { box-shadow: 0 1px 2px rgba(255,255,255,0.28), 0 8px 20px -14px rgba(255,255,255,0.55); }
html[data-theme="light"] .otc .gb-trades,
html[data-theme="light"] .otc .gb-toolp,
html[data-theme="light"] .otc .gb-amenu,
html[data-theme="light"] .otc .gb-pop { box-shadow: 0 18px 44px rgba(255,255,255,0.4), 0 2px 6px rgba(255,255,255,0.3); }
html[data-theme="light"] .otc .gb-seg { background: var(--panel2); }
html[data-theme="light"] .otc .gb-glass { background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.0)), var(--panel); }
html[data-theme="light"] .otc .gb-glass::after { opacity: 0.35; }
html[data-theme="light"] .otc .gb-glass:hover, html[data-theme="light"] .otc .gb-glass.on { background: var(--panel); }
html[data-theme="light"] .otc .gb-glass:hover::after, html[data-theme="light"] .otc .gb-glass.on::after { opacity: 0.8; }

/* ── Всплывающие уведомления: строка со значком слева и крестиком справа ── */
.gb-toasts { pointer-events: none; }
.gb-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; max-width: min(96%, 420px); padding: 7px 8px 7px 8px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05)); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); border: 1px solid rgba(255,255,255,0.20); text-align: left; animation: gbIn 0.22s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.04), 0 12px 30px -14px rgba(0,0,0,0.75); }
.gb-toast .ti { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.07); color: var(--mut); }
.gb-toast.win .ti, .gb-toast.long .ti { color: var(--up); border-color: color-mix(in srgb, var(--up) 55%, transparent); background: color-mix(in srgb, var(--up) 14%, rgba(255,255,255,0.05)); }
.gb-toast.loss .ti, .gb-toast.short .ti { color: var(--dn); border-color: color-mix(in srgb, var(--dn) 55%, transparent); background: color-mix(in srgb, var(--dn) 14%, rgba(255,255,255,0.05)); }
.gb-toast .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.gb-toast .tm { font-size: 13px; font-weight: 500; color: var(--txt); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gb-toast.win .tm { color: var(--up); } .gb-toast.loss .tm { color: var(--dn); }
.gb-toast .ts { font-size: 11px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-toast .tc { flex: 0 0 auto; width: 26px; height: 26px; border: none; background: none; color: var(--dim); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.gb-toast .tc:hover { color: var(--txt); background: var(--line); }
.gb-toast.out { animation: gbOut 0.25s ease forwards; }
html[data-theme="light"] .otc .gb-toast { box-shadow: 0 10px 26px -12px rgba(255,255,255,0.9); }

/* ── Кнопки Вверх / Вниз: при наведении блик пробегает по кнопке, свечение растёт изнутри, стрелка «прыгает» ── */
.gb-btn { isolation: isolate; transition: filter 0.2s, transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease; }
.gb-btn > * { position: relative; z-index: 2; }
.gb-btn::before { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; z-index: 1; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.38), transparent); transform: skewX(-18deg) translateX(0); opacity: 0; pointer-events: none; }
.gb-btn.up { box-shadow: inset 0 -16px 22px -16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.28); }
.gb-btn.dn { box-shadow: inset 0 -16px 22px -16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.28); }
.gb-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06) saturate(1.1); }
.gb-btn.up:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 0 26px rgba(255,255,255,0.20), 0 10px 26px -8px color-mix(in srgb, var(--up) 75%, transparent); }
.gb-btn.dn:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 0 26px rgba(255,255,255,0.20), 0 10px 26px -8px color-mix(in srgb, var(--dn) 75%, transparent); }
.gb-btn:hover:not(:disabled)::before { opacity: 1; animation: gbShine 0.85s ease; }
.gb-btn svg { transition: transform 0.25s cubic-bezier(.2,.8,.2,1); }
.gb-btn.up:hover:not(:disabled) svg { transform: translateY(-3px) scale(1.12); }
.gb-btn.dn:hover:not(:disabled) svg { transform: translateY(3px) scale(1.12); }
.gb-btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
@keyframes gbShine { from { left: -60%; } to { left: 130%; } }
@media (hover: none) { .gb-btn:hover:not(:disabled) { transform: none; } }

/* ── Светлая тема: те же эффекты, но белое до инверсии становится чёрным, поэтому блики задаются наоборот ── */
html[data-theme="light"] .otc .gb-btn.up, html[data-theme="light"] .otc .gb-btn.dn { box-shadow: inset 0 -16px 22px -16px rgba(255,255,255,0.28), inset 0 1px 0 rgba(0,0,0,0.30); }
html[data-theme="light"] .otc .gb-btn::before { background: linear-gradient(100deg, transparent, rgba(0,0,0,0.42), transparent); }
html[data-theme="light"] .otc .gb-btn:hover:not(:disabled) { filter: brightness(0.94) saturate(1.05); }
html[data-theme="light"] .otc .gb-btn.up:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(0,0,0,0.40), inset 0 0 26px rgba(0,0,0,0.22), 0 10px 24px -8px color-mix(in srgb, var(--up) 70%, transparent); }
html[data-theme="light"] .otc .gb-btn.dn:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(0,0,0,0.40), inset 0 0 26px rgba(0,0,0,0.22), 0 10px 24px -8px color-mix(in srgb, var(--dn) 70%, transparent); }

/* Масштаб элементов на картинке зависит от её ширины, чтобы ничего не обрезалось на телефоне и на ПК */
.spk-art { container-type: inline-size; }
.spk-pair { gap: 2.2cqw; padding: 0.8cqw 3.6cqw 0.8cqw 1cqw; }
.spk-flags .glogo { width: clamp(20px, 7.6cqw, 30px); height: clamp(20px, 7.6cqw, 30px); }
.spk-pair b { font-size: clamp(11px, 3.9cqw, 15px); }
.spk-tf { top: 27%; gap: 1cqw; }
.spk-tf span { min-width: 0; width: 9.2cqw; padding: 0.9cqw 0; font-size: clamp(8px, 2.7cqw, 11px); border-radius: 2cqw; }
.spk-lvl { padding: 0.9cqw 2.8cqw; font-size: clamp(8.5px, 3cqw, 12px); }
.spk-logos .glogo { width: clamp(22px, 8.2cqw, 32px); height: clamp(22px, 8.2cqw, 32px); margin-right: -2.4cqw; }
.spk-logos b { margin-left: 5cqw; font-size: clamp(9px, 3.2cqw, 12.5px); }
.spk-timer { padding: 1.3cqw 3cqw; gap: 1.6cqw; }
.spk-timer svg { width: clamp(11px, 4cqw, 15px); height: clamp(11px, 4cqw, 15px); }
.spk-timer b { font-size: clamp(11px, 3.8cqw, 15px); }
.spk-win { padding: 1cqw 3.4cqw; }
.spk-win span { font-size: clamp(11px, 4cqw, 16px); }
.spk-new { padding: 1.6cqw 4cqw; font-size: clamp(9px, 3.2cqw, 12.5px); }

/* ── Наведение на карточку: неоновая рамка-аврора бежит по контуру, свет следует за курсором, карточка слегка наклоняется ── */
@property --spk-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.spk-card { --mx: 50%; --my: 30%; --tx: 0; --ty: 0; }
.spk-card::before { left: 0; width: auto; right: 0; transform: none; animation: none !important; opacity: 0; transition: opacity 0.35s ease; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c1) 26%, transparent), transparent 60%); }
.spk-card:hover::before { opacity: 1; animation: none; }
.spk-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2.5px; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.35s ease; filter: drop-shadow(0 0 7px var(--c1));
    background: conic-gradient(from var(--spk-ang), transparent 0deg, transparent 120deg, var(--c2) 200deg, var(--c1) 265deg, #fff 300deg, var(--c1) 330deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask-composite: exclude; }
.spk-card:hover::after { opacity: 1; animation: spkSpin 2.6s linear infinite; }
@keyframes spkSpin { to { --spk-ang: 360deg; } }
.spk-card:hover { transform: perspective(1000px) rotateX(calc(var(--ty) * -5deg)) rotateY(calc(var(--tx) * 6deg)) translateY(-6px); }
.spk-card .spk-art { transition: transform 0.25s ease; }
.spk-card:hover .spk-art { transform: translate3d(calc(var(--tx) * 6px), calc(var(--ty) * 5px), 0); }
.spk-card:hover .spk-title { transform: translate3d(calc(var(--tx) * -3px), calc(var(--ty) * -2px), 0); }
.spk-title { transition: transform 0.25s ease; }
@media (hover: none) { .spk-card:hover { transform: none; } .spk-card:hover .spk-art, .spk-card:hover .spk-title { transform: none; } }

/* OTC как пометка вроде TM: мелкие буквы над концом слова, без рамки */
.spk-tt { position: relative; display: inline-block; padding-right: 0.1em; }
.spk-tt sup { position: absolute; left: 100%; top: 0.02em; margin-left: 2px; font-size: 0.36em; font-weight: 800; letter-spacing: 0.06em; line-height: 1; color: #b9b3ff; -webkit-text-fill-color: #b9b3ff; }

/* Уровни TP / TP+50% / SL на картинке «Классики» неподвижны */
.spk-dash, .spk-tgt { animation: none !important; }

/* ── Инструменты рисования: лента и правка выбранной фигуры ─────────────────────── */
.gb-toolp { top: 46px; left: 8px; right: 8px; width: auto; max-height: none; padding: 5px; border-radius: 12px; overflow: visible; }
.gb-toolp-row { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.gb-toolp-row::-webkit-scrollbar { display: none; }
.gb-tp { flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border-radius: 9px; border: none; background: transparent; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.12s, color 0.12s; }
.gb-tp:hover { background: var(--panel); color: var(--txt); }
.gb-tp.on { background: var(--txt); color: var(--bg); }
.gb-tp[data-act="magnet"].on { background: color-mix(in srgb, #ffd166 22%, transparent); color: #ffd166; }
.gb-toolp .sep { flex: 0 0 auto; width: 1px; height: 22px; margin: 0 4px; background: var(--line2); }
.gb-dbar { max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
.gb-dbar::-webkit-scrollbar { display: none; }
.gb-dsty { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.gb-dsty .sw { width: 20px; height: 20px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line2); }
.gb-dsty .sw.on { border-color: var(--bg); box-shadow: 0 0 0 2px var(--txt); }
.gb-dsty .wd { width: 30px; height: 24px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.gb-dsty .wd i { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--txt); }
.gb-dbar, .gb-dbar { top: auto; bottom: 34px; }
.otc[data-mode="showdown"] .gb-dbar { top: auto; bottom: calc(var(--sdx-inset, 150px) + 6px); }

/* ── Параметры фигуры ───────────────────────────────────────────────────────────── */
.gb-dset { position: absolute; z-index: 45; top: 46px; right: 8px; width: min(300px, calc(100% - 16px)); max-height: calc(100% - 100px); display: flex; flex-direction: column; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 10px 28px rgba(0,0,0,0.3); }
.ds-h { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--line); }
.ds-h b { font-size: 13px; font-weight: 500; }
.ds-h button { width: 28px; height: 28px; padding: 0; border: none; border-radius: 7px; background: transparent; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ds-h button:hover { color: var(--txt); background: var(--panel); }
.ds-h svg { width: 16px; height: 16px; }
.ds-body { overflow-y: auto; padding: 2px 14px; scrollbar-width: thin; }
.ds-sec { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ds-sec:last-child { border-bottom: none; }
.ds-sec > label:not(.ds-ck) { display: block; margin-bottom: 7px; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.ds-sw { display: flex; gap: 9px; }
.ds-sw .sw { width: 22px; height: 22px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line2); cursor: pointer; }
.ds-sw .sw.on { border-color: var(--panel2); box-shadow: 0 0 0 2px var(--txt); }
.ds-seg { display: flex; gap: 4px; margin-bottom: 5px; }
.ds-seg:last-child { margin-bottom: 0; }
.ds-seg button { flex: 1; height: 30px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line2); background: var(--panel); color: var(--mut); font-size: 11.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ds-seg button.on { background: var(--txt); color: var(--bg); border-color: var(--txt); }
.ds-seg i { display: block; width: 20px; border-radius: 2px; background: currentColor; }
.ds-ck { display: flex; align-items: center; gap: 9px; padding: 3px 0; font-size: 12.5px; color: var(--txt); cursor: pointer; }
.ds-ck input, .ds-lv input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--txt); }
.ds-rng { display: flex; align-items: center; gap: 10px; }
.ds-rng input { flex: 1; accent-color: var(--txt); }
.ds-val { min-width: 34px; text-align: right; font-size: 12px; color: var(--mut); }
.ds-txt, .ds-pt input, .ds-lv input[type="text"] { width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--txt); font-size: 12.5px; outline: none; user-select: text; -webkit-user-select: text; }
.ds-txt:focus, .ds-pt input:focus, .ds-lv input[type="text"]:focus { border-color: var(--mut); }
.ds-pt { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; color: var(--mut); }
.ds-lv { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: center; margin-bottom: 6px; }
.ds-link { margin-top: 2px; padding: 4px 0; border: none; background: none; color: var(--mut); font-size: 11.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ds-link:hover { color: var(--txt); }
.ds-f { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.ds-f button { flex: 1; height: 32px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); color: var(--txt); font-size: 12px; font-weight: 500; cursor: pointer; }
.ds-f button.dn { color: var(--dn); border-color: color-mix(in srgb, var(--dn) 45%, transparent); }

/* ── Полировка терминала: без тяжёлых начертаний, лишних теней и кричащих деталей ──── */
.gb-word { font-size: 14px; letter-spacing: 0.1em; font-weight: 500; }
.gb-word b { font-weight: 500; }
.gb-word span { font-weight: 400; }
.gb-sub, .gb-session .lbl, .gb-duel-name, .gb-timer small, .gb-amenu-t, .gb-sec-t { letter-spacing: 0.08em; }
.gb-btn { height: 48px; font-size: 14px; letter-spacing: 0.03em; text-transform: none; }
.gb-float .nmrow b { text-shadow: none; }
.gb-float .gb-now .glogo, .gb-logo { filter: none; }
html[data-theme="light"] .otc .gb-main,
html[data-theme="light"] .otc .gb-input,
html[data-theme="light"] .otc .gb-icon,
html[data-theme="light"] .otc .gb-railbtn,
html[data-theme="light"] .otc .gb-duel,
html[data-theme="light"] .otc .gb-seg { box-shadow: none; }

/* ── Панель выбранной фигуры: стекло, иконки, мягкая подсветка ───────────────────── */
.gb-dbar { gap: 4px; padding: 5px; border-radius: 14px; background: rgba(22,28,36,0.72); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); border: 1px solid rgba(255,255,255,0.09); box-shadow: 0 10px 30px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.06); animation: gbDbarIn .16s ease-out; }
@keyframes gbDbarIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.gb-dbar .gb-dtext { padding: 0 8px 0 6px; font-size: 11px; font-weight: 500; color: var(--mut); }
.gb-dbar button { border-radius: 9px; transition: background .15s, color .15s, transform .12s, box-shadow .15s; }
.gb-dbar button:active { transform: scale(.92); }
.gb-dbar .ib { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--mut); }
.gb-dbar .ib:hover { background: rgba(255,255,255,0.08); color: var(--txt); }
.gb-dbar .ib.dn:hover, .gb-dbar button[data-act="ddel"]:hover { background: rgba(255,77,109,0.16); color: #ff6b85; }
.gb-dbar button[data-act="ddel"] { background: transparent; color: var(--mut); }
.gb-dbar .gb-pill { height: 30px; padding: 0 14px; font-size: 12px; font-weight: 500; letter-spacing: .01em; background: rgba(255,255,255,0.08); color: var(--txt); }
.gb-dbar .gb-pill:hover { background: rgba(255,255,255,0.14); }
.gb-dbar .gb-pill.ok, .gb-dbar button[data-act="dfinish"] { background: var(--up); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
.gb-dsty { gap: 3px; padding-right: 2px; }
.gb-dsty .sw { width: 22px; height: 22px; margin: 0 1px; border: 2px solid transparent; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 2px 6px rgba(0,0,0,0.3); transition: transform .12s, box-shadow .15s; }
.gb-dsty .sw:hover { transform: scale(1.12); }
.gb-dsty .sw.on { border-color: rgba(20,25,32,0.95); box-shadow: 0 0 0 2px var(--c), 0 0 12px var(--c); }
.gb-dsty .gb-dsep { width: 1px; height: 18px; margin: 0 4px; background: rgba(255,255,255,0.12); flex: 0 0 auto; }
.gb-dsty .wd { width: 32px; height: 30px; background: transparent; color: var(--mut); }
.gb-dsty .wd:hover { background: rgba(255,255,255,0.08); }
.gb-dsty .wd i { width: 16px; background: currentColor; }

/* ── Панель инструментов: быстрый доступ на графике и полный список с избранным ──── */
.gb-qbar { position: absolute; z-index: 7; left: 8px; top: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; max-height: calc(100% - 110px); overflow-y: auto; scrollbar-width: none; border-radius: 14px; background: rgba(22,28,36,0.62); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 26px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.05); }
.gb-qbar::-webkit-scrollbar { display: none; }
.gb-qb { width: 34px; height: 34px; padding: 0; flex: 0 0 auto; border: none; border-radius: 10px; background: transparent; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s, transform .12s, box-shadow .15s; }
.gb-qb svg { width: 19px; height: 19px; }
.gb-qb:hover { background: rgba(255,255,255,0.09); color: var(--txt); }
.gb-qb:active { transform: scale(.9); }
.gb-qb.on { background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(214,222,235,0.9)); color: #0d1015; box-shadow: 0 3px 12px rgba(0,0,0,0.35); }
.gb-qb.on.mg, .gb-qb.mg { background: rgba(255,209,102,0.13); color: #ffd166; box-shadow: inset 0 0 0 1px rgba(255,209,102,0.26); }
/* Значок магнита был нарисован выше центра ячейки (на 2 единицы), из-за чего плитка выглядела перекошенной: значок опущен в центр */
.gb-qb.mg svg { width: 18px; height: 18px; }
.gb-qb.more { color: var(--txt); }
.gb-qsep { width: 20px; height: 1px; margin: 3px 0; background: rgba(255,255,255,0.12); flex: 0 0 auto; }

.gb-toolp { top: 60px; left: 58px; right: auto; width: min(290px, calc(100% - 70px)); max-height: calc(100% - 76px); padding: 0; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; background: rgba(20,26,34,0.82); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 18px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06); animation: gbDbarIn .16s ease-out; }
.gb-toolp[hidden] { display: none; }
.gb-tpH { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.gb-tpH b { display: block; font-size: 14px; font-weight: 500; letter-spacing: .01em; }
.gb-tpH span { display: block; margin-top: 2px; font-size: 11px; color: var(--dim); }
.gb-tpList { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px; scrollbar-width: thin; }
.gb-tg label { display: block; padding: 10px 8px 5px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.gb-tr { display: flex; align-items: center; border-radius: 10px; transition: background .12s; }
.gb-tr:hover { background: rgba(255,255,255,0.06); }
.gb-tr.on { background: rgba(110,168,255,0.16); box-shadow: inset 0 0 0 1px rgba(110,168,255,0.35); }
.gb-trm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 8px; border: none; background: none; color: var(--txt); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.gb-trm svg { width: 20px; height: 20px; color: var(--mut); flex: 0 0 auto; }
.gb-tr.on .gb-trm svg, .gb-trm:hover svg { color: var(--txt); }
.gb-star { width: 36px; height: 36px; padding: 0; margin-right: 2px; border: none; border-radius: 9px; background: transparent; color: var(--dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .15s, transform .15s; }
.gb-star:hover { color: #ffd166; transform: scale(1.12); }
.gb-star.on { color: #ffd166; }
.gb-star.on svg { fill: #ffd166; filter: drop-shadow(0 0 6px rgba(255,209,102,0.5)); }
.gb-tpF { display: flex; gap: 6px; padding: 8px; border-top: 1px solid rgba(255,255,255,0.07); }
.gb-tact { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 7px; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; background: rgba(255,255,255,0.04); color: var(--mut); font-size: 10.5px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.gb-tact svg { width: 18px; height: 18px; }
.gb-tact:hover { background: rgba(255,255,255,0.09); color: var(--txt); }
.gb-tact.on { color: #ffd166; border-color: rgba(255,209,102,0.4); background: rgba(255,209,102,0.1); }
.gb-tact.dn:hover { color: #ff6b85; border-color: rgba(255,77,109,0.4); background: rgba(255,77,109,0.1); }

/* Параметры фигуры: тот же стеклянный язык */
.gb-dset { top: 60px; right: 8px; width: min(310px, calc(100% - 16px)); border-radius: 18px; background: rgba(20,26,34,0.84); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 18px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06); animation: gbDbarIn .16s ease-out; }
.ds-h { padding: 12px 10px 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.ds-h b { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; }
.ds-ti { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 9px; background: rgba(255,255,255,0.07); color: var(--txt); }
.ds-ti svg { width: 17px; height: 17px; }
.ds-h button { border-radius: 9px; }
.ds-h button:hover { background: rgba(255,255,255,0.08); }
.ds-body { padding: 0 16px; }
.ds-sec { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ds-sec > label:not(.ds-ck) { margin-bottom: 9px; font-size: 11px; letter-spacing: .12em; color: var(--dim); }
.ds-sw { gap: 10px; }
.ds-sw .sw { width: 26px; height: 26px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 2px 6px rgba(0,0,0,0.3); transition: transform .12s, box-shadow .15s; }
.ds-sw .sw:hover { transform: scale(1.12); }
.ds-sw .sw.on { border-color: rgba(20,26,34,0.95); box-shadow: 0 0 0 2px var(--c), 0 0 14px var(--c); }
.ds-seg { gap: 4px; padding: 3px; margin-bottom: 6px; border-radius: 11px; background: rgba(255,255,255,0.05); }
.ds-seg button { height: 30px; border: none; border-radius: 8px; background: transparent; color: var(--mut); font-weight: 500; transition: background .15s, color .15s; }
.ds-seg button:hover { color: var(--txt); }
.ds-seg button.on { background: rgba(255,255,255,0.14); color: var(--txt); box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.1); border: none; }
.ds-txt, .ds-pt input, .ds-lv input[type="text"] { height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.09); background: rgba(255,255,255,0.045); transition: border-color .15s, background .15s; }
.ds-txt:focus, .ds-pt input:focus, .ds-lv input[type="text"]:focus { outline: none; border-color: rgba(110,168,255,0.7); background: rgba(110,168,255,0.07); box-shadow: 0 0 0 3px rgba(110,168,255,0.14); }
.ds-pt { grid-template-columns: 60px 1fr; }
.ds-ck input, .ds-lv input[type="checkbox"], .ds-rng input { accent-color: #6ea8ff; }
.ds-f { padding: 10px 12px 12px; gap: 8px; border-top: 1px solid rgba(255,255,255,0.07); }
.ds-f button { height: 36px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(255,255,255,0.09); border-radius: 11px; background: rgba(255,255,255,0.05); font-weight: 500; transition: background .15s, color .15s, border-color .15s, transform .12s; }
.ds-f button svg { width: 16px; height: 16px; }
.ds-f button:hover { background: rgba(255,255,255,0.1); }
.ds-f button:active { transform: scale(.97); }
.ds-f button.dn { color: #ff6b85; border-color: rgba(255,77,109,0.3); background: rgba(255,77,109,0.07); }
.ds-f button.dn:hover { background: rgba(255,77,109,0.16); }
.gb-qb.more.on { background: rgba(110,168,255,0.2); color: #6ea8ff; box-shadow: inset 0 0 0 1px rgba(110,168,255,0.4); }

/* ── Полосы прокрутки: тонкие, скруглённые, проявляются при наведении ─────────────── */
.gb-tpList, .ds-body, .gb-trades-body, .gb-amenu, .gb-dset, .gb-toolp { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent; }
.gb-tpList::-webkit-scrollbar, .ds-body::-webkit-scrollbar, .gb-trades-body::-webkit-scrollbar, .gb-amenu::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
.gb-tpList::-webkit-scrollbar-track, .ds-body::-webkit-scrollbar-track, .gb-trades-body::-webkit-scrollbar-track, .gb-amenu::-webkit-scrollbar-track { background: transparent; margin: 6px 0; }
.gb-tpList::-webkit-scrollbar-thumb, .ds-body::-webkit-scrollbar-thumb, .gb-trades-body::-webkit-scrollbar-thumb, .gb-amenu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; min-height: 36px; transition: background .2s; }
.gb-tpList:hover::-webkit-scrollbar-thumb, .ds-body:hover::-webkit-scrollbar-thumb, .gb-trades-body:hover::-webkit-scrollbar-thumb, .gb-amenu:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.32); background-clip: padding-box; }
.gb-tpList::-webkit-scrollbar-thumb:hover, .ds-body::-webkit-scrollbar-thumb:hover, .gb-trades-body::-webkit-scrollbar-thumb:hover, .gb-amenu::-webkit-scrollbar-thumb:hover { background: rgba(0,242,255,0.65); background-clip: padding-box; }
.gb-tpList::-webkit-scrollbar-button, .ds-body::-webkit-scrollbar-button, .gb-trades-body::-webkit-scrollbar-button, .gb-amenu::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.gb-tpList::-webkit-scrollbar-corner, .ds-body::-webkit-scrollbar-corner { background: transparent; }

/* Свой цвет: радужное кольцо с тонким плюсом; после выбора становится выбранным цветом */
.sw-pick { position: relative; display: inline-block; flex: 0 0 auto; border-radius: 50%; overflow: hidden; cursor: pointer; background: conic-gradient(from 0deg, #ff4d4d, #ffd24d, #4dff88, #4dd2ff, #7a4dff, #ff4dc8, #ff4d4d) !important; }
.sw-pick::before, .sw-pick::after { content: ''; position: absolute; left: 50%; top: 50%; background: #fff; border-radius: 2px; transform: translate(-50%, -50%); box-shadow: 0 0 0 0.5px rgba(0,0,0,0.25); pointer-events: none; }
.sw-pick::before { width: 9px; height: 1.8px; }
.sw-pick::after { width: 1.8px; height: 9px; }
.sw-pick.on { background: var(--c) !important; }
.sw-pick.on::before, .sw-pick.on::after { display: none; }
.gb-dbar .ib.on[data-act="dstroke"] { color: var(--txt); background: rgba(255,255,255,0.1); }

/* быстрая панель не заходит на панели индикаторов под ценой */
.gb-qbar { max-height: calc(100% - 118px - var(--pane-total, 0px)); }
.gb-qb.fxb { position: relative; }
.gb-qb.fxb.on { color: #6ea8ff; background: rgba(110,168,255,0.14); }
.gb-qn { position: absolute; right: 1px; top: 1px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: #6ea8ff; color: #0d1015; font-size: 9.5px; line-height: 14px; text-align: center; font-weight: 500; }
/* ── Индикаторы: кнопка в ленте и вкладка поверх графика ───────────────────────── */
.gb-fx { flex: 0 0 auto; height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px 0 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--mut); font-size: 12px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.gb-fx svg { width: 17px; height: 17px; }
.gb-fx:hover { color: var(--txt); border-color: var(--line2); }
.gb-fx.on { color: #6ea8ff; border-color: rgba(110,168,255,0.45); background: rgba(110,168,255,0.1); }
.gb-fxn { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: #6ea8ff; color: #0d1015; font-size: 10.5px; line-height: 17px; text-align: center; font-weight: 500; }
.gb-indp { position: absolute; z-index: 44; top: 46px; right: 8px; width: min(380px, calc(100% - 16px)); max-height: calc(100% - 56px); display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: rgba(20,26,34,0.9); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 56px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06); animation: gbDbarIn .16s ease-out; }
.gb-indp[hidden] { display: none; }
.gb-indh { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px 16px; }
.gb-indh b { font-size: 16px; font-weight: 500; letter-spacing: .01em; }
.gb-inds { position: relative; margin: 8px 12px 6px; }
.gb-indsi { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); display: flex; pointer-events: none; }
.gb-indsi svg { width: 17px; height: 17px; }
.gb-inds input { width: 100%; height: 38px; box-sizing: border-box; padding: 0 34px 0 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: var(--txt); font-size: 13.5px; transition: border-color .15s, box-shadow .15s, background .15s; }
.gb-inds input::placeholder { color: var(--dim); }
.gb-inds input:focus { outline: none; border-color: #3b82f6; background: rgba(59,130,246,0.07); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.gb-indsx { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; border: none; border-radius: 7px; background: transparent; color: var(--mut); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.gb-indsx[hidden] { display: none; }
.gb-indsx:hover { color: var(--txt); background: rgba(255,255,255,0.08); }
.gb-indsx svg { width: 14px; height: 14px; }
.gb-indc { display: flex; gap: 2px; padding: 4px 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); overflow-x: auto; scrollbar-width: none; }
.gb-indc::-webkit-scrollbar { display: none; }
.gb-indc button { flex: 0 0 auto; position: relative; padding: 9px 9px 11px; border: none; background: none; color: var(--mut); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: color .15s; }
.gb-indc button:hover { color: var(--txt); }
.gb-indc button.on { color: var(--txt); }
.gb-indc button.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: #3b82f6; }
.gb-indl { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0 10px; }
.gb-indt { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.gb-indreset { border: none; background: none; color: var(--mut); font-size: 11.5px; letter-spacing: 0; text-transform: none; font-weight: 500; padding: 2px 4px; cursor: pointer; border-radius: 6px; }
.gb-indreset:hover { color: #ff6b85; }
.gb-ia { margin: 4px 10px; padding: 8px 10px 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.07); position: relative; overflow: hidden; transition: opacity .15s; }
.gb-ia::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.gb-ia.off { opacity: .5; }
.gb-iah { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gb-iah .nm b { display: block; font-size: 13.5px; font-weight: 500; }
.gb-iah .nm span { display: block; margin-top: 1px; font-size: 11px; color: var(--dim); }
.gb-iab { display: flex; gap: 2px; }
.gb-ib { width: 30px; height: 30px; padding: 0; border: none; border-radius: 8px; background: transparent; color: var(--mut); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.gb-ib svg { width: 17px; height: 17px; }
.gb-ib:hover { background: rgba(255,255,255,0.09); color: var(--txt); }
.gb-ib.dn:hover { background: rgba(255,77,109,0.15); color: #ff6b85; }
.gb-iap { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.gb-iap label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 78px; min-width: 78px; }
.gb-iap label span { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.gb-iap input { width: 100%; height: 30px; padding: 0 9px; box-sizing: border-box; border-radius: 8px; border: 1px solid rgba(255,255,255,0.09); background: rgba(0,0,0,0.2); color: var(--txt); font-size: 13px; font-variant-numeric: tabular-nums; }
.gb-iap input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.gb-il { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 16px; border: none; background: none; color: var(--txt); text-align: left; cursor: pointer; transition: background .12s; }
.gb-il:hover { background: rgba(255,255,255,0.05); }
.gb-il .nm { flex: 1; min-width: 0; }
.gb-il .nm b { display: block; font-size: 13.5px; font-weight: 500; }
.gb-il .nm span { display: block; margin-top: 1px; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-il em { font-style: normal; flex: 0 0 auto; font-size: 10.5px; color: var(--dim); padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,0.05); }
.gb-il .add { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--mut); border: 1px solid rgba(255,255,255,0.1); transition: background .15s, color .15s, border-color .15s; }
.gb-il .add svg { width: 15px; height: 15px; }
.gb-il:hover .add { color: #fff; border-color: #3b82f6; background: #3b82f6; }
.gb-il.on .add { color: #3b82f6; border-color: rgba(59,130,246,0.5); background: rgba(59,130,246,0.12); }
.gb-il.on:hover .add { color: #fff; }
.gb-indempty { padding: 26px 16px; text-align: center; color: var(--dim); font-size: 13px; }
.gb-indl { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent; }
.gb-indl::-webkit-scrollbar { width: 10px; background: transparent; }
.gb-indl::-webkit-scrollbar-track { background: transparent; margin: 6px 0; }
.gb-indl::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; min-height: 36px; }
.gb-indl::-webkit-scrollbar-button { display: none; }
@media (max-width: 520px) { .gb-fx span { display: none; } .gb-fx { padding: 0 8px; } }
.gb-indh, .gb-inds, .gb-indc { flex: 0 0 auto; }

.spk-card.off { opacity: .45; filter: grayscale(1); cursor: not-allowed; position: relative; }
.spk-card .spk-off { position: absolute; right: 12px; top: 12px; padding: 6px 12px; border-radius: 10px; background: rgba(0,0,0,0.78); color: #fff; font-style: normal; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }


/* ══ Современный слой: приборная панель трейдера ═══════════════════════════════════
   Данные (цены, время, суммы) набраны моноширинным шрифтом, поверхности собраны из тонких линий и мягкой глубины,
   живое состояние видно сразу: метка LIVE, подсветка изменения цены. Один акцент, зелёный и красный только для сторон сделки. */
.otc {
    --mono: 'Space Grotesk', 'IBM Plex Sans', 'Inter', -apple-system, sans-serif; /* цифры Space Grotesk с включённой одной шириной (tnum): цены не «пляшут» */
    --bg: #090c11; --panel: #10151c; --panel2: #161c25; --line: #1e2631; --line2: #2a3441;
    --ring: rgba(94, 210, 255, 0.6);
    --lift: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 10px 24px -16px rgba(0, 0, 0, 0.7);
    animation: gbEnter 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes gbEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* данные моноширинным шрифтом */
.otc .num, .gb-price, .gb-chg, .gb-session .val, .gb-timer b, .gb-duel-net, .gb-input input, .gb-yield b,
.gb-arow .ap, .gb-arow .as b, .gb-hrow b, .gb-hrow .h1, .gb-ring b, .otc .gb-cnt { font-family: var(--mono); font-feature-settings: 'zero' 0; }
.gb-price { font-size: 19px; letter-spacing: -0.015em; }
.gb-session .val { font-size: 18px; letter-spacing: -0.02em; }
.gb-input, .gb-input input { font-size: 16px; letter-spacing: -0.01em; }

/* поверхности: тонкая линия, световая кромка сверху, мягкая глубина */
.gb-main { border-radius: 14px; background: linear-gradient(180deg, #121821 0%, var(--panel) 100%); box-shadow: var(--lift); }
.gb-duel, .gb-input, .gb-icon { box-shadow: var(--lift); }
.gb-icon { background: linear-gradient(180deg, #151b24, var(--panel)); }
.gb-hrow { background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent), var(--panel); }
.gb-tcard { background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--panel2); }
.gb-amenu, .gb-pop { background: rgba(22, 28, 37, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05); }

/* шапка */
.gb-top { border-bottom: 1px solid rgba(255, 255, 255, 0.03); }

/* изменение цены */
.gb-price { padding: 1px 5px; margin-right: -5px; border-radius: 6px; }
.gb-price.fl-up { animation: gbFlUp 0.55s ease-out; }
.gb-price.fl-dn { animation: gbFlDn 0.55s ease-out; }
@keyframes gbFlUp { from { background: color-mix(in srgb, var(--up) 24%, transparent); } to { background: transparent; } }
@keyframes gbFlDn { from { background: color-mix(in srgb, var(--dn) 24%, transparent); } to { background: transparent; } }

/* переключатели: активный сегмент светится изнутри, без заливки цветом */
.gb-seg { background: rgba(0, 0, 0, 0.28); border-color: var(--line); }
.gb-seg button { transition: color 0.15s, background 0.15s; }
.gb-seg button:hover:not(.on) { color: var(--txt); }
.gb-seg button.on { background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.06)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 1px 2px rgba(0,0,0,0.4); }

/* поля ввода */
.gb-input { transition: border-color 0.15s, box-shadow 0.15s; }
.gb-input:hover, .gb-field.open .gb-input { border-color: var(--line2); }
.gb-input:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(94, 210, 255, 0.12), var(--lift); }

/* кнопки сделки: плотный цвет, объём, чёткий отклик */
.gb-btn { letter-spacing: 0.12em; font-weight: 600; position: relative; overflow: hidden; transition: transform 0.12s, filter 0.15s, box-shadow 0.2s; }
.gb-btn.up { background: linear-gradient(180deg, color-mix(in srgb, var(--up) 88%, #fff), var(--up) 55%, color-mix(in srgb, var(--up) 82%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 10px 22px -12px color-mix(in srgb, var(--up) 80%, transparent); }
.gb-btn.dn { background: linear-gradient(180deg, color-mix(in srgb, var(--dn) 88%, #fff), var(--dn) 55%, color-mix(in srgb, var(--dn) 82%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 10px 22px -12px color-mix(in srgb, var(--dn) 80%, transparent); }
.gb-btn:hover:not(:disabled) { filter: brightness(1.07); }
.gb-btn:active:not(:disabled) { transform: translateY(1px) scale(0.985); filter: brightness(0.96); }

/* боковые кнопки: нейтральное стекло вместо зелёно-красной рамки */
.gb-glass::before { background: linear-gradient(165deg, rgba(255,255,255,0.26), rgba(255,255,255,0.07) 40%, rgba(255,255,255,0.07) 60%, rgba(255,255,255,0.14)); }
.gb-glass::after { background: radial-gradient(85% 90% at 50% -20%, rgba(94, 210, 255, 0.14), transparent 70%); opacity: 0.7; }
.gb-glass { box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.gb-glass:hover, .gb-glass.on { box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); }

/* клавиатура и фокус */
.otc button:focus-visible, .otc .gb-input:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.otc { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.otc ::-webkit-scrollbar { width: 6px; height: 6px; }
.otc ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
    .otc, .gb-price.fl-up, .gb-price.fl-dn { animation: none !important; }
}
/* светлая тема: поверхности те же, но без глубины на тёмной подложке */
html[data-theme="light"] .otc { --bg: #131923; --panel: #000002; --panel2: #060a0f; --lift: 0 1px 2px rgba(255,255,255,0.28), 0 8px 20px -14px rgba(255,255,255,0.55); }
html[data-theme="light"] .otc .gb-main { background: var(--panel); }
html[data-theme="light"] .otc .gb-icon, html[data-theme="light"] .otc .gb-hrow, html[data-theme="light"] .otc .gb-tcard { background: var(--panel); }


/* ══ Тип графика ═══════════════════════════════════════════════════════════════════ */
.gb-vbtn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; }
.gb-vbtn svg:last-child { opacity: 0.6; width: 10px; height: 10px; }
.gb-vmenu { position: absolute; left: 8px; top: 6px; z-index: 31; min-width: 196px; padding: 6px; border-radius: 12px; background: rgba(22, 28, 37, 0.96); border: 1px solid var(--line2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.gb-vmenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--txt); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.gb-vmenu button svg { color: var(--mut); flex: 0 0 auto; }
.gb-vmenu button:hover { background: rgba(255, 255, 255, 0.06); }
.gb-vmenu button.on { background: rgba(255, 255, 255, 0.1); }
.gb-vmenu button.on svg { color: var(--txt); }

/* ══ Телефон: график получает больше места ═════════════════════════════════════════ */
@media (max-width: 719px) {
    .gb-wrap > .gb-tradesbtn { position: absolute; top: 6px; right: 8px; z-index: 8; width: 40px; height: 34px; flex: none; margin: 0; padding: 0; overflow: visible; }
    .gb-wrap > .gb-tradesbtn > span:not(.gb-badge) { display: none; }
    .gb-wrap > .gb-tradesbtn .gb-badge { position: absolute; top: -5px; right: -5px; z-index: 3; }
    .otc.gb-mchip .gb-rail { display: none; }
    .gb-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
    .gb-panel > * { grid-column: 1 / -1; }
    .gb-panel > .gb-yield { grid-column: auto; }
    .gb-field label { margin-bottom: 2px; }
    .gb-input { height: 42px; }
    .gb-btn { height: 50px; }
    .gb-top { padding: 6px 12px 4px; }
    .gb-body { gap: 6px; }
}


/* ══ Ряд таймфреймов: затухание у края, где ряд продолжается ═══════════════════════ */
.gb-tscroll.fr { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); }
.gb-tscroll.fl { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 34px), transparent); }
.gb-tscroll.fl.fr { -webkit-mask-image: linear-gradient(90deg, transparent, #000 34px, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, transparent, #000 34px, #000 calc(100% - 34px), transparent); }

/* ══ Телефон: уведомления внизу графика, над осью времени, рядом с панелью и осью цены ═ */
@media (max-width: 719px) {
    .gb-toasts, .gb-toasts { top: auto; bottom: 30px; left: 58px; right: 72px; }
    .gb-toast { padding: 5px 6px; max-width: 100%; border-radius: 10px; }
    .gb-toast .ti { width: 26px; height: 26px; border-radius: 8px; }
    .gb-toast .ti svg { width: 15px; height: 15px; }
    .gb-toast .tm { font-size: 12px; -webkit-line-clamp: 1; }
    .gb-toast .ts { font-size: 11px; }
    .gb-toast .tc { display: none; }
}

/* Цифры одной ширины и на самом графике: холст берёт настройку у своего элемента */
.gb-canvas { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.gb-price, .gb-chg, .gb-session .val, .gb-timer b, .gb-duel-net, .gb-input input, .gb-yield b, .gb-arow .ap, .gb-hrow b, .gb-ring b, .otc .num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }


/* ══ Панель выбранной фигуры: имя слева, цвет и линия в попапах ════════════════════ */
.gb-dbar { overflow: visible; }
.gb-dwho { display: inline-flex; align-items: center; gap: 7px; padding: 0 4px 0 6px; min-width: 0; max-width: 150px; }
.gb-dwho i { display: inline-flex; flex: 0 0 auto; color: var(--mut); }
.gb-dwho i svg { width: 16px; height: 16px; }
.gb-dwho em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-dwho .lk { display: inline-flex; color: #ffd166; }
.gb-dwho .lk svg { width: 14px; height: 14px; }
.gb-dtr { height: 30px; padding: 0 5px 0 6px; display: inline-flex; align-items: center; gap: 2px; background: transparent; color: var(--mut); flex: 0 0 auto; }
.gb-dtr:hover, .gb-dtr.on { background: rgba(255,255,255,0.1); color: var(--txt); }
.gb-dtr .dot { width: 17px; height: 17px; border-radius: 50%; background: var(--c, #6ea8ff); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), 0 1px 4px rgba(0,0,0,0.4); }
.gb-dtr .ln { color: var(--txt); }
.gb-dtr .cv { width: 11px; height: 11px; opacity: 0.65; flex: 0 0 auto; }
.gb-dpop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 12; min-width: 168px; padding: 9px 10px 10px; border-radius: 14px; background: rgba(22,28,36,0.95); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 16px 40px -12px rgba(0,0,0,0.8); }
.gb-dpop .dp-t { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 500; margin: 0 2px 7px; }
.gb-dpop .dp-t + .dp-row + .dp-t { margin-top: 11px; }
.gb-dpop .dp-sw { display: flex; align-items: center; gap: 9px; }
.gb-dpop .dp-sw .sw { width: 24px; height: 24px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 2px 6px rgba(0,0,0,0.3); cursor: pointer; transition: transform .12s; }
.gb-dpop .dp-sw .sw:hover { transform: scale(1.12); }
.gb-dpop .dp-sw .sw.on { border-color: rgba(22,28,36,0.95); box-shadow: 0 0 0 2px var(--c), 0 0 12px var(--c); }
.gb-dpop .dp-row { display: flex; gap: 4px; padding: 3px; border-radius: 11px; background: rgba(255,255,255,0.05); }
.gb-dpop .dp-row button { flex: 1; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px; background: transparent; color: var(--mut); cursor: pointer; transition: background .15s, color .15s; }
.gb-dpop .dp-row button:hover { color: var(--txt); }
.gb-dpop .dp-row button.on { background: rgba(255,255,255,0.14); color: var(--txt); box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.gb-dbar .ib.on[data-b="dsetbtn"] { background: rgba(255,255,255,0.12); color: var(--txt); }

/* ══ Окно параметров: образец фигуры, замок, край прокрутки ════════════════════════ */
.ds-h b { min-width: 0; }
.ds-h b > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-ha { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.ds-ha button { width: 30px; height: 30px; padding: 0; border: none; border-radius: 9px; background: transparent; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.ds-ha button:hover { background: rgba(255,255,255,0.08); color: var(--txt); }
.ds-ha button.on { color: #ffd166; background: rgba(255,209,102,0.14); }
.ds-ha svg { width: 16px; height: 16px; }
.ds-prev { margin: 12px 16px 0; padding: 4px 0; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.ds-prev svg { display: block; }
.ds-lock { margin: 10px 16px 0; padding: 8px 10px; border-radius: 10px; font-size: 11.5px; line-height: 1.4; color: #ffd166; background: rgba(255,209,102,0.1); border: 1px solid rgba(255,209,102,0.22); }
.ds-body { position: relative; padding-bottom: 4px; }
.ds-body.more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); }
.ds-seg.wide button { height: 32px; }
.ds-seg .ln { color: currentColor; }
.ds-cks { display: flex; gap: 18px; }
.ds-pt:last-child { margin-bottom: 0; }

/* ══ Телефон: параметры открываются шторкой снизу, панель не уезжает за край ═══════ */
@media (max-width: 719px) {
    .gb-dset { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 76%; border-radius: 20px 20px 0 0; border-bottom: none; animation: dsUp .22s cubic-bezier(0.2, 0.8, 0.2, 1); }
    @keyframes dsUp { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
    .ds-prev { margin-top: 10px; }
    .ds-f { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .gb-dwho { max-width: 96px; }
    .gb-dpop { min-width: 158px; }
}

/* Панель не должна уезжать за край: имя фигуры ужимается, редкие кнопки остаются только в параметрах */
.gb-dbar .gb-dsty { min-width: 0; }
.gb-dwho { flex: 0 1 auto; min-width: 26px; }
.gb-dwho em { min-width: 0; }
@media (max-width: 719px) {
    .gb-dbar .gb-dsty > [data-act="dclone"], .gb-dbar .gb-dsty > [data-act="dstroke"] { display: none; }
    .gb-dwho { max-width: 108px; }
}

/* Попап открывается от панели вверх, когда она стоит у нижнего края графика */
.gb-dpop.up { top: auto; bottom: calc(100% + 8px); }


/* ══ Выбор своего цвета ═════════════════════════════════════════════════════════════ */
.sw-pick { padding: 0; border: 2px solid transparent; }
.gb-cpick { position: absolute; z-index: 60; width: 252px; padding: 12px 12px 12px; border-radius: 16px; background: rgba(20,26,34,0.96); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 22px 54px -14px rgba(0,0,0,0.85); }
.cp-sv { position: relative; height: 138px; border-radius: 10px; cursor: crosshair; touch-action: none; background: linear-gradient(to top, #000, rgba(0,0,0,0)), linear-gradient(to right, #fff, var(--hue, #f00)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.cp-hd { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2.5px solid #fff; background: var(--cur); box-shadow: 0 0 0 1px rgba(0,0,0,0.45), 0 3px 8px rgba(0,0,0,0.5); pointer-events: none; }
.cp-hue { position: relative; height: 14px; margin: 12px 0 0; border-radius: 7px; cursor: pointer; touch-action: none; background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.cp-hh { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2.5px solid #fff; background: var(--hue, #f00); box-shadow: 0 0 0 1px rgba(0,0,0,0.45), 0 3px 8px rgba(0,0,0,0.5); pointer-events: none; }
.cp-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cp-prev { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.cp-hex { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: var(--txt); font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; outline: none; user-select: text; -webkit-user-select: text; }
.cp-hex:focus, .cp-rgb input:focus { border-color: rgba(110,168,255,0.7); box-shadow: 0 0 0 3px rgba(110,168,255,0.14); }
.cp-eye, .cp-x { flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: none; border-radius: 10px; background: rgba(255,255,255,0.06); color: var(--mut); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.cp-eye:hover, .cp-x:hover { background: rgba(255,255,255,0.12); color: var(--txt); }
.cp-x svg { width: 15px; height: 15px; }
.cp-rgb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.cp-rgb label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--dim); }
.cp-rgb input { width: 100%; min-width: 0; height: 32px; padding: 0 6px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: var(--txt); font-size: 13px; font-weight: 500; text-align: center; outline: none; -moz-appearance: textfield; user-select: text; -webkit-user-select: text; }
.cp-rgb input::-webkit-outer-spin-button, .cp-rgb input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cp-t { margin: 12px 2px 7px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.cp-sws { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-sw { width: 22px; height: 22px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); cursor: pointer; transition: transform .12s; }
.cp-sw:hover { transform: scale(1.14); }
.cp-sw.on { border-color: rgba(20,26,34,0.95); box-shadow: 0 0 0 2px var(--c); }
html[data-theme="light"] .otc .gb-cpick { background: rgba(20,26,34,0.98); }
@media (max-width: 719px) {
    .gb-cpick.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 20px 20px 0 0; border-bottom: none; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); animation: dsUp .22s cubic-bezier(0.2, 0.8, 0.2, 1); }
    .cp-sv { height: 104px; }
    .cp-hue { margin-top: 10px; }
    .cp-row { margin-top: 10px; }
    .cp-rgb { display: none; }
    .cp-t { margin-top: 10px; }
    .gb-cpick.sheet { padding-top: 10px; }
}

/* Светлая тема собирается инверсией страницы, поэтому цветные образцы (цвета фигур, квадрат и полоса выбора цвета) возвращаем обратно:
   иначе оранжевый показывается синим. Фильтр вешаем только на внешние элементы: на вложенных он сложился бы дважды. */
html[data-theme="light"] .otc .cp-sv, html[data-theme="light"] .otc .cp-hue, html[data-theme="light"] .otc .cp-sw, html[data-theme="light"] .otc .cp-prev,
html[data-theme="light"] .otc .sw, html[data-theme="light"] .otc .gb-dtr .dot { filter: saturate(0.87) contrast(1.0753) hue-rotate(180deg) invert(1); }

/* Флажки в настройках фигур: свои, а не системные. Скруглённый квадрат, плавная галочка, подсветка по фокусу. */
.ds-ck input, .ds-lv input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: 0 0 auto; position: relative; width: 18px; height: 18px; margin: 0; border-radius: 6px; border: 1.5px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.03); cursor: pointer; transition: background .16s, border-color .16s, box-shadow .16s, transform .12s; }
.ds-ck input::after, .ds-lv input[type="checkbox"]::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 8px; border: solid #0b1220; border-width: 0 2px 2px 0; border-radius: 1px; transform: rotate(45deg) scale(0); transition: transform .18s cubic-bezier(0.3, 1.6, 0.5, 1); }
.ds-ck:hover input:not(:checked), .ds-lv input[type="checkbox"]:hover:not(:checked) { border-color: rgba(255,255,255,0.4); }
.ds-ck input:checked, .ds-lv input[type="checkbox"]:checked { background: #6ea8ff; border-color: #6ea8ff; }
.ds-ck input:checked::after, .ds-lv input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
.ds-ck input:active, .ds-lv input[type="checkbox"]:active { transform: scale(0.92); }
.ds-ck input:focus-visible, .ds-lv input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(110,168,255,0.28); }
.ds-ck { font-weight: 500; }

/* ── Индикаторы как в TradingView: легенда под названием актива, перетаскиваемые окна ── */
.gb-leg { pointer-events: none; margin: 1px 0 0 2px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.gb-leg[hidden] { display: none; }
.gb-lg { pointer-events: auto; display: flex; align-items: center; gap: 7px; height: 25px; padding: 0 4px 0 8px; border-radius: 8px; font-size: 12px; font-weight: 500; white-space: nowrap; transition: background .12s, opacity .15s; }
.gb-lg:hover { background: rgba(127,140,160,0.16); }
.gb-lg .lc { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.gb-lg .n { padding: 0; border: none; background: none; color: var(--txt); font: inherit; cursor: pointer; text-shadow: 0 1px 6px rgba(0,0,0,0.35); }
.gb-lg .n:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); }
.gb-lg .v { color: var(--c); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.gb-lg .v:empty { display: none; }
.gb-lg.off .lc { background: transparent; box-shadow: inset 0 0 0 1.5px var(--dim); }
.gb-lg.off .n { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(127,140,160,0.5); }
.gb-lg .ac { display: flex; align-items: center; gap: 0; max-width: 0; overflow: hidden; opacity: 0; transition: max-width .18s ease, opacity .15s; }
.gb-lg:hover .ac, .gb-lg:focus-within .ac { max-width: 110px; opacity: 1; }
.gb-lg .ac button { flex: 0 0 auto; width: 24px; height: 22px; padding: 0; border: none; border-radius: 6px; background: none; color: var(--mut); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.gb-lg .ac button svg { width: 15px; height: 15px; }
.gb-lg .ac button:hover { color: var(--txt); background: rgba(255,255,255,0.1); }
.gb-lg .ac button.dn:hover { color: #ff6b85; background: rgba(255,77,109,0.15); }
@media (hover: none) { .gb-lg .ac { max-width: 110px; opacity: 1; } .gb-lg { height: 27px; } .gb-lg .ac button { width: 28px; height: 26px; } }
.gb-lgh { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px 0 5px; border: none; border-radius: 7px; background: rgba(127,140,160,0.12); color: var(--mut); font-size: 11.5px; font-weight: 500; cursor: pointer; }
.gb-lgh:hover { color: var(--txt); background: rgba(127,140,160,0.2); }
.gb-lgh .ch { display: flex; transition: transform .2s; } .gb-lgh .ch svg { width: 14px; height: 14px; }
.gb-lgh .ch:not(.c) { transform: rotate(180deg); }
.gb-qbar { top: calc(64px + var(--leg-h, 0px)); max-height: calc(100% - 118px - var(--pane-total, 0px) - var(--leg-h, 0px)); }

.gb-indh[data-drag], .isd-h[data-drag] { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.gb-indp.dragging, .gb-isd.dragging { transition: none; box-shadow: 0 26px 60px -14px rgba(0,0,0,0.7); }
.gb-indp.dragging .gb-indh, .gb-isd.dragging .isd-h { cursor: grabbing; }
.gb-indh { justify-content: flex-start; gap: 10px; padding-left: 12px; }
.gb-indh .gb-tp { margin-left: auto; }
.gb-grip { display: grid; grid-template-columns: repeat(2, 3px); gap: 3px; flex: 0 0 auto; opacity: .45; }
.gb-grip i { width: 3px; height: 3px; border-radius: 50%; background: var(--mut); }
[data-drag]:hover .gb-grip { opacity: .8; }

.gb-il { display: flex; align-items: center; padding: 0 10px 0 0; border: none; background: none; cursor: default; }
.gb-il:hover { background: rgba(255,255,255,0.05); }
.gb-ilm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 9px 6px 9px 16px; border: none; background: none; color: var(--txt); text-align: left; cursor: pointer; }
.gb-if { flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: none; border-radius: 7px; background: none; color: var(--dim); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .12s, color .12s; }
.gb-if svg { width: 16px; height: 16px; }
.gb-il:hover .gb-if, .gb-if.on, .gb-if:focus-visible { opacity: 1; }
.gb-if.on { color: #ffc94d; } .gb-if.on svg { fill: currentColor; }
.gb-if:hover { color: #ffc94d; }
@media (hover: none) { .gb-if { opacity: .7; } .gb-if.on { opacity: 1; } }

.gb-isd { position: absolute; z-index: 46; top: 118px; left: 56px; width: min(320px, calc(100% - 64px)); max-height: calc(100% - 90px); display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: rgba(20,26,34,0.94); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 18px 44px -12px rgba(0,0,0,0.65); }
.gb-isd[hidden] { display: none; }
.isd-h { display: flex; align-items: center; gap: 10px; padding: 12px 10px 8px 12px; }
.isd-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.isd-t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.isd-t b { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.isd-t small { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.isd-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.isd-tabs button { position: relative; padding: 9px 11px 11px; border: none; background: none; color: var(--mut); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.isd-tabs button:hover, .isd-tabs button.on { color: var(--txt); }
.isd-tabs button.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: #3b82f6; }
.isd-b { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 6px; }
.isd-r { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.isd-r.col { flex-direction: column; align-items: stretch; gap: 8px; }
.isd-r label { font-size: 12.5px; color: var(--mut); }
.isd-r.col label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.isd-st { display: flex; align-items: center; height: 32px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2); overflow: hidden; }
.isd-st button { width: 30px; height: 100%; padding: 0; border: none; background: none; color: var(--mut); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.isd-st button:hover { color: var(--txt); background: rgba(255,255,255,0.08); }
.isd-st button svg { width: 14px; height: 14px; }
.isd-st input { width: 58px; height: 100%; padding: 0; border: none; border-left: 1px solid rgba(255,255,255,0.08); border-right: 1px solid rgba(255,255,255,0.08); border-radius: 0; background: none; color: var(--txt); text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.isd-st input::-webkit-outer-spin-button, .isd-st input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.isd-st input:focus { outline: none; background: rgba(59,130,246,0.1); }
.isd-sws { display: flex; flex-wrap: wrap; gap: 8px; }
.isd-sw { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); cursor: pointer; transition: transform .12s, box-shadow .15s; }
.isd-sw:hover { transform: scale(1.1); }
.isd-sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
.isd-sw.cust { background: conic-gradient(from 0deg, #f87171, #fbbf24, #4ade80, #22d3ee, #818cf8, #e879f9, #f87171); position: relative; }
.isd-sw.cust.on { background: var(--c); }
.isd-sw.cust:not(.on)::after { content: '+'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 500; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.isd-ws { display: flex; gap: 6px; }
.isd-ws button { flex: 1; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.09); background: rgba(255,255,255,0.04); color: var(--mut); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.isd-ws button:hover { color: var(--txt); background: rgba(255,255,255,0.08); }
.isd-ws button.on { color: var(--txt); border-color: #3b82f6; background: rgba(59,130,246,0.14); }
.isd-f { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid rgba(255,255,255,0.07); }
.isd-f button { height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: var(--txt); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.isd-f button:hover { background: rgba(255,255,255,0.1); }
.isd-f .ok { border-color: transparent; background: #3b82f6; color: #fff; }
.isd-f .ok:hover { background: #4d8ff8; }
.gb-cpick { z-index: 60; }
html[data-theme="light"] .otc .isd-sw, html[data-theme="light"] .otc .isd-dot, html[data-theme="light"] .otc .gb-lg .lc { filter: saturate(0.87) contrast(1.0753) hue-rotate(180deg) invert(1); }

/* ── Проход по шрифтам терминала: полужирное вместо жирного ── */
.gb-float .nmrow b { font-size: 17px; font-weight: 500; letter-spacing: 0; }
.gb-float .pay, .gb-float .gb-price { font-weight: 500; }
.gb-otc { font-weight: 500; }
.gb-btn { font-weight: 500; letter-spacing: 0.05em; }
.otc .cx-go.up, .otc .cx-go.dn { font-weight: 500; letter-spacing: 0.06em; }
.gb-session .val, .gb-yield b, .gb-input input, .gb-timer b, .gb-duel-net, .gb-tpnl, .gb-hrow b, .gb-toolp-h b, .gb-card h3, .otcr-net, .gb-indh b { font-weight: 500; }
.gb-cnt, .gb-arow .as b { font-weight: 500; }

/* ── Шаблоны ── */
.gb-indhb { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.gb-indh .gb-indhb .gb-tp { margin-left: 0; }
.ds-ha button svg { width: 16px; height: 16px; }
.gb-tpl { position: absolute; z-index: 70; width: 252px; padding: 12px 10px 10px; border-radius: 14px; background: rgba(22,28,36,0.97); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 18px 44px -12px rgba(0,0,0,0.65); }
.gb-tpl[hidden] { display: none; }
.tpl-h { margin: 0 4px 8px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.tpl-l { max-height: 190px; overflow-y: auto; margin: 0 -4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent; }
.tpl-i { display: flex; align-items: center; border-radius: 9px; }
.tpl-i:hover { background: rgba(255,255,255,0.06); }
.tpl-a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 7px 8px; border: none; background: none; color: var(--txt); text-align: left; cursor: pointer; }
.tpl-a b { max-width: 100%; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-a small { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); }
.tpl-c { width: 8px; height: 8px; border-radius: 50%; }
.tpl-s, .tpl-x { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: none; border-radius: 7px; background: none; color: var(--dim); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tpl-s svg, .tpl-x svg { width: 14px; height: 14px; }
.tpl-s:hover { color: #ffc94d; } .tpl-s.on { color: #ffc94d; } .tpl-s.on svg { fill: currentColor; }
.tpl-x:hover { color: #ff6b85; background: rgba(255,77,109,0.14); }
.tpl-e { margin: 2px 4px 8px; font-size: 12px; line-height: 1.45; color: var(--mut); }
.tpl-n { display: flex; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.tpl-n input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2); color: var(--txt); font-size: 12.5px; }
.tpl-n input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.tpl-n input.err { border-color: #ff6b85; }
.tpl-n input.err::placeholder { color: #ff8da1; }
.tpl-n button { height: 32px; padding: 0 12px; border: none; border-radius: 9px; background: #3b82f6; color: #fff; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.tpl-n button:hover { background: #4d8ff8; }

/* Несколько экземпляров одного индикатора: счётчик в списке, подсказка, выбор актива в настройках */
.gb-indhint { padding: 12px 16px 6px; font-size: 12px; line-height: 1.5; color: var(--dim); }
.gb-il em.cnt { color: #7fb2ff; background: rgba(59,130,246,0.16); font-weight: 600; }
.isd-sel { height: 32px; min-width: 128px; padding: 0 28px 0 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; -webkit-appearance: none; appearance: none; color: var(--txt); font-size: 13px; cursor: pointer; }
.isd-sel:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.isd-sel option { background: #141a22; color: #e8ecf2; }
.isd-f button[data-act="isddup"] { padding: 0 12px; }

/* Заметки на графике и алерты */
.gb-txin { position: absolute; z-index: 9; width: 190px; height: 30px; padding: 0 10px; border-radius: 9px; border: 1px solid #6ea8ff; background: var(--panel2); color: var(--txt); font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 0 0 3px rgba(110,168,255,0.18); }
.gb-txin:focus { outline: none; }
.ds-al { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--mut); }
.ds-al .ds-link { white-space: nowrap; }

/* Повтор истории: панель управления и выбор старта */
.gb-rp { position: absolute; z-index: 9; left: 50%; bottom: calc(34px + var(--pane-total, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 4px; max-width: calc(100% - 16px); padding: 5px 6px 5px 10px; border-radius: 14px; background: rgba(20,26,34,0.92); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 14px 34px -10px rgba(0,0,0,0.6); }
.gb-rp[hidden] { display: none; }
.gb-rp button { flex: 0 0 auto; height: 34px; min-width: 34px; padding: 0 6px; border: none; border-radius: 10px; background: none; color: var(--txt); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 500; transition: background .15s; }
.gb-rp button svg { width: 18px; height: 18px; }
.gb-rp button:hover { background: rgba(255,255,255,0.09); }
.gb-rp .rp-play { background: rgba(110,168,255,0.2); color: #9cc4ff; }
.gb-rp .rp-play:hover { background: rgba(110,168,255,0.3); }
.gb-rp .rp-sp { min-width: 42px; color: var(--mut); font-variant-numeric: tabular-nums; }
.gb-rp .rp-x { padding: 0 11px; margin-left: 2px; color: #ff8da1; }
.gb-rp .rp-x:hover { background: rgba(255,77,109,0.14); }
.gb-rp .rp-tag { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: 12px; font-weight: 500; color: #ffc94d; }
.gb-rp .rp-tag svg { width: 16px; height: 16px; }
.gb-rp .rp-time { margin: 0 6px; font-size: 12.5px; color: var(--mut); font-variant-numeric: tabular-nums; }
.gb-replay .gb-btn { filter: grayscale(0.7); }
.gb-replay .gb-wrap::after { content: ''; position: absolute; inset: 0; border: 2px solid rgba(255,201,77,0.35); border-radius: inherit; pointer-events: none; z-index: 6; }
@media (max-width: 420px) { .gb-rp .rp-tag { display: none; } .gb-rp .rp-time { display: none; } }
.gb-rpop { position: absolute; z-index: 70; width: 268px; padding: 12px 10px 10px; border-radius: 14px; background: rgba(22,28,36,0.97); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 18px 44px -12px rgba(0,0,0,0.65); }
.gb-rpop[hidden] { display: none; }
.rp-it { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid rgba(255,255,255,0.09); border-radius: 12px; background: rgba(255,255,255,0.04); color: var(--txt); text-align: left; cursor: pointer; font: inherit; }
.rp-it:hover { background: rgba(255,255,255,0.08); }
.rp-it svg { width: 22px; height: 22px; color: #ffc94d; flex: 0 0 auto; }
.rp-it span { display: flex; flex-direction: column; gap: 2px; }
.rp-it b { font-size: 13px; font-weight: 500; } .rp-it small { font-size: 11.5px; color: var(--dim); }
.rp-sec { margin: 12px 4px 7px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.rp-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rp-chips button { height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--txt); font: inherit; font-size: 12.5px; padding: 0 2px; white-space: nowrap; cursor: pointer; }
.rp-chips button:hover { border-color: rgba(255,201,77,0.5); background: rgba(255,201,77,0.08); }
.rp-note { margin: 10px 4px 0; font-size: 11.5px; line-height: 1.45; color: var(--dim); }

/* ── Широкий экран: сделки стоят в правой колонке под кнопками «Вверх / Вниз» ── */
.gb-rl { display: none; }
.gb-empty b { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 500; color: var(--mut); }
.gb-empty { line-height: 1.45; }
@media (min-width: 720px) {
    .otc.gb-docked .gb-tradesbtn { display: none; }
    .otc.gb-docked .gb-toolsbtn { width: auto; flex: 1 1 auto; padding: 0 12px; }
    .otc.gb-docked .gb-toolsbtn .gb-rl { display: inline; }
    .otc.gb-docked .gb-panel > .gb-trades { position: static; flex: 1 1 auto; min-height: 172px; max-height: none; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: none; animation: none; overflow: hidden; }
    .otc.gb-docked .gb-trades-h { padding: 8px 8px 6px; }
    .otc.gb-docked .gb-trades-h > .gb-icon { display: none; }


    .otc.gb-docked .gb-trades-body { flex: 1 1 auto; min-height: 0; padding: 0 8px 8px; }
    .otc.gb-docked .gb-trades .gb-tcard, .otc.gb-docked .gb-trades .gb-hrow { background: var(--panel2); }
    .otc.gb-docked .gb-empty { margin: auto 0; padding: 14px 10px; text-align: center; }
}
.ds-f1 { padding-bottom: 6px !important; border-top: 1px solid var(--line); }
.ds-f1 + .ds-f { border-top: 0 !important; padding-top: 0 !important; }

/* ── Сделки: вкладки с бегущей чертой, итог, пустое состояние ── */
.gb-tt { position: relative; flex: 1 1 auto; display: flex; border-bottom: 1px solid var(--line); }
.gb-tt button { flex: 1 1 0; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; color: var(--mut); font-size: 12px; font-weight: 500; letter-spacing: 0.01em; cursor: pointer; transition: color .15s; }
.gb-tt button:hover { color: var(--txt); }
.gb-tt button.on { color: var(--txt); }
.gb-tt i { position: absolute; bottom: -1px; left: calc(var(--i, 0) * 50%); right: calc((1 - var(--i, 0)) * 50%); height: 2px; border-radius: 2px; background: var(--txt); box-shadow: 0 0 10px rgba(255,255,255,0.45); }
/* Черта-стирание: анимация задаётся из скрипта */
.gb-tt i { border-radius: 999px; will-change: transform; }
.gb-tt button { transition: color .2s, transform .35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.gb-tt button.on { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .gb-tt i, .gb-tt button { transition: none !important; } }
.gb-tt .gb-cnt { margin: 0; min-width: 18px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--line2); font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; }
.gb-tt .gb-cnt:empty { display: none; }
.gb-tsum { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 14px 2px; font-size: 11px; color: var(--mut); }
.gb-tsum b { font-size: 14px; font-weight: 500; }
.gb-tsum b.up { color: var(--up); } .gb-tsum b.dn { color: var(--dn); }
.gb-empty { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gb-eic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); color: var(--dim); }
.gb-eic svg { width: 18px; height: 18px; }
.gb-trades-h { padding-bottom: 0 !important; }
.gb-trades-h > .gb-icon { margin-left: 6px; }
.gb-trades-body { padding-top: 8px !important; }
/* Картинка Классики: лёгкая колонка таймфреймов, плашка входа */
.spk-lvl.en { color: #a9c8ff; border-color: rgba(143, 184, 255, 0.7); box-shadow: 0 0 12px rgba(111, 160, 255, 0.28); }
.spk-tf span { background: transparent; border-color: transparent; color: rgba(159, 180, 216, 0.75); }
.spk-tf span.on { color: #bff4ff; background: rgba(34, 230, 255, 0.12); border: 1px solid rgba(34, 230, 255, 0.75); box-shadow: 0 0 14px rgba(34, 230, 255, 0.35); }
@keyframes spkTf { 0%, 100% { box-shadow: 0 0 10px rgba(34, 230, 255, 0.3); } 50% { box-shadow: 0 0 18px rgba(34, 230, 255, 0.6); } }
/* Картинка Классики, вариант с карточкой позиции */
.spk-pair i { font-style: normal; font-size: clamp(8px, 2.6cqw, 10.5px); font-weight: 700; color: #7fe9ff; letter-spacing: 0.04em; margin-left: -0.4cqw; }
.spk-tk { position: absolute; right: 3%; top: 8%; bottom: 8%; width: 33%; display: flex; flex-direction: column; gap: 1.2cqw; padding: 2.4cqw 2.6cqw; border-radius: 3cqw; background: rgba(6, 16, 34, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgba(120, 165, 255, 0.28); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.spk-tk-h { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1.2cqw; border-bottom: 1px solid rgba(120, 165, 255, 0.16); }
.spk-tk-h .dir { padding: 0.5cqw 2cqw; border-radius: 999px; font-size: clamp(8px, 2.6cqw, 10.5px); font-weight: 800; letter-spacing: 0.06em; color: #04261a; background: linear-gradient(135deg, #5dffb8, #19e68c); box-shadow: 0 0 12px rgba(25, 230, 140, 0.45); }
.spk-tk-h em { font-style: normal; font-size: clamp(9px, 3cqw, 12px); font-weight: 700; color: #cfe0ff; }
.spk-tk-r { display: flex; align-items: baseline; justify-content: space-between; gap: 1cqw; font-size: clamp(8px, 2.6cqw, 10.5px); color: #8ea3c9; }
.spk-tk-r b { font-weight: 700; font-size: clamp(9px, 3cqw, 12px); color: #e6eeff; font-variant-numeric: tabular-nums; }
.spk-tk-r.sl b { color: #ff6f8a; } .spk-tk-r.tp b { color: #3df0a4; }
.spk-tk-pnl { margin-top: auto; padding-top: 1.2cqw; border-top: 1px solid rgba(120, 165, 255, 0.16); display: flex; flex-direction: column; gap: 0.2cqw; }
.spk-tk-pnl small { font-size: clamp(7.5px, 2.3cqw, 9.5px); letter-spacing: 0.08em; text-transform: uppercase; color: #8ea3c9; }
.spk-tk-pnl b { font-size: clamp(14px, 6cqw, 23px); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #3df0a4; text-shadow: 0 0 14px rgba(61, 240, 164, 0.45); transition: color .2s; }
.spk-tk-pnl b.dn { color: #ff6f8a; text-shadow: 0 0 14px rgba(255, 111, 138, 0.45); }
/* Карточка позиции: настоящее стекло, сквозь него видны зоны и линии */
.spk-tk { background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 55%, rgba(120, 165, 255, 0.07)); -webkit-backdrop-filter: blur(10px) saturate(1.6) brightness(1.1); backdrop-filter: blur(10px) saturate(1.6) brightness(1.1); border: 1px solid rgba(255, 255, 255, 0.24); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 18px rgba(150, 190, 255, 0.07); }
.spk-tk-h, .spk-tk-pnl { border-color: rgba(255, 255, 255, 0.14); }
.spk-tk-r { color: #b4c4e4; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }
.spk-tk-r b, .spk-tk-pnl b { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
/* Ещё прозрачнее */
.spk-tk { background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 60%, rgba(120, 165, 255, 0.03)); -webkit-backdrop-filter: blur(5px) saturate(1.5); backdrop-filter: blur(5px) saturate(1.5); border-color: rgba(255, 255, 255, 0.2); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.spk-tk-r { color: #c6d3ee; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.5); }
.spk-tk-r b, .spk-tk-pnl b { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.5); }
.spk-tk-pnl small { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
/* Почти невидимое стекло: только рамка, блик и лёгкое размытие */
.spk-tk { background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 60%); -webkit-backdrop-filter: blur(2.5px) saturate(1.4); backdrop-filter: blur(2.5px) saturate(1.4); border-color: rgba(255, 255, 255, 0.17); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
/* Тень под карточкой позиции: близкая плотная и длинная мягкая с холодным оттенком */
.spk-tk { top: 7%; bottom: 12%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 10px 18px -4px rgba(0, 0, 0, 0.5), 0 22px 34px -8px rgba(2, 6, 20, 0.95), 0 20px 44px -12px rgba(80, 140, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
/* LONG в стиле стекла: прозрачная заливка, зелёная рамка, свечение текста */
.spk-tk-h .dir { color: #5dffb8; background: linear-gradient(135deg, rgba(25, 230, 140, 0.22), rgba(25, 230, 140, 0.06)); border: 1px solid rgba(93, 255, 184, 0.55); box-shadow: 0 0 12px rgba(25, 230, 140, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18); text-shadow: 0 0 8px rgba(25, 230, 140, 0.7), 0 1px 4px rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
/* LONG без плашки: зелёная стрелка и текст прямо на стекле */
.spk-tk-h .dir { display: inline-flex; align-items: center; gap: 1.2cqw; padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; font-size: clamp(9px, 3cqw, 12px); font-weight: 800; letter-spacing: 0.1em; color: #5dffb8; text-shadow: 0 0 10px rgba(25, 230, 140, 0.65), 0 1px 5px rgba(0, 0, 0, 0.6); }
.spk-tk-h .dir::before { content: ''; width: 0; height: 0; border-left: 0.9cqw solid transparent; border-right: 0.9cqw solid transparent; border-bottom: 1.6cqw solid #5dffb8; filter: drop-shadow(0 0 4px rgba(25, 230, 140, 0.8)); }
/* Логотипы активов сохраняют свои цвета и в светлой теме (страница там инвертируется целиком) */
html[data-theme="light"] .glogo { filter: saturate(0.87) contrast(1.0753) hue-rotate(180deg) invert(1) !important; }

/* ── Брокер: шапка, пополнение и вывод ── */
.gb-broker-hdr { display: flex; align-items: center; gap: 10px; text-align: right; }
.gb-bb-info { line-height: 1.15; }
.gb-bb-info .lbl { display: block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim, #8b95a5); font-weight: 500; }
.gb-bb-info .val { font-size: 17px; font-weight: 700; color: var(--green, #22c37f); font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.gb-bb-actions { display: flex; align-items: center; gap: 6px; }
.gb-bb-wdr { display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); color: #e2e8f0; font-size: 12px; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.14); cursor: pointer; transition: transform 0.12s, background 0.12s, color 0.12s; }
.gb-bb-wdr:hover { background: rgba(255, 255, 255, 0.13); color: #fff; }
.gb-bb-wdr:active { transform: scale(0.96); opacity: 0.9; }
.gb-bb-dep { display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 8px; background: linear-gradient(135deg, #00ffa3, #00d287); color: #07090e; font-size: 12px; font-weight: 700; border: none; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 255, 163, 0.25); transition: transform 0.12s, opacity 0.12s; }
.gb-bb-dep:active { transform: scale(0.96); opacity: 0.9; }
@media (max-width: 480px) {
    .gb-broker-hdr { gap: 6px; }
    .gb-bb-actions { gap: 4px; }
    .gb-bb-dep, .gb-bb-wdr { padding: 5px 8px; font-size: 11px; }
    .gb-bb-dep svg, .gb-bb-wdr svg { width: 11px; height: 11px; }
}

/* ── Модальное окно крипто-депозита ── */
.bdep-overlay { position: fixed; inset: 0; z-index: 10099; background: rgba(0, 0, 0, 0.75); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: bdepFade .2s ease-out; font-family: inherit; color: #fff; }
@keyframes bdepFade { from { opacity: 0; } to { opacity: 1; } }
.bdep-sheet { width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; background: #0c0f17; border-top: 1px solid rgba(255, 255, 255, 0.12); border-radius: 20px 20px 0 0; padding: 20px 18px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,0.7); animation: bdepSlide .24s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes bdepSlide { from { transform: translateY(40px); } to { transform: translateY(0); } }
.bdep-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.bdep-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.bdep-head span { display: block; margin-top: 2px; font-size: 12px; color: #8b95a5; }
.bdep-x { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); color: #8b95a5; font-size: 14px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.bdep-x:active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.bdep-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; background: rgba(0, 255, 163, 0.1); border: 1px solid rgba(0, 255, 163, 0.25); color: #00ffa3; font-size: 11px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.bdep-qr-wrap { display: flex; justify-content: center; margin: 10px 0 14px; }
.bdep-qr-wrap img { width: 180px; height: 180px; border-radius: 12px; background: #fff; padding: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.bdep-box { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.bdep-sublabel { display: block; font-size: 11px; color: #8b95a5; margin-bottom: 6px; }
.bdep-addr-row { display: flex; align-items: center; gap: 8px; }
.bdep-code { flex: 1; min-width: 0; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #e2e8f0; word-break: break-all; line-height: 1.35; user-select: all; }
.bdep-cp { flex-shrink: 0; padding: 6px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s; }
.bdep-cp.ok { background: rgba(0, 255, 163, 0.16); color: #00ffa3; border-color: rgba(0, 255, 163, 0.4); }
.bdep-note { font-size: 12px; color: #cbd5e1; margin-bottom: 8px; }
.bdep-hint { font-size: 11.5px; color: #8b95a5; line-height: 1.45; margin-bottom: 14px; padding: 8px 10px; background: rgba(255,255,255,0.02); border-radius: 8px; border-left: 2px solid #00ffa3; }
.bdep-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.bdep-field { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.bdep-field label { font-size: 11.5px; color: #8b95a5; font-weight: 500; }
.bdep-field label small { color: #5f6877; font-size: 10.5px; margin-left: 4px; }
.bdep-field input { width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 13.5px; font-family: inherit; }
.bdep-field input:focus { outline: none; border-color: #00ffa3; box-shadow: 0 0 0 2px rgba(0, 255, 163, 0.15); }
.bdep-btn-pay { width: 100%; height: 44px; margin-top: 6px; border: none; border-radius: 10px; background: linear-gradient(135deg, #00ffa3, #00d287); color: #07090e; font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity 0.15s, transform 0.12s; }
.bdep-btn-pay:active { transform: scale(0.98); opacity: 0.9; }
.bdep-empty { padding: 30px 10px; text-align: center; color: #8b95a5; font-size: 13px; line-height: 1.5; }
.bdep-done { padding: 24px 10px; text-align: center; }
.bdep-ok-ring { width: 50px; height: 50px; border-radius: 50%; background: rgba(0, 255, 163, 0.15); color: #00ffa3; border: 2px solid #00ffa3; display: grid; place-items: center; font-size: 22px; font-weight: 800; margin: 0 auto 14px; }
.bdep-done h4 { margin: 0 0 8px; font-size: 18px; color: #fff; font-weight: 700; }
.bdep-done p { margin: 0 0 18px; font-size: 13px; color: #94a3b8; line-height: 1.5; }
