/* QUANTUM ELITE — "Obsidian Crystal"
   Materials from the logo: black marble, crystal facets, platinum, ice light.
   UI chrome is platinum/ice; colour (aquamarine / ruby) is reserved for the market. */
:root {
  --obsidian: #04060A;
  --chart: #05080D;
  --glass: rgba(12, 17, 26, .82);
  --glass-2: rgba(20, 27, 40, .72);
  --line: rgba(141, 153, 171, .14);
  --line-2: rgba(169, 210, 255, .22);
  --platinum: #E6ECF3;
  --steel: #8D99AB;
  --dim: #5D6878;
  --ice: #A9D2FF;
  --bull: #22C38E;
  --bear: #F23645;
  --gold: #E7C98B;
  --accent: var(--ice);
  --cut: 10px;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  --edge: linear-gradient(150deg, rgba(230,236,243,.42), rgba(141,153,171,.08) 38%, rgba(141,153,171,.05) 62%, rgba(169,210,255,.34));
  --f-mark: "Michroma", "Eurostile", sans-serif;
  --f-ui: "Sora", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--platinum); font: 13px/1.45 var(--f-ui); display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(1200px 500px at 70% -10%, rgba(169,210,255,.07), transparent 60%), var(--obsidian);
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 1.5px solid var(--ice); outline-offset: 2px; }
[hidden] { display: none !important; }
.pos { color: var(--bull); } .neg { color: var(--bear); }

/* faceted glass: element = silver edge, ::before = glass body (1px inset) */
.facet { position: relative; clip-path: var(--chamfer); background: var(--edge); isolation: isolate; }
.facet::before { content: ""; position: absolute; inset: 1px; clip-path: var(--chamfer); background: var(--glass); z-index: -1; }

/* ───────── command bar ───────── */
.bar {
  position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: calc(9px + env(safe-area-inset-top, 0px)) 14px 9px;
  background: linear-gradient(180deg, rgba(14,19,29,.92), rgba(8,11,17,.92));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(169,210,255,.45) 18%, rgba(230,236,243,.25) 50%, rgba(169,210,255,.45) 82%, transparent); }
.brand { display: flex; align-items: center; gap: 11px; margin-right: 6px; }
.brand .logo { width: 34px; height: 34px; flex: none; border-radius: 8px; box-shadow: 0 0 0 1px rgba(169,210,255,.25), 0 0 18px rgba(120,170,255,.22); }
.brand b { display: block; font: 13px/1 var(--f-mark); letter-spacing: .2em; background: linear-gradient(180deg, #FFFFFF 10%, #C9D3DF 55%, #7F8B9C 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; font: 500 8.5px/1 var(--f-ui); letter-spacing: .42em; color: var(--steel); margin-top: 5px; }

.symbtn { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px 0 5px; border: 0; cursor: pointer; font: 600 13px var(--f-ui); letter-spacing: .02em; --cut: 7px; }
.coin { position: relative; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font: 600 10px var(--f-ui); color: #0A0E15; background: linear-gradient(145deg, #F4F7FB, #9BA7B8); overflow: hidden; }
.coin img { position: absolute; inset: 0; width: 100%; height: 100%; background: #0A0E15; }
.coin.img { background: none; }
.sym-name { display: flex; align-items: center; gap: 10px; }
.sym-name .coin { width: 22px; height: 22px; }
.symbtn svg { color: var(--steel); }
.symbtn:hover::before { background: var(--glass-2); }

.tfs { position: relative; display: flex; height: 34px; padding: 3px; --cut: 7px; }
.tfs .thumb { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); background: linear-gradient(180deg, rgba(169,210,255,.22), rgba(169,210,255,.08)); box-shadow: inset 0 -2px 0 var(--accent); transition: left .28s cubic-bezier(.2,.8,.2,1), width .28s cubic-bezier(.2,.8,.2,1); }
.tfs button { position: relative; background: transparent; border: 0; padding: 0 12px; cursor: pointer; font: 600 12px var(--f-ui); color: var(--steel); }
.tfs button[aria-pressed="true"] { color: var(--platinum); }

.quote { display: flex; align-items: baseline; gap: 9px; }
.quote .px { font: 600 17px var(--f-ui); letter-spacing: .01em; }
.quote .chg { font: 500 12px var(--f-ui); }
.spacer { flex: 1; }
.status { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--steel); }
.status i { width: 6px; height: 6px; transform: rotate(45deg); background: var(--dim); }
.status[data-state="live"] i { background: var(--bull); box-shadow: 0 0 10px var(--bull); }
.status[data-state="error"] i { background: var(--bear); }
.iconbtn { height: 34px; border: 0; cursor: pointer; padding: 0 12px; font: 500 12px var(--f-ui); color: var(--steel); display: flex; gap: 7px; align-items: center; --cut: 7px; position: relative; clip-path: var(--chamfer); background: var(--edge); isolation: isolate; }
.iconbtn::before { content: ""; position: absolute; inset: 1px; clip-path: var(--chamfer); background: var(--glass); z-index: -1; }
.iconbtn:hover { color: var(--platinum); }
.iconbtn:hover::before { background: var(--glass-2); }

/* ───────── stage ───────── */
.stage { flex: 1; min-height: 0; display: grid; grid-template-columns: 46px minmax(0, 1fr) 320px; }
.stage.no-rail { grid-template-columns: 46px minmax(0, 1fr); }
.chartwrap { position: relative; min-width: 0; min-height: 0; background: radial-gradient(900px 420px at 50% 0%, rgba(169,210,255,.045), transparent 70%), var(--chart); }
#chart { position: absolute; inset: 0; }
.msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--steel); pointer-events: none; padding: 16px; background: rgba(4,6,10,.55); }
.msg strong { display: block; color: var(--platinum); font-weight: 600; margin-bottom: 4px; }
.pending { position: absolute; top: 38px; left: 50%; transform: translateX(-50%); z-index: 5; pointer-events: none; font: 500 12px var(--f-ui); padding: 7px 14px; --cut: 7px; clip-path: var(--chamfer); background: rgba(10,14,21,.92); color: var(--pc, var(--bull)); white-space: nowrap; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc, var(--bull)) 50%, transparent); }

/* on-chart dashboard (exact TradingView table) */
.tvdash { position: absolute; top: 8px; right: 70px; z-index: 4; pointer-events: none; }
.tvdash table { border-collapse: collapse; border: 1px solid var(--frame, #1F2937); font: 600 9px/1 "Trebuchet MS", Roboto, Arial, sans-serif; letter-spacing: .01em; }
.tvdash td { border: 1px solid var(--grid, #1F2937); padding: 0 6px; height: 20px; text-align: center; white-space: nowrap; }
.tvdash td:first-child { min-width: 76px; }
.tvdash td:last-child { min-width: 44px; font-weight: 700; }
.tvdash tr:first-child td { font-weight: 700; }
.tvdash.folded tr:nth-child(n+3) { display: none; }
.tvdash.compact { top: 6px; transform: scale(.82); transform-origin: top right; pointer-events: auto; cursor: pointer; }
.show-sm { display: none !important; }

/* watermark + splash */
.watermark { position: absolute; left: 50%; top: 46%; width: min(38%, 340px); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .12; pointer-events: none; z-index: 1; mix-blend-mode: screen; border-radius: 50%; -webkit-mask-image: radial-gradient(circle, #000 45%, transparent 72%); mask-image: radial-gradient(circle, #000 45%, transparent 72%); }
.splash { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; transition: opacity .6s ease; }
.splash img { width: min(62vmin, 440px); height: auto; animation: splashIn 1s ease both; }
.splash i { position: absolute; bottom: 12vh; width: 140px; height: 1px; background: linear-gradient(90deg, transparent, var(--ice), transparent); background-size: 200% 100%; animation: splashBar 1.2s linear infinite; }
.splash.out { opacity: 0; pointer-events: none; }
@keyframes splashIn { from { opacity: 0; transform: scale(.965); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes splashBar { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ───────── drawing tools ───────── */
.tools { position: relative; background: linear-gradient(180deg, rgba(12,17,26,.95), rgba(7,10,16,.95)); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; overflow-y: auto; }
.tools::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; background: linear-gradient(180deg, rgba(169,210,255,.3), var(--line) 30%, var(--line) 70%, rgba(169,210,255,.2)); }
.tools button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--steel); cursor: pointer; display: grid; place-items: center; flex: none; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.tools button:hover { background: rgba(169,210,255,.08); color: var(--platinum); }
.tools button[aria-pressed="true"] { background: linear-gradient(160deg, rgba(169,210,255,.28), rgba(169,210,255,.08)); color: #fff; }
.tools hr { width: 20px; border: 0; height: 1px; background: var(--line); margin: 6px 0; }
.tools svg { width: 18px; height: 18px; }

/* ───────── dashboard rail ───────── */
.rail { position: relative; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 14px 14px 0; background: linear-gradient(180deg, rgba(10,14,21,.96), rgba(5,8,13,.98)); }
.rail > * { flex-shrink: 0; }
.rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: linear-gradient(180deg, rgba(169,210,255,.35), var(--line) 25%, var(--line) 75%, rgba(169,210,255,.15)); }

/* Quantum Matrix */
.matrix h3 { margin-bottom: 10px; }
.mx-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mx { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 0 7px; border: 0; cursor: pointer; color: var(--platinum); background: rgba(141,153,171,.07); clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); transition: background .2s; }
.mx:hover { background: rgba(169,210,255,.1); }
.mx.cur { background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 22%, transparent), rgba(141,153,171,.05)); box-shadow: inset 0 -2px 0 var(--mc); }
.mx-tf { font: 600 11px var(--f-ui); color: var(--steel); }
.mx.cur .mx-tf { color: var(--platinum); }
.mx-dir { font-size: 13px; line-height: 1; color: var(--mc); text-shadow: 0 0 10px var(--mc); }
.mx-age { font: 500 10.5px var(--f-ui); color: var(--steel); }
.mx-dots { display: flex; gap: 2px; }
.mx-dots i { width: 4px; height: 4px; transform: rotate(45deg); background: rgba(141,153,171,.28); }
.mx-dots i.on { background: var(--mc); }
.matrix-bar { display: none; }

/* hero: the signal crystal */
.hero { padding: 16px 16px 15px; --cut: 16px; overflow: hidden; }
.hero::before { background: radial-gradient(140% 90% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%), var(--glass); }
.hero-top { display: flex; align-items: center; gap: 12px; }
.hexbadge { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 55%, transparent)); }
.state { font: 21px/1 var(--f-mark); letter-spacing: .14em; color: var(--accent); }
.state-sub { margin-top: 6px; color: var(--steel); font-size: 11.5px; }
.pnl-label { margin-top: 16px; color: var(--steel); font-size: 11.5px; }
.pnl { font: 600 34px/1.05 var(--f-ui); letter-spacing: -.01em; margin-top: 2px; }
.pnl.pos { text-shadow: 0 0 22px rgba(34,195,142,.35); }
.pnl.neg { text-shadow: 0 0 22px rgba(242,54,69,.3); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.kv span { display: block; color: var(--steel); font-size: 11px; }
.kv b { display: block; font: 600 13.5px var(--f-ui); margin-top: 2px; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.22) 48%, color-mix(in srgb, var(--accent) 35%, transparent) 52%, transparent 65%); transform: translateX(-120%); }
.hero.flash::after { animation: sweep 1.3s cubic-bezier(.3,.6,.2,1) 2; }
@keyframes sweep { to { transform: translateX(120%); } }

/* target ladder */
.panel { padding: 14px 16px; }
.panel h3 { margin: 0 0 12px; font: 600 12px var(--f-ui); color: var(--platinum); display: flex; justify-content: space-between; align-items: baseline; }
.panel h3 small { font: 500 11px var(--f-ui); color: var(--steel); }
.ladder { position: relative; padding-left: 26px; }
.ladder .track { position: absolute; left: 8px; top: 9px; bottom: 9px; width: 2px; background: linear-gradient(180deg, rgba(231,201,139,.5), rgba(141,153,171,.25) 40%, rgba(141,153,171,.25) 75%, rgba(242,54,69,.45)); }
.ladder .fill { position: absolute; left: 8px; width: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); transition: top .5s ease, height .5s ease; }
.rung { position: relative; display: flex; justify-content: space-between; align-items: center; height: 30px; }
.rung::before { content: ""; position: absolute; left: -22px; top: 50%; width: 10px; height: 10px; transform: translateY(-50%) rotate(45deg); background: var(--chart); border: 1px solid rgba(141,153,171,.55); }
.rung .nm { font: 600 12px var(--f-ui); color: var(--steel); }
.rung .nm small { font-weight: 500; color: var(--dim); margin-left: 6px; }
.rung .pr { font: 500 12.5px var(--f-ui); color: var(--steel); }
.rung.hit::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--accent); }
.rung.hit .nm, .rung.hit .pr { color: var(--platinum); }
.rung.next::before { border-color: var(--accent); animation: beacon 1.8s ease-in-out infinite; }
.rung.next .nm { color: var(--platinum); }
.rung.next .pr { color: var(--platinum); font-weight: 600; }
.rung.gold.hit::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 12px var(--gold); }
.rung.gold.hit .pr { color: var(--gold); }
.rung.entry::before { width: 12px; height: 12px; left: -23px; background: var(--platinum); border-color: var(--platinum); }
.rung.entry .nm, .rung.entry .pr { color: var(--platinum); }
.rung.sl::before { border-color: var(--bear); }
.rung.sl .pr { color: var(--bear); }
@keyframes beacon { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.now { position: absolute; left: -30px; right: 0; height: 0; transition: top .5s ease; pointer-events: none; z-index: 2; }
.now i { position: absolute; left: 3px; top: -5px; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid var(--platinum); filter: drop-shadow(0 0 6px rgba(230,236,243,.7)); }
.now span { position: absolute; left: 58%; transform: translateX(-50%); top: -9px; font: 600 11px/18px var(--f-ui); padding: 0 7px; background: var(--platinum); color: #06090E; clip-path: polygon(5px 0, 100% 0, 100% 100%, 0 100%, 0 5px); }
.now::after { content: ""; position: absolute; left: 14px; right: 0; top: 0; border-top: 1px dashed rgba(230,236,243,.3); z-index: -1; }

/* impulse: six facets */
.impulse { display: flex; align-items: center; gap: 14px; }
.facets { display: flex; gap: 4px; }
.facets i { width: 17px; height: 20px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(141,153,171,.16); transition: background .4s; }
.facets i.on { background: linear-gradient(180deg, #fff, var(--accent) 60%); }
.impulse .word { font: 600 14px var(--f-ui); }
.impulse .word small { display: block; font: 500 11px var(--f-ui); color: var(--steel); }

/* QUANTUM ELITE TRADING view: overlay parts of the dashboard step aside */
.rail.qb-mode .ov { display: none; }
/* Quantum Elite Trading panel */
.qb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.qb-grid b.gold { color: var(--gold); text-shadow: 0 0 10px rgba(231,201,139,.35); }

.evh { margin-top: 16px !important; }
.evfeed { display: flex; flex-direction: column; gap: 7px; }
.ev { display: grid; grid-template-columns: 10px auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; font-size: 11.5px; }
.ev i { grid-row: 1 / 3; width: 7px; height: 7px; transform: rotate(45deg); background: var(--ec); box-shadow: 0 0 6px var(--ec); align-self: start; margin-top: 5px; }
.ev.bull { --ec: #6FE3FF; } .ev.bear { --ec: #FFB46B; }
.ev-t { color: var(--steel); font-weight: 600; }
.ev-x { color: var(--platinum); }
.ev-p { grid-column: 2 / 4; color: var(--dim); font-size: 10.5px; }

/* record */
.record { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: end; }
.wr { font: 600 30px/1 var(--f-ui); }
.wr small { display: block; font: 500 11px var(--f-ui); color: var(--steel); margin-top: 6px; }
.rec-side { text-align: right; font-size: 11.5px; color: var(--steel); }
.rec-side b { display: block; font: 600 13px var(--f-ui); color: var(--platinum); margin-bottom: 4px; }
.bars20 { display: flex; align-items: center; gap: 3px; height: 50px; margin-top: 12px; position: relative; }
.bars20::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.bars20 i { flex: 1; min-width: 4px; clip-path: polygon(50% 0, 100% 3px, 100% calc(100% - 3px), 50% 100%, 0 calc(100% - 3px), 0 3px); }
.stats2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.foot { margin-top: auto; padding: 4px 4px calc(14px + env(safe-area-inset-bottom, 0px)); font-size: 10.5px; color: var(--dim); line-height: 1.55; }

/* ───────── modals ───────── */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(2,3,6,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: start center; padding: 8vh 16px 16px; }
.dialog { width: min(500px, 100%); max-height: 76vh; display: flex; flex-direction: column; --cut: 16px; }
.dialog header, .drawer header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dialog header b, .drawer header b { font: 12px var(--f-mark); letter-spacing: .2em; color: var(--platinum); }
.dialog > input { margin: 14px 16px; background: rgba(4,6,10,.7); border: 1px solid var(--line-2); padding: 11px 14px; font: 500 14px var(--f-ui); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.dialog > input:focus { outline: none; border-color: var(--ice); }
.list { list-style: none; margin: 0; padding: 0 8px 10px; overflow-y: auto; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 10px; cursor: pointer; font-size: 13px; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.list li:hover, .list li[aria-selected="true"] { background: rgba(169,210,255,.09); }
.list li b { font: 600 13px var(--f-ui); }
.list li small { color: var(--steel); font: 500 11.5px var(--f-ui); }
.list li .on { color: var(--bull); font-size: 12px; }
.list .grp-title { cursor: default; color: var(--steel); font: 600 11px var(--f-ui); padding-top: 14px; }
.list .grp-title:hover { background: none; }

/* ───────── settings drawer ───────── */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(390px, 100%); z-index: 20; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); background: linear-gradient(180deg, rgba(12,17,26,.97), rgba(6,9,14,.98)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.drawer::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: linear-gradient(180deg, rgba(169,210,255,.45), var(--line) 30%, var(--line) 70%, rgba(169,210,255,.25)); }
.drawer[data-open="true"] { transform: none; }
.drawer header { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.drawer .body { overflow-y: auto; padding: 4px 18px 24px; }
.grp { border-bottom: 1px solid var(--line); padding: 13px 0; }
.grp summary { cursor: pointer; font: 600 12.5px var(--f-ui); color: var(--platinum); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.grp summary::-webkit-details-marker { display: none; }
.grp summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--steel); border-bottom: 1.5px solid var(--steel); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.grp[open] summary::after { transform: rotate(-135deg); }
.grp .fields { display: flex; flex-direction: column; gap: 11px; padding-top: 13px; }
.fld { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--steel); }
.fld input[type="number"], .fld select { background: rgba(4,6,10,.7); border: 1px solid var(--line-2); padding: 6px 9px; font: 500 12.5px var(--f-ui); color: var(--platinum); clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
.fld input[type="number"] { width: 86px; text-align: right; }
.fld select { max-width: 200px; }
.fld input[type="color"] { width: 40px; height: 26px; border: 1px solid var(--line-2); background: transparent; padding: 2px; }
.switch { appearance: none; width: 36px; height: 20px; background: rgba(141,153,171,.22); position: relative; cursor: pointer; flex: none; transition: background .2s; clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--steel); transition: left .2s, background .2s; }
.switch:checked { background: rgba(169,210,255,.28); }
.switch:checked::after { left: 20px; background: var(--ice); box-shadow: 0 0 8px var(--ice); }
.drawer .actions { display: flex; gap: 8px; padding-top: 18px; }
.scrim { position: fixed; inset: 0; background: rgba(2,3,6,.5); z-index: 19; }

@media (min-width: 901px) and (max-width: 1240px) {
  .bar { flex-wrap: nowrap; gap: 10px; }
  .brand div, .ind-txt, .hide-sm, #statusTxt { display: none; }
}
/* ───────── phone ───────── */
@media (max-width: 900px) {
  body { overflow: auto; height: auto; }
  .stage, .stage.no-rail { grid-template-columns: minmax(0, 1fr); position: relative; }
  .chartwrap { height: 64vh; min-height: 360px; }
  .rail { grid-column: 1 / -1; padding-bottom: 0; }
  .rail::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(169,210,255,.4), transparent); }
  .tools { position: absolute; z-index: 15; left: 0; top: 0; bottom: 0; height: auto; max-height: 100%; width: 46px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 6px 0 24px rgba(0,0,0,.5); }
  .tools.open { transform: none; }
  .tools button { width: 32px; height: 32px; }
  .spacer, .hide-sm, .brand div, .ind-txt, #statusTxt { display: none; }
  .show-sm { display: flex !important; }
  .iconbtn[aria-pressed="true"] { color: #fff; }
  .iconbtn[aria-pressed="true"]::before { background: rgba(169,210,255,.18); }
  body:has(.stage.no-rail) { overflow: hidden; height: 100%; }
  .stage.no-rail { min-height: 0; }
  .stage.no-rail .chartwrap { height: auto; min-height: 0; }
  .bar { gap: 6px; padding-left: 8px; padding-right: 8px; flex-wrap: nowrap; }
  .brand { margin-right: 0; }
  .brand .logo { width: 30px; height: 30px; }
  .bar .tfs, .status { display: none; }
  .symbtn { padding-right: 9px; font-size: 12.5px; }
  .quote { flex-direction: column; gap: 0; margin-left: auto; align-items: flex-end; }
  .quote .px { font-size: 14px; line-height: 1.1; }
  .quote .chg { font-size: 10.5px; }
  .iconbtn { padding: 0 9px; }
  .matrix-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 6px 8px; background: rgba(8,11,17,.95); border-bottom: 1px solid var(--line); }
  .matrix-bar .mx { grid-template-columns: auto auto auto; grid-template-rows: auto auto; column-gap: 5px; row-gap: 3px; padding: 6px 0; align-items: center; justify-content: center; }
  .matrix-bar .mx-dots { grid-column: 1 / -1; justify-self: center; }
  .rail .matrix { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::after, *::before { transition: none !important; animation: none !important; } }

/* Quantum Alerts toasts */
.toasts { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 11px 14px; background: linear-gradient(180deg, rgba(14,19,27,.96), rgba(7,10,15,.96)); border: 1px solid rgba(169,210,255,.16); box-shadow: 0 12px 40px rgba(0,0,0,.55); backdrop-filter: blur(10px); animation: toastIn .35s cubic-bezier(.2,.8,.2,1); transition: opacity .35s, transform .35s; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast i { flex: 0 0 3px; align-self: stretch; border-radius: 2px; background: var(--ice); box-shadow: 0 0 10px currentColor; }
.toast.bull i { background: #22C38E; color: #22C38E; } .toast.bear i { background: #F23645; color: #F23645; }
.toast.core { border-color: rgba(231,201,139,.45); } .toast.core i { background: var(--gold); color: var(--gold); } .toast.core b { color: var(--gold); letter-spacing: .04em; }
.toast b { display: block; font: 600 13px Sora, sans-serif; color: var(--platinum); }
.toast span { display: block; margin-top: 2px; font: 500 11.5px Sora, sans-serif; color: var(--steel); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.ev.new { animation: evNew 1.6s ease-in-out infinite alternate; border-radius: 4px; }
@keyframes evNew { from { background: transparent; } to { background: rgba(169,210,255,.07); box-shadow: 0 0 0 1px rgba(169,210,255,.12); } }

/* timeframe row for QUANTUM ELITE TRADING (1m – 1W) */
.tfs.wide { max-width: min(520px, 44vw); overflow-x: auto; scrollbar-width: none; }
.tfs.wide::-webkit-scrollbar { display: none; }
.tfs.wide button { padding: 0 8px; font-size: 11.5px; flex: 0 0 auto; }
@media (max-width: 900px) {
  .matrix-bar.tfrow { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .matrix-bar.tfrow::-webkit-scrollbar { display: none; }
  .matrix-bar .tfchip { flex: 0 0 auto; display: block; padding: 7px 12px; font: 600 12px var(--f-ui); color: var(--steel); }
  .matrix-bar .tfchip.cur { color: var(--platinum); }
}

/* TradingView-style timeframe menu */
.tfs .tfmore { padding: 0 9px; color: var(--steel); display: grid; place-items: center; }
.tfs .tfmore:hover { color: var(--platinum); }
.tfmenu { position: fixed; z-index: 60; width: 230px; max-height: min(70vh, 520px); overflow-y: auto; padding: 6px 0; background: linear-gradient(180deg, rgba(16,21,30,.98), rgba(8,11,16,.98)); border: 1px solid rgba(169,210,255,.14); box-shadow: 0 18px 50px rgba(0,0,0,.6); --cut: 10px; }
.tfmenu[hidden] { display: none; }
.tfg + .tfg { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.tfg-h { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; cursor: pointer; padding: 8px 14px; font: 600 10px var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.tfg-h:hover { color: var(--steel); }
.tfg-h svg { transition: transform .2s; transform: rotate(-90deg); }
.tfg.open .tfg-h svg { transform: none; }
.tfi { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px 7px 14px; cursor: pointer; font: 500 13px var(--f-ui); color: var(--platinum); }
.tfi:hover { background: rgba(169,210,255,.07); }
.tfi.cur { background: linear-gradient(90deg, rgba(169,210,255,.16), rgba(169,210,255,.04)); box-shadow: inset 2px 0 0 var(--ice); }
.tfi .star { background: none; border: 0; cursor: pointer; font-size: 14px; line-height: 1; color: rgba(141,153,171,.35); padding: 2px 4px; }
.tfi .star:hover { color: var(--steel); }
.tfi .star.on { color: var(--gold); text-shadow: 0 0 8px rgba(231,201,139,.5); }
@media (max-width: 900px) {
  .matrix-bar .tfmore { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 7px 12px; background: rgba(169,210,255,.06); border: 1px solid var(--line); border-radius: 0; font: 600 11.5px var(--f-ui); color: var(--steel); }
  .tfmenu { width: min(320px, calc(100vw - 16px)); }
}

/* zone context (trend, BTC, first-5m flow) */
.ctxfeed { display: flex; flex-direction: column; gap: 8px; }
.ctxrow { border-left: 2px solid var(--zc); padding-left: 8px; }
.ctxrow.bull { --zc: #22C38E; } .ctxrow.bear { --zc: #F23645; }
.ctx-n { display: block; font-size: 11.5px; color: var(--platinum); }
.ctx-c { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cx { font-style: normal; font: 600 10px var(--f-ui); padding: 2px 6px; border: 1px solid var(--line); color: var(--steel); white-space: nowrap; }
.cx.ok { color: #22C38E; border-color: rgba(34,195,142,.4); }
.cx.wait { color: var(--ice); }

/* QUANTUM SCANNER */
.dialog.scan { width: min(620px, 100%); max-height: 82vh; }
.scan-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 16px 6px; }
.scan-tfs, .scan-flt { display: flex; gap: 4px; flex-wrap: wrap; }
.scan-bar button { background: transparent; border: 1px solid var(--line); color: var(--steel); font: 600 11px var(--f-ui); padding: 5px 10px; cursor: pointer; }
.scan-bar button[aria-pressed="true"] { color: var(--platinum); border-color: var(--ice); background: rgba(169,210,255,.08); }
.scanlist { overflow-y: auto; padding: 4px 10px 10px; margin: 0; list-style: none; }
.scanlist li { display: block; border-left: 2px solid var(--zc); margin-top: 6px; }
.scanlist li.bull { --zc: #22C38E; } .scanlist li.bear { --zc: #F23645; }
.scanlist li.scan-empty { border: 0; color: var(--steel); cursor: default; }
.sc-a, .sc-b { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-b { margin-top: 5px; }
.sc-k { font-size: 12px; color: var(--platinum); }
.sc-a small, .sc-b small { color: var(--steel); font: 500 11px var(--f-ui); }
.cx.play { color: var(--gold); border-color: rgba(231,201,139,.45); }
.scan-foot { padding: 8px 16px 12px; font: 500 10.5px var(--f-ui); color: var(--dim); border-top: 1px solid var(--line); }
a.iconbtn { text-decoration: none; }

/* ── QUANTUM DEPTH 3D ── */
.qd3 { position: fixed; inset: 0; z-index: 900; background: #07090d; color: #E6ECF3; font-family: Sora, sans-serif; }
.qd3 canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.qd3 canvas:active { cursor: grabbing; }
.qd3-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: linear-gradient(#07090d, rgba(7,9,13,0)); pointer-events: none; }
.qd3-top b { letter-spacing: .14em; font-size: 13px; background: linear-gradient(90deg, #E7C98B, #F2F5F9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qd3-sym { color: #8D99AB; font-size: 12px; margin-left: 6px; }
.qd3-x { pointer-events: auto; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(141,153,171,.25); background: rgba(16,21,29,.8); color: #E6ECF3; font-size: 14px; cursor: pointer; }
.qd3-legend { position: absolute; left: 16px; bottom: 40px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; color: #A9B3C2; pointer-events: none; }
.qd3-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.qd3-legend i.o { border-radius: 50%; background: transparent; border: 2px solid; margin-right: 3px; }
.qd3-note { position: absolute; left: 16px; right: 16px; bottom: 14px; font-size: 10.5px; color: #5B6577; pointer-events: none; }
.qd3-wait { position: absolute; top: 50%; left: 0; right: 0; text-align: center; color: #8D99AB; font-size: 13px; pointer-events: none; }
.qf3d { position: absolute; right: 78px; top: 10px; z-index: 5; display: none; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid rgba(231,201,139,.45); background: rgba(12,16,22,.82); color: #E7C98B; font: 600 11px Sora, sans-serif; letter-spacing: .08em; cursor: pointer; backdrop-filter: blur(6px); }
.qf3d.on { display: inline-flex; }
.qf3d:hover { background: rgba(231,201,139,.12); }
.qd3-stats { position: absolute; top: 58px; left: 16px; display: flex; gap: 8px; font-size: 10.5px; letter-spacing: .1em; pointer-events: none; }
.qd3-stats span { padding: 5px 10px; border-radius: 12px; background: rgba(16,21,29,.7); border: 1px solid rgba(141,153,171,.18); color: #8D99AB; }
.qd3-stats b { margin-left: 4px; color: #F2F5F9; }
.qd3-stats .h { border-color: rgba(64,214,180,.4); } .qd3-stats .b { border-color: rgba(240,104,132,.4); } .qd3-stats .p { border-color: rgba(141,153,171,.3); }
/* the QUANTUM logo behind the hologram: fixed, large, same treatment as the chart watermark */
.qd3-wm { position: absolute; left: 50%; top: 50%; width: min(80vw, 76vh, 760px); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .09; filter: saturate(.3) brightness(.9) contrast(1.35); image-rendering: -webkit-optimize-contrast; pointer-events: none; mix-blend-mode: screen; border-radius: 50%; -webkit-mask-image: radial-gradient(circle, #000 45%, transparent 72%); mask-image: radial-gradient(circle, #000 45%, transparent 72%); }
.qd3-range { position: absolute; top: 58px; right: 16px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.qd3-range button { height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid rgba(141,153,171,.25); background: rgba(16,21,29,.75); color: #A9B3C2; font: 600 10.5px Sora, sans-serif; letter-spacing: .04em; cursor: pointer; }
.qd3-range button.on { color: #F4F8FF; border-color: rgba(234,243,255,.6); background: rgba(234,243,255,.08); }
.qd3-cover { width: 100%; text-align: right; font-size: 10px; color: #5B6577; }
@media (max-width: 560px) { .qd3-range { top: 96px; left: 16px; right: 16px; max-width: none; justify-content: flex-start; } .qd3-cover { text-align: left; } }
.qd3-zoom { color: #F4F8FF; font: 700 11px Sora, sans-serif; margin-left: 4px; min-width: 52px; text-align: right; }
.qd3-venues { position: absolute; top: 92px; left: 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; z-index: 2; }
.qd3-venues button { font: 600 10.5px Sora, sans-serif; letter-spacing: .05em; height: 26px; padding: 0 11px; border-radius: 13px; color: #8D99AB; background: rgba(16,21,29,.75); border: 1px solid rgba(141,153,171,.22); cursor: pointer; }
.qd3-venues button.on { color: #F4F8FF; border-color: rgba(234,243,255,.55); background: rgba(234,243,255,.08); }
.qd3-venues button.off { color: #5B6577; border-style: dashed; }
.qd3-venues button.na { opacity: .45; cursor: default; }
.qd3-venues .hint { font-size: 10px; color: #5B6577; margin-left: 4px; }
@media (max-width: 560px) { .qd3-venues { top: 150px; } }
.scan-proof { display: block; margin: 6px 16px 14px; font: 600 11.5px Sora, sans-serif; color: #E7C98B; text-decoration: none; letter-spacing: .02em; }
.scan-proof:hover { text-decoration: underline; }
/* probability field panel */
.qd3-pf { position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px; width: min(720px, calc(100% - 32px)); padding: 10px 14px; border-radius: 14px; background: rgba(9,12,17,.72); border: 1px solid rgba(169,210,255,.22); backdrop-filter: blur(6px); font-size: 12px; color: #A9B3C2; z-index: 2; }
.qd3-pf-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.qd3-pf-h b { color: #DCEBFF; letter-spacing: .14em; font-size: 11px; }
.qd3-pf-hz button { height: 22px; padding: 0 9px; margin-left: 4px; border-radius: 11px; border: 1px solid rgba(141,153,171,.25); background: transparent; color: #8D99AB; font: 600 10.5px Sora, sans-serif; cursor: pointer; }
.qd3-pf-hz button.on { color: #F4F8FF; border-color: rgba(234,243,255,.55); background: rgba(234,243,255,.08); }
.qd3-pf-l1 { color: #DDE6F2; } .qd3-pf-l1 b { color: #F4F8FF; } .qd3-pf-l1 b.u { color: #22C38E; } .qd3-pf-l1 b.d { color: #F23645; }
.qd3-pf-l2 { margin-top: 3px; font-size: 11px; color: #6E7A8C; } .qd3-pf-l2 b { color: #C9D6E8; }
@media (max-width: 560px) { .qd3-pf { bottom: 118px; font-size: 11px; } }
/* Quantum Flow: explanation of the marker under the mouse */
.qf-tip { position: absolute; z-index: 30; max-width: 280px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(169,210,255,.35); background: rgba(6,10,20,.95); color: #EAF2FF; font-size: 11.5px; line-height: 1.45; pointer-events: none; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.qf-tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.qf-tip small { color: #A9B3C2; font-size: 11px; }

/* QUANTUM GAMMA as a panel over the chart */
.qf3d.qfgx { right: 318px; border-color: rgba(181,124,255,.55); color: #DCC4FF; box-shadow: 0 0 14px rgba(181,124,255,.12) inset; }
.qf3d.qfgx:hover { background: rgba(181,124,255,.14); }
.gxp { position: fixed; inset: 0; z-index: 900; background: #02040A; }
.gxp iframe { width: 100%; height: 100%; border: 0; display: block; }
.gxp-x { position: absolute; top: 12px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 17px; border: 1px solid rgba(231,201,139,.5); background: rgba(10,14,22,.9); color: #F4E4BE; font: 600 15px Sora, sans-serif; cursor: pointer; }
@media (max-width: 900px) { .qf3d.qfgx { right: auto; left: 10px; } }

/* HISTORY button: ice; lit while on */
.qf3d.qfhi { right: 78px; border-color: rgba(169,210,255,.45); color: #CFE6FF; }
.qf3d.qfhi.act { background: rgba(169,210,255,.16); box-shadow: 0 0 14px rgba(169,210,255,.18); }
@media (max-width: 900px) { .qf3d.qfhi { right: auto; left: 50%; transform: translateX(-50%); } }

/* header button explanations */
.hd-tip { position: fixed; z-index: 2000; max-width: 260px; padding: 8px 11px; border-radius: 10px; border: 1px solid rgba(169,210,255,.35); background: rgba(6,10,20,.96); color: #E6ECF3; font: 500 11.5px/1.45 Sora, sans-serif; pointer-events: none; box-shadow: 0 8px 30px rgba(0,0,0,.55); }

/* ───────── header: wordmark instead of the small logo, modules in one crystal dock ───────── */
.wordmark { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none; user-select: none; }
.wm-q { font: 400 16px/1 var(--f-mark); letter-spacing: .5em; margin-right: -.5em; white-space: nowrap;
  background: linear-gradient(100deg, #7F8B9C 0%, #E6ECF3 22%, #FFFFFF 30%, #C9D3DF 40%, #8D99AB 55%, #E6ECF3 75%, #A9D2FF 85%, #7F8B9C 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(169,210,255,.18)); animation: wmSheen 9s ease-in-out infinite; }
@keyframes wmSheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.wm-sub { display: flex; align-items: center; gap: 9px; font: 500 7.5px/1 var(--f-ui); letter-spacing: .62em; margin-right: -.62em; color: #A6B0BF; white-space: nowrap; }
.wm-sub b { color: var(--gold); font-size: 6px; letter-spacing: 0; margin: 0 .2em 0 -.2em; opacity: .9; }
.wm-sub i { display: block; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, rgba(231,201,139,.75)); }
.wm-sub i:last-child { background: linear-gradient(90deg, rgba(231,201,139,.75), transparent); margin-left: -.62em; }
@media (prefers-reduced-motion: reduce) { .wm-q { animation: none; } }

.dock { display: flex; align-items: center; position: relative; padding: 1px; --cut: 8px; clip-path: var(--chamfer); background: var(--edge); isolation: isolate; }
.dock::before { content: ""; position: absolute; inset: 1px; clip-path: var(--chamfer); background: linear-gradient(180deg, rgba(18,25,38,.92), rgba(9,13,20,.92)); z-index: -1; }
.dock .iconbtn { background: none; clip-path: none; height: 32px; }
.dock .iconbtn::before { clip-path: none; inset: 4px 2px; border-radius: 6px; background: transparent; transition: background .15s; }
.dock .iconbtn:hover::before { background: rgba(169,210,255,.09); }
.dock .iconbtn + .iconbtn::after { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 1px; background: linear-gradient(180deg, transparent, rgba(169,210,255,.22), transparent); }
@media (min-width: 901px) { .dock #flowBtn::after { display: none; } }
.dock #openSettings { color: #CDB98F; }
@media (max-width: 900px) {
  .wordmark { gap: 5px; }
  .wm-q { font-size: 12.5px; letter-spacing: .38em; margin-right: -.38em; }
  .wm-sub { font-size: 6.5px; letter-spacing: .5em; margin-right: -.5em; gap: 6px; }
  .wm-sub i { width: 14px; }
  .dock .iconbtn { padding: 0 8px; }
}
@media (max-width: 620px) { .wm-sub { display: none; } .wm-q { font-size: 11px; letter-spacing: .3em; margin-right: -.3em; } }
@media (max-width: 520px) { .wordmark { display: none; } .quote { margin-left: auto; } }

/* ───────── MODE BAR + LAYERS on the chart (6. 11. 2026) ───────── */
.modebar { position: absolute; left: 12px; top: 10px; z-index: 6; display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(10,13,19,.84); border: 1px solid rgba(169,210,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modebar button { min-height: 28px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--steel); font: 600 11px var(--f-ui); letter-spacing: .1em; cursor: pointer; }
.modebar button:hover { color: var(--platinum); }
.modebar button[aria-selected="true"] { color: var(--platinum); background: linear-gradient(180deg, rgba(169,210,255,.18), rgba(169,210,255,.06)); box-shadow: inset 0 -2px 0 var(--accent); }
.layerbox { position: absolute; left: 12px; top: 64px; z-index: 6; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 11px; background: rgba(10,13,19,.72); border: 1px solid rgba(255,255,255,.06); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.layerbox .lb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; padding: 0 8px; border: 0; background: transparent; color: #8B93A7; font: 600 10px var(--f-ui); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.layerbox .lb-list { display: flex; flex-direction: column; gap: 1px; }
.layerbox .lb-item { display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 0 10px 0 8px; border: 0; border-radius: 7px; background: transparent; color: #7D869A; font: 500 11px var(--f-ui); text-align: left; cursor: pointer; white-space: nowrap; }
.layerbox .lb-item i { width: 6px; height: 6px; border-radius: 3px; background: rgba(139,147,167,.35); flex: none; }
.layerbox .lb-item[aria-pressed="true"] { color: var(--platinum); }
.layerbox .lb-item[aria-pressed="true"] i { background: var(--bull); box-shadow: 0 0 6px var(--bull); }
.layerbox .lb-item:hover { background: rgba(169,210,255,.07); }
.dock #flowBtn { display: none; }
@media (max-width: 900px) { .modebar { top: 6px; left: 6px; } .modebar button { padding: 0 9px; font-size: 10px; } .layerbox { top: 50px; left: 6px; } }

/* ───────── header: logo in the middle, modules on the right as icons (Indicators keeps its label) ───────── */
@media (min-width: 1241px) {
  .bar { flex-wrap: nowrap; }
  .bar .wordmark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); flex: none; }
  .bar .dock { margin-left: auto; }
  .dock .iconbtn:not(#indBtn) .ind-txt, .dock #openSettings .hide-sm { display: none; }
  .dock .iconbtn { padding: 0 10px; }
  #statusTxt { display: none; }
}
.chartwrap .qleg { left: 124px; top: 68px; }   /* 10. 11.: in the Layers row, never over the mode bar */
.stage.strategy .chartwrap .qleg { left: 12px; top: 64px; }
@media (max-width: 900px) { .chartwrap .qleg { left: auto; right: 70px; top: 8px; } }

/* ───────── STRATEGY workspace (10. 11. 2026) ───────── */
.stage.strategy, .stage.strategy.no-rail { grid-template-columns: 46px 177px minmax(0, 1fr) 225px; }
.stage.strategy .rail { display: none !important; }
.strat-l, .strat-r { position: relative; min-height: 0; overflow-y: auto; background: linear-gradient(180deg, rgba(10,14,21,.96), rgba(5,8,13,.98)); }
.strat-l { border-right: 1px solid var(--line); padding: 12px 7px; display: flex; flex-direction: column; gap: 14px; }
.strat-r { border-left: 1px solid var(--line); overflow: hidden; }
.strat-r iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.st-h { font: 400 11px Michroma, var(--f-ui); letter-spacing: .32em; color: var(--gold, #E7C98B); padding: 2px 8px 4px; }
.st-p { border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 6px; background: rgba(255,255,255,.015); }
.st-p.on { border-color: rgba(169,210,255,.22); background: linear-gradient(180deg, rgba(169,210,255,.07), rgba(169,210,255,.02)); }
.st-t { width: 100%; display: flex; gap: 8px; align-items: flex-start; padding: 7px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--steel); text-align: left; cursor: pointer; }
.st-t i { flex: none; width: 8px; height: 8px; margin-top: 4px; border-radius: 4px; background: rgba(139,147,167,.35); }
.st-t b { display: block; font: 600 10px var(--f-ui); letter-spacing: .05em; color: var(--platinum); }
.st-t small { display: block; margin-top: 3px; font: 400 11px var(--f-ui); color: #7D869A; line-height: 1.35; }
.st-p.on .st-t i { background: var(--bull); box-shadow: 0 0 8px var(--bull); }
.st-ls { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 2px 4px; }
.st-p:not(.on) .st-ls { opacity: .45; }
.strat-l .lb-item { display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: #7D869A; font: 500 11px var(--f-ui); text-align: left; cursor: pointer; }
.strat-l .lb-item:disabled { cursor: default; }
.strat-l .lb-item i { width: 6px; height: 6px; border-radius: 3px; background: rgba(139,147,167,.35); flex: none; }
.strat-l .lb-item[aria-pressed="true"] { color: var(--platinum); }
.strat-l .lb-item[aria-pressed="true"] i { background: var(--bull); box-shadow: 0 0 6px var(--bull); }
.strat-l .lb-item:not(:disabled):hover { background: rgba(169,210,255,.07); }
.modebar .mb-strat { margin-left: 4px; border-left: 1px solid rgba(255,255,255,.08) !important; border-radius: 0 8px 8px 0; color: var(--gold, #E7C98B); }
.modebar .mb-strat[aria-pressed="true"] { color: #F3DDA8; background: linear-gradient(180deg, rgba(231,201,139,.18), rgba(231,201,139,.05)); box-shadow: inset 0 -2px 0 #E7C98B; }
@media (max-width: 1240px) { .stage.strategy, .stage.strategy.no-rail { grid-template-columns: 46px 160px minmax(0, 1fr) 200px; } }
.strat-l[hidden], .strat-r[hidden] { display: none !important; }

/* how to read the Strategy view (10. 11. 2026) */
.st-guide { border: 1px solid rgba(231,201,139,.22); border-radius: 12px; background: linear-gradient(180deg, rgba(231,201,139,.07), rgba(231,201,139,.015)); padding: 4px; }
.st-gh { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 30px; padding: 0 8px; border: 0; background: transparent; color: #F3DDA8; font: 600 10px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.st-gl { margin: 2px 0 6px; padding: 0 8px 0 24px; display: flex; flex-direction: column; gap: 7px; font: 400 11px/1.45 var(--f-ui); color: #A3ABBE; }
.st-gl li b { color: var(--platinum); font-weight: 600; }
.st-hint { margin: 2px 6px 6px 22px; font: 400 10.5px/1.45 var(--f-ui); color: #8B93A7; }
.st-hint b { color: #C9D3DF; font-weight: 600; }

/* exchanges row in the Flow layers (10. 11. 2026) */
.lb-sub { margin: 8px 8px 4px; font: 600 9px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: #6B7386; }
.lb-ven { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 6px 6px; }
.lb-ven .lv { height: 22px; padding: 0 8px; border-radius: 11px; border: 1px solid rgba(139,147,167,.25); background: transparent; color: #7D869A; font: 500 10.5px var(--f-ui); cursor: pointer; }
.lb-ven .lv[aria-pressed="true"] { border-color: rgba(231,201,139,.55); color: #F3DDA8; background: rgba(231,201,139,.08); }
.lb-ven .lv:hover { background: rgba(169,210,255,.07); }

/* room for the Quantum AI button over the bottom of the Strategy panel */
.strat-l { padding-bottom: 64px !important; }

/* CANDLE INSPECTOR (14. 11. 2026) */
.fpi { position: absolute; right: 74px; top: 56px; bottom: 44px; width: 300px; z-index: 30; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 10px;
  background: linear-gradient(180deg, rgba(14,18,26,.97), rgba(7,9,14,.98)); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.55);
  color: #E6EAF2; font: 400 11px var(--f-ui, Inter, system-ui, sans-serif); font-feature-settings: "tnum" 1; pointer-events: auto; }
.fpi[hidden] { display: none !important; }
.fpi.in-strat { position: absolute; inset: 0; right: 0; top: 0; bottom: 0; width: auto; border-radius: 0; border: 0; border-left: 1px solid var(--line, rgba(255,255,255,.08)); z-index: 5; }
.strat-r { position: relative; }
.fpi header { display: flex; align-items: center; gap: 8px; }
.fpi header span { font: 600 10px var(--f-ui, Inter); letter-spacing: .16em; color: #F3DDA8; }
.fpi header small { color: #8B93A7; font-size: 10.5px; margin-left: auto; }
.fpi-pin { font-style: normal; font-size: 8.5px; letter-spacing: .12em; color: #05070A; background: #E7C98B; border-radius: 3px; padding: 1px 4px; margin-left: 4px; }
.fpi-x { border: 0; background: transparent; color: #8B93A7; font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px; min-width: 24px; min-height: 24px; }
.fpi-x:hover { color: #E6EAF2; }
.fpi-st { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.025); }
.fpi-st div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fpi-st small { color: #7D869A; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; }
.fpi-st b { font: 500 11.5px "JetBrains Mono", ui-monospace, monospace; color: #E6EAF2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpi-st b span { color: #8B93A7; font-size: 10px; }
.fpi .up { color: #22C38E; } .fpi .dn { color: #F23645; }
.fpi-h { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 3px; color: #586074; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 0 2px; }
.fpi-h span:nth-child(2) { text-align: right; padding-right: 4px; }
.fpi-l { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; }
.fpi-r { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 3px; align-items: stretch; min-height: 15px; flex: 1 0 15px; max-height: 22px; border-radius: 3px; position: relative; }
.fpi-r.va { background: rgba(255,255,255,.025); }
.fpi-r.poc { outline: 1px solid rgba(230,234,242,.7); outline-offset: -1px; }
.fpi-r.stb { box-shadow: inset 2px 0 0 #22C38E; } .fpi-r.sts { box-shadow: inset 2px 0 0 #F23645; }
.fpi-p { font: 400 10px "JetBrains Mono", ui-monospace, monospace; color: #8B93A7; align-self: center; padding-left: 5px; }
.fpi-s, .fpi-b { position: relative; display: flex; align-items: center; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.02); }
.fpi-s { justify-content: flex-end; }
.fpi-s i, .fpi-b i { position: absolute; top: 0; bottom: 0; }
.fpi-s i { right: 0; background: rgba(242,54,69,.32); } .fpi-b i { left: 0; background: rgba(34,195,142,.32); }
.fpi-s.ib i { background: #F23645; } .fpi-b.ib i { background: #22C38E; }
.fpi-s em, .fpi-b em { position: relative; font: 500 10px "JetBrains Mono", ui-monospace, monospace; font-style: normal; color: #D5DAE4; padding: 0 5px; }
.fpi-s em, .fpi-b em { text-shadow: 0 0 3px rgba(0,0,0,.9), 0 0 1px rgba(0,0,0,.9); } .fpi-s.ib em, .fpi-b.ib em { color: #fff; font-weight: 600; }
.fpi-ev { list-style: none; margin: 0; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.025); display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; color: #A3ABBE; }
.fpi-ev b { font-weight: 600; }
.fpi footer { color: #586074; font-size: 9.5px; }
@media (max-width: 900px) { .fpi { right: 8px; left: 8px; width: auto; top: auto; bottom: 8px; height: 46vh; } }
.fpi-st .w { grid-column: 1 / -1; }
.fpi-st .w b { white-space: normal; }
.fpi-none { margin: 4px 0 0; color: #A3ABBE; font-size: 11.5px; line-height: 1.55; }
/* the cloud at the candle */
.fpc { position: absolute; z-index: 31; pointer-events: none; display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; border-radius: 10px;
  background: rgba(10,13,19,.9); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 10px 26px rgba(0,0,0,.5); backdrop-filter: blur(6px);
  font: 500 11px "JetBrains Mono", ui-monospace, monospace; color: #A3ABBE; white-space: nowrap; }
.fpc[hidden] { display: none !important; }
.fpc b { font-weight: 600; } .fpc .up { color: #22C38E; } .fpc .dn { color: #F23645; } .fpc .st { color: #E7C98B; }
/* QUANTUM READ in the candle inspector */
.qr { padding: 8px 10px; border-radius: 10px; background: linear-gradient(180deg, rgba(231,201,139,.07), rgba(231,201,139,.015)); border: 1px solid rgba(231,201,139,.18); display: flex; flex-direction: column; gap: 5px; }
.qr-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.qr-h b { font: 600 9.5px var(--f-ui, Inter); letter-spacing: .16em; color: #F3DDA8; }
.qr-h em { font-style: normal; font-weight: 600; font-size: 12px; color: #C9D3DF; }
.qr-bar { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgba(242,54,69,.55), rgba(139,147,167,.25) 50%, rgba(34,195,142,.55)); }
.qr-bar i { position: absolute; top: -3px; width: 2px; height: 12px; margin-left: -1px; background: #F2F4F8; box-shadow: 0 0 6px rgba(255,255,255,.8); border-radius: 1px; }
.qr-sc { display: flex; justify-content: space-between; font-size: 9px; color: #586074; letter-spacing: .08em; text-transform: uppercase; }
.qr ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: #A3ABBE; }
.qr li::before { content: "•"; margin-right: 6px; color: #586074; }
.qr li.up::before { content: "▲"; color: #22C38E; font-size: 8px; } .qr li.dn::before { content: "▼"; color: #F23645; font-size: 8px; } .qr li.weak { color: #7D869A; font-style: italic; }
.qr-f { color: #586074; font-size: 9.5px; }
.fpc em { font-style: normal; font-weight: 600; font-family: var(--f-ui, Inter); color: #C9D3DF; } .fpc em.up { color: #22C38E; } .fpc em.dn { color: #F23645; }
/* TIME & SALES */
.tns { position: absolute; right: 74px; top: 56px; width: 236px; max-height: calc(100% - 110px); z-index: 25; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 8px;
  background: linear-gradient(180deg, rgba(14,18,26,.94), rgba(7,9,14,.96)); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; box-shadow: 0 14px 36px rgba(0,0,0,.5);
  color: #E6EAF2; font: 400 10.5px var(--f-ui, Inter, system-ui, sans-serif); font-feature-settings: "tnum" 1; }
.tns[hidden], .tns.under { display: none !important; }
.tns header { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tns header b { white-space: nowrap; font-size: 9.5px; letter-spacing: .16em; color: #F3DDA8; font-weight: 600; }
.tns-f { display: flex; gap: 2px; }
.tns-f button { all: unset; cursor: pointer; padding: 2px 6px; border-radius: 6px; font-size: 9.5px; color: #8B93A7; border: 1px solid transparent; }
.tns-f button[aria-pressed="true"] { color: #F3DDA8; border-color: rgba(231,201,139,.35); background: rgba(231,201,139,.08); }
.tns-f button:focus-visible { outline: 1px solid #F3DDA8; }
.tns-s { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; font-size: 9.5px; }
.tns-s .up { color: #22C38E; } .tns-s .dn { color: #F23645; }
.tns-s i { height: 4px; border-radius: 2px; background: rgba(242,54,69,.55); overflow: hidden; } .tns-s i b { display: block; height: 100%; background: rgba(34,195,142,.75); }
.tns-h, .tns-l li { display: grid; grid-template-columns: 58px 1fr 64px; gap: 4px; }
.tns-h { color: #586074; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; padding: 0 4px; } .tns-h span:last-child, .tns-l li span:last-child { text-align: right; }
.tns-l { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; }
.tns-l li { position: relative; padding: 1.5px 4px; border-radius: 3px; color: #A3ABBE; }
.tns-l li { isolation: isolate; }
.tns-l li::before { z-index: -1; content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 3px; opacity: .16; }
.tns-l li.up::before { background: #22C38E; } .tns-l li.dn::before { background: #F23645; }
.tns-l li.up span:nth-child(2) { color: #5FD9AE; } .tns-l li.dn span:nth-child(2) { color: #FF6B78; }
.tns-l li.big { color: #F2F4F8; font-weight: 600; } .tns-l li.big::before { opacity: .32; }
.tns-l li.liq em { font-style: normal; font-size: 8.5px; padding: 0 3px; border-radius: 3px; background: rgba(195,163,255,.2); color: #D7C4FF; }
.tns-l li.none { display: block; color: #586074; font-style: italic; }
.tns-l li > span { position: relative; }
/* DOM LADDER */
.dom { position: absolute; right: 74px; top: 56px; bottom: 44px; width: 286px; z-index: 25; display: flex; flex-direction: column; gap: 5px; padding: 10px 10px 8px;
  background: linear-gradient(180deg, rgba(14,18,26,.94), rgba(7,9,14,.96)); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; box-shadow: 0 14px 36px rgba(0,0,0,.5);
  color: #E6EAF2; font: 400 10px var(--f-ui, Inter, system-ui, sans-serif); font-feature-settings: "tnum" 1; }
.dom[hidden], .dom.under { display: none !important; }
.tns.shift { right: 368px; }
.dom header { display: flex; align-items: center; gap: 6px; } .dom header b { font-size: 9.5px; letter-spacing: .16em; color: #F3DDA8; font-weight: 600; }
.dom header small { color: #586074; font-size: 9px; flex: 1; white-space: nowrap; }
.dom-h, .dom-l li { display: grid; grid-template-columns: 1fr 74px 1fr 1fr; gap: 3px; }
.dom-h { color: #586074; font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.dom-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; flex: 1; }
.dom-l li { height: 15px; align-items: center; border-radius: 3px; }
.dom-l li > span { position: relative; height: 100%; display: flex; align-items: center; padding: 0 3px; white-space: nowrap; overflow: hidden; }
.dom-l li > span { isolation: isolate; }
.dom-l li > span::before { z-index: -1; content: ""; position: absolute; top: 2px; bottom: 2px; width: var(--w, 0%); border-radius: 2px; opacity: .3; }
.dom-l .b { justify-content: flex-end; color: #5FD9AE; } .dom-l .b::before { right: 0; background: #22C38E; }
.dom-l .a { color: #FF6B78; } .dom-l .a::before { left: 0; background: #F23645; }
.dom-l .b.big, .dom-l .a.big { color: #F3DDA8; font-weight: 700; } .dom-l .b.big::before, .dom-l .a.big::before { opacity: .55; }
.dom-l .p { justify-content: center; color: #8B93A7; }
.dom-l .v { justify-content: flex-end; color: #A3ABBE; } .dom-l .v::before { left: 0; opacity: .35; background: linear-gradient(90deg, #22C38E 0 var(--g, 50%), #F23645 var(--g, 50%) 100%); }
.dom-l li.cur { background: rgba(231,201,139,.10); box-shadow: inset 0 0 0 1px rgba(231,201,139,.45); } .dom-l li.cur .p { color: #F3DDA8; font-weight: 700; }
.dom-l li.none { display: block; color: #586074; font-style: italic; padding: 6px; height: auto; }
.dom-l li > span > * { position: relative; }
.dom footer { color: #586074; font-size: 8.5px; text-align: center; }
/* Time & Sales / DOM docked on the left while the Layers list is closed */
.tns.dock-l, .dom.dock-l { right: auto; left: 12px; top: 104px; }
.tns.dock-l { max-height: calc(100% - 158px); }
.tns.dock-l.shift { left: 306px; right: auto; }
/* movable / resizable when docked on the left */
.tns.movable, .dom.movable { resize: both; overflow: hidden; min-width: 200px; min-height: 160px; max-width: 70%; }
.tns.movable header, .dom.movable header { cursor: grab; user-select: none; touch-action: none; }
.tns.movable header:active, .dom.movable header:active { cursor: grabbing; }
.tns-l { flex: 1; min-height: 0; }
/* candle type: Time / Range / Renko */
.ctype { position: absolute; top: 10px; right: 150px; z-index: 22; display: flex; align-items: center; height: 34px; padding: 3px; gap: 1px; border-radius: 11px; background: rgba(10,13,19,.84); border: 1px solid rgba(169,210,255,.14); }
.ctype button { background: transparent; border: 0; padding: 0 9px; height: 100%; cursor: pointer; font: 600 11px var(--f-ui); color: var(--steel); border-radius: 5px; }
.ctype button[aria-pressed="true"] { color: #F3DDA8; background: rgba(231,201,139,.10); }
.ctype .ct-p { font-weight: 500; font-size: 10px; padding: 0 6px; } .ctype .ct-p[hidden] { display: none; }
.ctype .ct-p:first-of-type { margin-left: 6px; border-left: 1px solid rgba(255,255,255,.08); border-radius: 0 5px 5px 0; }
.ctview { position: absolute; inset: 0; z-index: 20; background: #05080D; display: flex; flex-direction: column; }
.ctview[hidden] { display: none; }
.ctchart { flex: 1; min-height: 0; }
.ctnote { position: absolute; left: 14px; top: 54px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.ctnote b { font: 600 10px var(--f-ui); letter-spacing: .14em; color: #F3DDA8; } .ctnote span { font-size: 10px; color: #586074; }
@media (max-width: 900px) { .ctype .ct-p { display: none; } .ctype { top: 52px; right: 10px; } }
/* PRICE MEMORY */
.pmem { position: absolute; z-index: 32; width: 250px; pointer-events: none; display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(14,18,26,.97), rgba(7,9,14,.98)); border: 1px solid rgba(231,201,139,.22); box-shadow: 0 12px 30px rgba(0,0,0,.55);
  color: #C9D3DF; font: 400 10.5px var(--f-ui, Inter, system-ui, sans-serif); font-feature-settings: "tnum" 1; }
.pmem[hidden] { display: none; }
.pmem b { font-size: 9.5px; letter-spacing: .14em; color: #F3DDA8; font-weight: 600; }
.pmem .pm-row { display: flex; justify-content: space-between; gap: 6px; } .pmem em { font-style: normal; font-weight: 700; color: #F2F4F8; }
.pmem i { font-style: normal; } .pmem i.up { color: #22C38E; } .pmem i.dn { color: #F23645; }
.pmem .pm-bar { display: flex; height: 4px; border-radius: 2px; background: rgba(139,147,167,.25); overflow: hidden; } .pmem .pm-bar i { background: #22C38E; } .pmem .pm-bar i.dn { background: #F23645; }
.pmem .pm-last { color: #A3ABBE; } .pmem .pm-ev { color: #D7C4FF; } .pmem small { color: #586074; font-size: 9px; line-height: 1.35; }
/* ═══════════ QUANTUM TREND – the Overlay dashboard (owner 16. 11. 2026) ═══════════ */
.hero.tq { padding: 14px 16px 13px; }
.tq-top { display: flex; align-items: center; gap: 14px; }
.tq-ring { position: relative; width: 92px; height: 92px; flex: none; color: var(--accent); }
.tq-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.tq-track { fill: none; stroke: rgba(141,153,171,.16); stroke-width: 6; }
.tq-arc { fill: none; stroke: url(#tqg); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 6px currentColor); }
.tq-ticks line { stroke: rgba(141,153,171,.35); stroke-width: 1.2; } .tq-ticks line.on { stroke: currentColor; }
.tq-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.tq-num b { font: 26px/1 var(--f-mark); color: var(--platinum); letter-spacing: .02em; } .tq-num small { margin-top: 4px; font: 500 8.5px var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--steel); }
.tq-head { min-width: 0; flex: 1; }
.tq-head .state { font-size: 15px; letter-spacing: .1em; word-break: break-word; }
.tq-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tq-chip { font: 600 9px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; border: 1px solid rgba(141,153,171,.25); color: var(--steel); background: rgba(141,153,171,.06); }
.tq-chip.ok { color: #F3DDA8; border-color: rgba(231,201,139,.45); background: rgba(231,201,139,.08); }
.tq-chip.warn { color: #FF8A94; border-color: rgba(242,54,69,.4); background: rgba(242,54,69,.08); }
.tq-chip.acc { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tq-read { margin: 12px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--platinum); }
/* phase orbit */
.tq-orbit { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 10px 0 2px; }
.tq-orbit-line { position: absolute; left: 12.5%; right: 12.5%; top: 16px; height: 1px; background: linear-gradient(90deg, rgba(34,195,142,.5), rgba(231,201,139,.5) 55%, rgba(242,54,69,.6)); }
.tq-station { display: grid; justify-items: center; gap: 7px; position: relative; }
.tq-station i { width: 7px; height: 7px; transform: rotate(45deg); background: rgba(141,153,171,.35); margin-top: 3px; }
.tq-station span { font: 500 9.5px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.tq-station.cur i { background: var(--accent); box-shadow: 0 0 10px var(--accent); } .tq-station.cur span { color: var(--platinum); }
.tq-marker { position: absolute; top: 9px; width: 15px; height: 15px; margin-left: -7.5px; border-radius: 50%; border: 1.5px solid var(--accent); box-shadow: 0 0 12px var(--accent), inset 0 0 6px color-mix(in srgb, var(--accent) 50%, transparent); transition: left .8s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.tq-marker::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); animation: tqPulse 2.2s ease-in-out infinite; }
@keyframes tqPulse { 0%, 100% { transform: scale(.7); opacity: .7; } 50% { transform: scale(1.1); opacity: 1; } }
.tq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 12px; }
.tq-grid .kv { display: flex; flex-direction: column; gap: 2px; }
.tq-grid .kv span { font: 500 9.5px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.tq-grid .kv b { font: 600 12.5px var(--f-ui); color: var(--platinum); font-feature-settings: "tnum" 1; } .tq-grid .kv b small { font-weight: 500; color: var(--steel); }
/* exhaustion radar */
.tq-radar-wrap { display: grid; grid-template-columns: 118px 1fr; gap: 10px; align-items: center; }
.tq-radar { width: 118px; height: 118px; overflow: visible; }
.tq-radar .web { fill: none; stroke: rgba(141,153,171,.18); stroke-width: 1; } .tq-radar .spoke { stroke: rgba(141,153,171,.14); stroke-width: 1; }
.tq-radar .area { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 1.5; filter: drop-shadow(0 0 5px var(--accent)); }
.tq-radar .dot { fill: rgba(141,153,171,.5); } .tq-radar .dot.on { fill: #FF8A94; filter: drop-shadow(0 0 5px #F23645); }
.tq-radar text { font: 500 7px var(--f-ui); fill: var(--steel); letter-spacing: .04em; text-transform: uppercase; } .tq-radar text.on { fill: #FF8A94; }
.tq-signs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; color: var(--steel); line-height: 1.3; }
.tq-signs li { display: grid; grid-template-columns: 12px 1fr; gap: 6px; align-items: start; }
.tq-signs li::before { content: "◇"; color: rgba(141,153,171,.5); font-size: 10px; line-height: 1.3; }
.tq-signs li.on { color: var(--platinum); } .tq-signs li.on::before { content: "◆"; color: #FF8A94; }
/* flip level */
.tq-flip-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(242,54,69,.5), rgba(141,153,171,.18) 40%, color-mix(in srgb, var(--accent) 45%, transparent)); margin: 6px 0 4px; }
.tq-flip-bar i { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--platinum); border-radius: 1px; }
.tq-flip-bar i.flip { left: 0; background: #F23645; } .tq-flip-bar i.basis { background: rgba(230,236,243,.55); margin-left: -1px; } .tq-flip-bar i.ext { right: 0; background: var(--accent); }
.tq-flip-bar i.price { width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 8px #fff; transition: left .6s ease; }
.tq-flip-lbl { display: flex; justify-content: space-between; font: 500 9px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
/* past trends */
.tq-hist { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.tq-hist i { flex: 1; min-width: 2px; border-radius: 1px 1px 0 0; background: rgba(141,153,171,.35); } .tq-hist i.up { background: color-mix(in srgb, var(--bull) 70%, transparent); } .tq-hist i.dn { background: color-mix(in srgb, var(--bear) 70%, transparent); }
.tq-hist i.cur { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.tq-note { margin: 10px 0 0; font-size: 10px; line-height: 1.45; color: var(--steel); }
.tq-empty { color: var(--steel); font-size: 11px; }
/* QUANTUM FIELD (trend in 3D) */
.qfd .qd3-note { max-width: 70%; }
.qfd-hud { position: absolute; right: 16px; top: 56px; width: 300px; max-height: calc(100% - 120px); overflow: auto; padding: 12px 14px; border-radius: 14px; background: rgba(7,9,13,.78); border: 1px solid rgba(169,210,255,.16); backdrop-filter: blur(8px); font-family: Sora, sans-serif; z-index: 2; }
.qfd-h1 { font-size: 12px; letter-spacing: .12em; } .qfd-h1 b { font-weight: 700; } .qfd-h1 span { display: block; margin-top: 3px; font-size: 10.5px; letter-spacing: .02em; color: #8D99AB; }
.qfd-read { margin-top: 8px; font-size: 11.5px; line-height: 1.5; color: #E6ECF3; }
.qfd-signs { list-style: none; margin: 8px 0 0; padding: 0; display: none; flex-direction: column; gap: 4px; font-size: 10.5px; color: #8D99AB; }
.qfd-hud.near .qfd-signs { display: flex; }
.qfd-signs li::before { content: "◇ "; color: rgba(141,153,171,.6); } .qfd-signs li.on { color: #F2F4F8; } .qfd-signs li.on::before { content: "◆ "; color: #FF8A94; }
.qfd-zoom { display: flex; gap: 4px; margin-top: 10px; }
.qfd-zoom span { flex: 1; text-align: center; font: 600 8.5px Sora, sans-serif; letter-spacing: .14em; padding: 4px 0; border-radius: 6px; color: #586074; border: 1px solid rgba(141,153,171,.18); }
.qfd-zoom span.on { color: #F3DDA8; border-color: rgba(231,201,139,.5); background: rgba(231,201,139,.08); }
.qfd .qd3-wm { opacity: .045; width: min(60vw, 60vh, 560px); }
/* QUANTUM FIELD event tooltip */
.trtip { position: fixed; z-index: 60; width: 270px; pointer-events: none; padding: 9px 11px; border-radius: 10px; background: rgba(10,13,19,.96); border: 1px solid rgba(169,210,255,.2); box-shadow: 0 10px 28px rgba(0,0,0,.5); color: #C9D3DF; font: 400 10.5px var(--f-ui, Inter, system-ui, sans-serif); line-height: 1.45; }
.trtip[hidden] { display: none; } .trtip b { display: block; margin-bottom: 3px; font-size: 11px; }
.tq-head .state { white-space: nowrap; font-size: 14px; letter-spacing: .09em; }

/* calibrated probabilities (18. 11. 2026) */
.tq-prob { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid rgba(169,210,255,.12); }
.tq-prob[hidden] { display: none; }
.tq-prob-h { font: 700 9.5px var(--f-ui, Inter, sans-serif); letter-spacing: .12em; color: #8D99AB; display: flex; justify-content: space-between; margin-bottom: 6px; }
.tq-prob-h span { color: #A9D2FF; letter-spacing: .06em; text-transform: uppercase; cursor: help; }
.tq-prob-r { display: flex; justify-content: space-between; align-items: baseline; font: 500 11.5px var(--f-ui, Inter, sans-serif); color: #C9D3DF; margin-top: 6px; }
.tq-prob-r b { font: 700 14px var(--f-num, Sora, sans-serif); color: #F2F5F9; }
.tq-prob-b { height: 4px; border-radius: 3px; background: rgba(255,255,255,.06); margin-top: 4px; overflow: hidden; }
.tq-prob-b i { display: block; height: 100%; border-radius: 3px; box-shadow: 0 0 8px currentColor; }
.tq-prob-n { margin-top: 8px; font: 400 10px var(--f-ui, Inter, sans-serif); color: #8D99AB; line-height: 1.4; }

/* ALERTS log in the rail (owner 20. 11. 2026) – every module, this device */
.allog .al-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.allog .al-head b { font: 600 12px var(--f-ui); color: var(--platinum); letter-spacing: .04em; }
.allog .al-head small { font: 500 11px var(--f-ui); color: var(--steel); }
.allog ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.allog li { display: grid; grid-template-columns: 3px 1fr auto; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid rgba(169,210,255,.10); border-radius: 8px; background: rgba(169,210,255,.03); }
.allog li i { align-self: stretch; border-radius: 2px; background: var(--ice); }
.allog li.bull i { background: #2BD99F; } .allog li.bear i { background: #FF5C7A; } .allog li.core i { background: var(--gold); }
.allog li b { display: block; font: 600 12px var(--f-ui); color: var(--platinum); }
.allog li span { display: block; font: 400 11px/1.35 var(--f-ui); color: var(--steel); margin-top: 2px; }
.allog li time { font: 500 10.5px var(--f-ui); color: var(--steel); white-space: nowrap; }
.allog .al-empty { margin: 0; font: 400 11.5px var(--f-ui); color: var(--steel); }

/* iPhone (owner 22. 11. 2026): no Time / Range / Renko bar, a narrow module legend in the top-right corner */
@media (max-width: 640px) {
  .ctype { display: none !important; }
  .chartwrap .qleg { left: auto; right: 8px; top: 26px; max-width: calc(100vw - 150px); }   /* the Layers row, under the mode bar */
  .chartwrap .qleg .card { min-width: 0; width: max-content; max-width: calc(100vw - 150px); }
  .chartwrap .qleg .row { height: 24px; gap: 6px; }
  .chartwrap .qleg .row b { overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; }
  .chartwrap .qleg .row button { width: 20px; height: 18px; }
  .chartwrap .qleg .chip { height: 22px; padding: 0 8px 0 7px; font-size: 10.5px; }
}

/* FULL CHART (owner 22. 11. 2026): double-tap the chart – only the chart, like TradingView */
.fullzoom { display: none; }
body.chartfull .chartwrap { position: fixed !important; inset: 0; z-index: 300; height: 100dvh !important; width: 100vw !important; margin: 0; border-radius: 0; background: #070A10; }
body.chartfull .chartwrap > :not(#chart):not(.fullzoom):not(.toasts) { display: none !important; }
body.chartfull .fullzoom { display: flex; position: absolute; right: 74px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 310; gap: 6px; }
.fullzoom button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(169,210,255,.2); background: rgba(10,14,20,.86); color: #DCE6F0; font: 600 17px Sora, sans-serif; backdrop-filter: blur(6px); }
.fullzoom button[data-z="x"] { color: #FF8A9C; }
/* iPhone: HISTORY as a small round button on the right, under the module chip */
@media (max-width: 640px) {
  .qf3d.qfhi { left: auto; right: 8px; top: 58px; transform: none; height: 24px; padding: 0 9px; font-size: 10px; letter-spacing: .06em; }
}

/* owner 23. 11. 2026: the Time / Range / Renko switch is gone on every device */
.ctype { display: none !important; }

/* QUANTUM OVERLAY module (owner 24. 11. 2026): the private Overlay page in the chart area */
.stage.ovl-on, .stage:has(.ovl-lock) { position: relative; }
.ovl-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 40; background: #05080D; }
.ovl-lock { position: absolute; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 10px; width: min(340px, 90%);
  padding: 22px; background: rgba(6, 9, 14, .96); border: 1px solid rgba(169, 210, 255, .25); border-radius: 12px; font: 500 13px Sora, sans-serif; color: #E6ECF3; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.ovl-lock b { font-family: Michroma, sans-serif; letter-spacing: .12em; }
.ovl-lock span { color: #8D9BAE; }
.ovl-lock input { background: #0B1119; border: 1px solid rgba(169, 210, 255, .25); border-radius: 8px; color: #E6ECF3; padding: 10px; font: inherit; }
.ovl-lock button[type="submit"] { background: #A9D2FF; color: #05080D; border: 0; border-radius: 8px; padding: 10px; font: 700 13px Sora, sans-serif; cursor: pointer; }
.ovl-lock small { color: #FF5C7A; min-height: 1em; }
.ovl-lock .ovl-x { background: none; border: 0; color: #8D9BAE; cursor: pointer; font: inherit; }
