/* ============================================================================================
   LIVING CORE – vizuális réteg (csak megjelenés). Minden szabály a html.core alatt él:
   a klasszikus kinézet egy kapcsolóval visszaáll (Rétegek ▾ → Élő effektek).
   A rendszer nyelve: ARANY = magabiztos setup / buy-sell · ZÖLD = erős bullish · PIROS = erős bearish ·
   halvány acél-cián = semleges adatáramlás.
   ============================================================================================ */

/* klasszikus módban az új elemek nem léteznek, a csomagolók átlátszók */
html:not(.core) .core-only { display: none !important; }
html:not(.core) .wrap-c { display: contents; }
html:not(.core) #fx-bg, html:not(.core) #fx-mid, html:not(.core) #fx-top, html:not(.core) #log-rail, html:not(.core) #core-debug, html:not(.core) #boot { display: none !important; }

/* -------------------------------------------------------------------------- tokenek */
html.core {
  /* obszidián rétegek – enyhe hideg-kék / mélyzöld aláfestéssel */
  --k0: #030509; --k1: #05080d; --k2: #080c13; --k3: #0c121c; --k4: #121a27;
  /* a három jelentés */
  --gold: #f5b83d; --gold-hot: #ffd27a; --gold-core: #fff4d6; --gold-deep: #b9761a;
  --bull: #1ef2a0; --bull-deep: #0a9e66;
  --bear: #e5173f; --bear-glow: #ff2e5b; --bear-deep: #7d0a22;
  /* semleges adatáramlás – sokkal halványabb */
  --flow: #6c9cbc; --flow-dim: #2c4458;
  /* rendszer-identitás (alak + vonalstílus mellett): OB acél-cián ◆ · AI ibolya ● (az arany csak jelzés) */
  --id-ob: #5cc8e8; --id-ai: #b9a2ff;
  /* üveg */
  --glass-a: rgba(16, 23, 35, .62); --glass-b: rgba(7, 10, 17, .74);
  --glass-edge: rgba(176, 204, 240, .26); --glass-edge-2: rgba(120, 150, 190, .05);
  --r-core: 18px; --r-glass: 16px;
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7  0 0 0 0 0.8  0 0 0 0 0.9  0 0 0 .055 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");

  /* a meglévő tokenek a core-palettára hajlítva (a régi CSS/JS automatikusan követi) */
  --s0: var(--k1); --s1: var(--k2); --s2: #0f1620; --s3: #151e2b; --s4: #1d2838;
  --line: rgba(130, 160, 200, .10); --line-soft: rgba(130, 160, 200, .065);
  --t0: #e6ecf5; --t1: #a3afc2; --t2: #66738a; --t3: #3f4a5c;
  --ob: var(--id-ob); --ob-2: #8edcf2; --ob-ink: #021219;
  --ai: var(--id-ai); --ai-2: #d6c8ff; --ai-ink: #150b33;
  --gain: var(--bull); --loss: var(--bear); --warn: var(--gold); --info: var(--flow);
  --acc: var(--flow); --acc-2: #a8c6dc; --acc-ink: #031018;
  --sh-float: 0 24px 60px -18px rgba(0, 0, 0, .85), 0 0 0 1px var(--glass-edge-2);
  color-scheme: dark;
}
html.core body[data-view="ai"] { --acc: var(--id-ai); --acc-2: #d6c8ff; }
html.core body[data-view="both"] { --acc: #c8d4e6; }
html.core body[data-view="ob"] { --acc: var(--id-ob); }

html.core, html.core body { background: var(--k0); }
html.core body { overflow: hidden; }

/* -------------------------------------------------------------------------- effekt-vásznak */
#fx-bg, #fx-mid, #fx-top { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; display: block; }
#fx-bg { z-index: 0; }
#fx-mid { z-index: 1; }
#fx-top { z-index: 60; }
html.core .bar, html.core main { position: relative; z-index: 2; }
html.core .bar { z-index: 20; }

/* -------------------------------------------------------------------------- fejléc */
html.core .bar {
  background: linear-gradient(180deg, rgba(7, 11, 18, .86), rgba(5, 8, 13, .72)), var(--noise);
  border-bottom: 1px solid rgba(130, 160, 200, .08);
  backdrop-filter: blur(14px) saturate(1.2);
}
html.core .bar::after { height: 1px; background: linear-gradient(90deg, transparent, rgba(108, 156, 188, .55) 30%, rgba(108, 156, 188, .1) 75%, transparent); opacity: 1; }
html.core .brand .mark { background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .18), transparent 60%), var(--k4); color: var(--acc);
  box-shadow: inset 0 0 0 1px rgba(160, 190, 230, .18), 0 0 18px -6px var(--acc); }
html.core .views, html.core .tfs, html.core .btn, html.core .sel select { background: rgba(4, 7, 12, .7); border-color: rgba(130, 160, 200, .1); }
html.core .views button.active[data-view="ob"] { background: linear-gradient(180deg, #7fd8f0, var(--id-ob)); color: var(--ob-ink); box-shadow: 0 0 18px -4px var(--id-ob); }
html.core .views button.active[data-view="ai"] { background: linear-gradient(180deg, #d4c6ff, var(--id-ai)); color: var(--ai-ink); box-shadow: 0 0 18px -4px var(--id-ai); }
html.core .views button.active[data-view="both"] { background: linear-gradient(180deg, #f2f6fb, #b8c4d6); box-shadow: 0 0 18px -6px #c8d4e6; }
html.core .tfs button.active { background: rgba(108, 156, 188, .14); color: #d8e6f2; box-shadow: inset 0 0 0 1px rgba(108, 156, 188, .35); }
html.core .dropdown { background: rgba(10, 15, 24, .96); backdrop-filter: blur(16px); box-shadow: var(--sh-float), inset 0 1px 0 rgba(255, 255, 255, .05); }
html.core .pill { background: rgba(10, 15, 24, .7); box-shadow: inset 0 0 0 1px rgba(130, 160, 200, .1); }
html.core .pill.ok { color: var(--bull); box-shadow: inset 0 0 0 1px rgba(30, 242, 160, .25); background: rgba(30, 242, 160, .06); }
html.core .pill.bad { color: #ff5c7a; box-shadow: inset 0 0 0 1px rgba(229, 23, 63, .35); background: rgba(229, 23, 63, .08); }
html.core .pill.warn { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(245, 184, 61, .25); background: rgba(245, 184, 61, .06); }

@media (max-width: 1760px) { html.core .pill { max-width: 128px; overflow: hidden; text-overflow: ellipsis; } html.core .bar .sep { display: none; } }
@media (max-width: 1500px) { html.core .pill { max-width: 96px; } html.core .views button { padding: 5px 8px; gap: 5px; } }

/* -------------------------------------------------------------------------- ÜVEG – egységes panelcsalád */
html.core .glass, html.core #xb .card:not(.xb-chart) {
  position: relative; isolation: isolate;
  background: linear-gradient(165deg, var(--glass-a), var(--glass-b)), var(--noise);
  border: 0; border-radius: var(--r-glass);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .055), inset 0 0 42px rgba(0, 0, 0, .38), 0 22px 54px -26px rgba(0, 0, 0, .9);
  backdrop-filter: blur(12px) saturate(1.25);
  transition: box-shadow .5s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
/* gradiens keret: világosabb felső-bal él */
html.core .glass::before, html.core #xb .card:not(.xb-chart)::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(140deg, var(--glass-edge), var(--glass-edge-2) 38%, rgba(120, 150, 190, .02) 62%, rgba(150, 180, 220, .12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
/* fénycsík a kereten (hover) */
html.core .glass::after, html.core #xb .card:not(.xb-chart)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2; opacity: 0;
  background: conic-gradient(from var(--sweep, 0deg), transparent 0 70%, rgba(200, 225, 255, .55) 78%, transparent 86%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .3s;
}
html.core .glass.hover::after, html.core #xb .card.hover::after { opacity: 1; }
html.core.q-low .glass, html.core.q-low #xb .card:not(.xb-chart) { backdrop-filter: none; background: linear-gradient(165deg, rgba(14, 20, 31, .94), rgba(7, 10, 17, .96)); }
html.core.q-low .bar { backdrop-filter: none; }

/* új adat / becsapódás: rövid keret-felragyogás a jelentés színével */
html.core .hit-gold { --hit: 245, 184, 61; }
html.core .hit-bull { --hit: 30, 242, 160; }
html.core .hit-bear { --hit: 229, 23, 63; }
html.core .hit-flow { --hit: 108, 156, 188; }
html.core .hit-gold, html.core .hit-bull, html.core .hit-bear, html.core .hit-flow { animation: core-hit 1.1s ease-out; }
html.core .hit-gold { animation-duration: 1.8s; }
@keyframes core-hit {
  0% { box-shadow: inset 0 0 0 1px rgba(var(--hit), .9), inset 0 0 40px rgba(var(--hit), .22), 0 0 34px -2px rgba(var(--hit), .55), 0 22px 54px -26px rgba(0, 0, 0, .9); }
  100% { box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .055), inset 0 0 42px rgba(0, 0, 0, .38), 0 0 0 0 rgba(var(--hit), 0), 0 22px 54px -26px rgba(0, 0, 0, .9); }
}
html.core .shake { animation: core-shake .32s cubic-bezier(.36, .07, .19, .97), core-hit 1.1s ease-out; }
@keyframes core-shake { 10%, 90% { translate: -1px 0; } 20%, 80% { translate: 2px 0; } 30%, 50%, 70% { translate: -3px 0; } 40%, 60% { translate: 3px 0; } }

/* -------------------------------------------------------------------------- OB-nézet: a mag a közép */
html.core main { height: calc(100% - 49px); padding: 16px 18px 18px; }
html.core #ob-main { gap: 62px; }                       /* kábel-csatorna a mag és a panelek között */
html.core aside#side { width: 384px; background: none; border: 0; gap: 12px; }
html.core #box-quote { flex: none; overflow: hidden; }
html.core #box-tabs { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
html.core #box-tabs .tab { flex: 1; min-height: 0; }
html.core .tabs button[data-tab="events"], html.core #tab-events { display: none !important; }   /* az események a napló-sávban */
html.core .quote { border: 0; padding: 12px 16px 12px; }
html.core #summary { display: none; }                  /* a hat összesítő a szívben él */
html.core .quote .px { font-size: 26px; }
html.core .summary { border: 0; }
html.core .summary > div { border-color: rgba(130, 160, 200, .06); }
html.core .tabs { border-bottom: 1px solid rgba(130, 160, 200, .07); }
html.core .tabs button.active { border-bottom-color: var(--acc); color: var(--t0); text-shadow: 0 0 12px rgba(108, 156, 188, .5); }
html.core th { background: rgba(8, 12, 19, .92); }
html.core tr.click:hover { background: rgba(108, 156, 188, .06); }

/* a mag (chart) – a belső terület tiszta, a hatás a kereten és környezetén dolgozik */
html.core #chart-wrap { padding: 15px; border-radius: var(--r-core); background: transparent; }
html.core #chart { inset: 15px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(150, 180, 220, .08); }
html.core .ohlc { left: 28px; top: 24px; }
html.core .empty { inset: 15px; }
html.core .tip { margin: 15px 0 0 15px; background: rgba(8, 12, 19, .95); backdrop-filter: blur(8px); }
html.core #toast { display: none !important; }          /* az értesítések a feedben és a napló-sávban jelennek meg */

/* -------------------------------------------------------------------------- AI-nézet: a mag középen, panelek körülötte */
html.core #xb { padding: 0 6px 18px; grid-template-columns: 300px minmax(0, 1fr) 344px; column-gap: 44px; row-gap: 16px; align-items: start; }
html.core #xb > * { grid-column: auto; }
html.core #xb .xb-banner { grid-column: 1 / -1; }
html.core .xb-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
html.core .xb-left { grid-column: 1; }
html.core #xb .xb-chart { grid-column: 2; height: 640px; background: none; border: 0; box-shadow: none; overflow: visible; }
html.core .xb-right { grid-column: 3; }
html.core #xb .xb-stats { grid-column: 1 / 3; }
html.core #xb .xb-ai { grid-column: 3; }
html.core #xb .xb-ai .ai-grid { grid-template-columns: 1fr; }
html.core #xb .xb-hourly { grid-column: 1 / -1; }
html.core #xb .xb-events { display: none; }              /* az események a napló-sávban */
html.core #xb .xb-hero { display: flex; flex-direction: column; }
html.core #xb .xb-hero > div { border: 0 !important; border-bottom: 1px solid rgba(130, 160, 200, .06) !important; padding: 12px 16px; }
html.core #xb .xb-hero > div:nth-child(2), html.core #xb .xb-hero > div:nth-child(3), html.core #xb .xb-hero > div:nth-child(4) { display: none; } /* Ma/Hét/Hó: a szívben */
html.core #xb .xb-hero > div:last-child { border-bottom: 0 !important; }
html.core #xb .xb-hero .big { font-size: 26px; }
html.core .xb-banner .bn { background: linear-gradient(90deg, rgba(14, 20, 31, .8), rgba(8, 12, 19, .6)); border-color: rgba(130, 160, 200, .08); backdrop-filter: blur(10px); }
html.core .xb-banner .bn.warn { border-left-color: var(--gold); }
html.core .xb-banner .bn.bad { border-left-color: var(--bear); }

/* -------------------------------------------------------------------------- SZÍV: WR-reaktor + PnL */
html.core .heart { flex: none; padding: 14px 16px 14px; display: grid; grid-template-columns: 148px 1fr; gap: 14px; align-items: center; overflow: hidden; }
html.core .heart .reactor { position: relative; width: 148px; height: 148px; }
html.core .heart .reactor canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
html.core .heart .wr { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
html.core .heart .wr-n { font: 600 38px/1 var(--ff-num); font-variant-numeric: tabular-nums; letter-spacing: -.04em; color: var(--t0); }
html.core .heart .wr-n small { font-size: 16px; color: var(--t1); margin-left: 1px; }
html.core .heart .wr-k { margin-top: 4px; font-size: 10.5px; color: var(--t2); }
html.core .heart .pnl { min-width: 0; }
html.core .heart .pnl-k { font-size: 11.5px; color: var(--t2); display: flex; justify-content: space-between; gap: 6px; }
html.core .heart .pnl-v { font: 600 30px/1.1 var(--ff-num); font-variant-numeric: tabular-nums; letter-spacing: -.035em; margin: 4px 0 6px; white-space: nowrap;
  transition: color .4s, text-shadow .6s; }
html.core .heart .pnl-v.pos { color: var(--bull); text-shadow: 0 0 22px rgba(30, 242, 160, .28); }
html.core .heart .pnl-v.neg { color: #ff4a6b; text-shadow: 0 0 22px rgba(229, 23, 63, .32); }
html.core .heart .pnl-v.record { color: var(--gold-hot); text-shadow: 0 0 26px rgba(245, 184, 61, .6), 0 0 2px var(--gold-core); }
html.core .heart .pnl-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 11px; color: var(--t2); }
html.core .heart .pnl-sub b { display: block; font: 600 13px var(--ff-num); font-variant-numeric: tabular-nums; color: var(--t1); }
html.core .heart .pnl-sub b.pos { color: var(--bull); } html.core .heart .pnl-sub b.neg { color: #ff4a6b; }
html.core .heart canvas.eq { display: block; width: 100%; height: 34px; margin-top: 8px; }
html.core .heart.pressure { animation: core-shake .38s cubic-bezier(.36, .07, .19, .97); }
html.core #heart-ai { grid-template-columns: 1fr; justify-items: center; text-align: center; }
html.core #heart-ai .pnl { width: 100%; }
html.core #heart-ai .pnl-k { justify-content: center; }

/* -------------------------------------------------------------------------- FEED: utolsó 3 értesítés */
html.core .feed3 { flex: none; padding: 10px 12px 12px; }
html.core .feed3 .fh { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; font-size: 12px; color: var(--t1); font-weight: 600; }
html.core .feed3 .fh button { margin-left: auto; background: rgba(4, 7, 12, .7); border: 1px solid rgba(130, 160, 200, .12); border-radius: 999px; color: var(--t1);
  font: 600 11px var(--ff-ui); padding: 3px 10px; cursor: pointer; }
html.core .feed3 .fh button:hover { color: var(--t0); border-color: rgba(160, 190, 230, .3); }
html.core .feed3 .list { display: flex; flex-direction: column; gap: 6px; min-height: 166px; }
html.core .fcard { --c: 108, 156, 188; position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 10px; align-items: start;
  padding: 8px 10px 8px 10px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(90deg, rgba(var(--c), .14), rgba(var(--c), .03) 55%, transparent), rgba(5, 8, 13, .55);
  box-shadow: inset 0 0 0 1px rgba(var(--c), .22); transition: opacity 1.4s ease, filter 1.4s ease, box-shadow 1.4s ease, max-height .6s ease .9s, margin .6s ease .9s, padding .6s ease .9s;
  max-height: 80px; }
html.core .fcard.gold { --c: 245, 184, 61; box-shadow: inset 0 0 0 1px rgba(245, 184, 61, .45), 0 0 26px -10px rgba(245, 184, 61, .7); }
html.core .fcard.bull { --c: 30, 242, 160; }
html.core .fcard.bear { --c: 229, 23, 63; }
html.core .fcard .ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; color: rgb(var(--c));
  background: rgba(var(--c), .12); box-shadow: inset 0 0 0 1px rgba(var(--c), .3); }
html.core .fcard .ti { font-size: 12px; font-weight: 600; color: var(--t0); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.core .fcard .tx { grid-column: 2 / 4; font: 400 11px/1.35 var(--ff-num); color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.core .fcard .tm { font: 400 10.5px var(--ff-num); color: var(--t2); }
html.core .fcard .sb { font-size: 9.5px; margin-left: 6px; }
html.core .fcard.in { animation: feed-in-l .75s cubic-bezier(.16, .84, .24, 1) both; }
@media (max-width: 980px) { html.core .fcard.in { animation-name: feed-in-t; } }
@keyframes feed-in-t { 0% { opacity: 0; transform: translateY(-26px); filter: brightness(2.2); } 60% { opacity: 1; } 100% { transform: none; filter: none; } }
html.core .fcard.gold.in { animation-duration: 1.05s; }
html.core .fcard.gold.in::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 244, 214, .55) 45%, transparent 70%);
  animation: feed-sheen 1.2s ease-out .15s both; pointer-events: none; }
html.core .fcard.cool { filter: saturate(.25) brightness(.7); opacity: .0; box-shadow: inset 0 0 0 1px rgba(130, 160, 200, .06); max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -6px; }
@keyframes feed-in-l { 0% { opacity: 0; transform: translateX(-42px) scale(.97); filter: brightness(2.2); } 60% { opacity: 1; filter: brightness(1.3); } 100% { transform: none; filter: none; } }
@keyframes feed-in-r { 0% { opacity: 0; transform: translateX(42px) scale(.97); filter: brightness(2.2); } 60% { opacity: 1; filter: brightness(1.3); } 100% { transform: none; filter: none; } }
@keyframes feed-sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
html.core .feed3 .empty-f { padding: 22px 8px; text-align: center; color: var(--t2); font-size: 12px; }

/* -------------------------------------------------------------------------- NAPLÓ-SÁV (összes értesítés) */
#log-rail { position: fixed; top: 49px; right: 0; bottom: 0; z-index: 65; display: flex; pointer-events: none; }
#log-rail .strip { pointer-events: auto; width: 16px; height: 100%; cursor: pointer; position: relative;
  background: linear-gradient(90deg, transparent, rgba(5, 8, 13, .85)); border-left: 1px solid rgba(130, 160, 200, .08); }
#log-rail .strip:hover { background: linear-gradient(90deg, transparent, rgba(12, 18, 28, .95)); }
#log-rail .strip i { position: absolute; left: 4px; right: 4px; height: 3px; border-radius: 2px; background: rgba(108, 156, 188, .35); transition: opacity 1s; }
#log-rail .strip i.gold { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
#log-rail .strip i.bull { background: var(--bull); }
#log-rail .strip i.bear { background: var(--bear); }
#log-rail .strip .lbl { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; font: 600 10px var(--ff-ui); color: var(--t2); letter-spacing: .04em; }
#log-rail .strip.flash-gold { animation: rail-flash 1.2s ease-out; --rf: 245, 184, 61; }
#log-rail .strip.flash-bull { animation: rail-flash 1s ease-out; --rf: 30, 242, 160; }
#log-rail .strip.flash-bear { animation: rail-flash 1s ease-out; --rf: 229, 23, 63; }
#log-rail .strip.flash-info { animation: rail-flash .9s ease-out; --rf: 108, 156, 188; }
@keyframes rail-flash { 0% { box-shadow: inset 2px 0 0 rgba(var(--rf), 1), -8px 0 22px -4px rgba(var(--rf), .7); } 100% { box-shadow: none; } }
#log-rail .panel { pointer-events: auto; width: 440px; max-width: calc(100vw - 16px); height: 100%; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(6, 9, 15, .96), rgba(3, 5, 9, .97)), var(--noise); border-left: 1px solid rgba(130, 160, 200, .12);
  box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .9); transform: translateX(100%); transition: transform .38s cubic-bezier(.2, .8, .2, 1); position: absolute; right: 16px; top: 0; }
#log-rail.open .panel { transform: none; }
#log-rail:not(.open) .panel { visibility: hidden; transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s .38s; }
#log-rail .ph { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
#log-rail .ph h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--t0); }
#log-rail .ph .cnt { font: 500 11px var(--ff-num); color: var(--t2); }
#log-rail .ph button.x { margin-left: auto; background: none; border: 1px solid rgba(130, 160, 200, .15); color: var(--t1); border-radius: 8px; width: 28px; height: 28px; cursor: pointer; }
:is(#log-rail, .lc-term) .flt { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; border-bottom: 1px solid rgba(130, 160, 200, .07); }
:is(#log-rail, .lc-term) .flt button { --c: 108, 156, 188; background: rgba(var(--c), .05); border: 1px solid rgba(var(--c), .18); color: var(--t1); border-radius: 999px; padding: 3px 10px;
  font: 600 11px var(--ff-ui); cursor: pointer; }
:is(#log-rail, .lc-term) .flt button.on { background: rgba(var(--c), .18); color: rgb(var(--c)); border-color: rgba(var(--c), .5); }
:is(#log-rail, .lc-term) .flt button[data-f="gold"] { --c: 245, 184, 61; } :is(#log-rail, .lc-term) .flt button[data-f="bull"] { --c: 30, 242, 160; } :is(#log-rail, .lc-term) .flt button[data-f="bear"] { --c: 229, 23, 63; }
:is(#log-rail, .lc-term) .flt .sp { width: 1px; background: rgba(130, 160, 200, .12); margin: 0 2px; }
:is(#log-rail, .lc-term) .term { flex: 1; overflow: auto; padding: 8px 0 18px; font: 400 11.5px/1.5 var(--ff-num); }
:is(#log-rail, .lc-term) .ln { --c: 108, 156, 188; display: grid; grid-template-columns: 46px 16px 1fr; gap: 0 8px; padding: 4px 16px 4px 14px; border-left: 2px solid transparent; color: var(--t1); }
:is(#log-rail, .lc-term) .ln:hover { background: rgba(130, 160, 200, .04); }
:is(#log-rail, .lc-term) .ln .tm { color: var(--t3); }
:is(#log-rail, .lc-term) .ln .ic { color: rgb(var(--c)); text-align: center; }
:is(#log-rail, .lc-term) .ln .bd { min-width: 0; }
:is(#log-rail, .lc-term) .ln .ti { color: rgb(var(--c)); font-weight: 600; }
:is(#log-rail, .lc-term) .ln .sy { font: 700 9px var(--ff-ui); padding: 0 5px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
:is(#log-rail, .lc-term) .ln .sy.ob { color: var(--id-ob); background: rgba(92, 200, 232, .12); } :is(#log-rail, .lc-term) .ln .sy.ai { color: var(--id-ai); background: rgba(185, 162, 255, .12); }
:is(#log-rail, .lc-term) .ln .tx { color: var(--t1); overflow-wrap: anywhere; }
:is(#log-rail, .lc-term) .ln.info .ti { color: #b8c6d6; }
:is(#log-rail, .lc-term) .ln.bull { --c: 30, 242, 160; } :is(#log-rail, .lc-term) .ln.bear { --c: 229, 23, 63; }
:is(#log-rail, .lc-term) .ln.gold { --c: 245, 184, 61; border-left-color: var(--gold); background: linear-gradient(90deg, rgba(245, 184, 61, .12), transparent 70%); padding-top: 7px; padding-bottom: 7px; }
:is(#log-rail, .lc-term) .ln.gold .ti { color: var(--gold-hot); text-shadow: 0 0 12px rgba(245, 184, 61, .5); font-size: 12.5px; }
:is(#log-rail, .lc-term) .ln.bear .ti { text-shadow: 0 0 10px rgba(229, 23, 63, .4); }
:is(#log-rail, .lc-term) .ln.new { animation: ln-in .5s ease-out both; }
:is(#log-rail, .lc-term) .ln.new .tx { animation: ln-type .9s steps(40, end) both; display: inline-block; overflow: hidden; white-space: nowrap; max-width: 100%; vertical-align: bottom; }
@keyframes ln-in { from { opacity: 0; transform: translateY(-6px); background: rgba(var(--c), .25); } to { opacity: 1; transform: none; } }
@keyframes ln-type { from { max-width: 0; } to { max-width: 100%; } }
:is(#log-rail, .lc-term) .day { padding: 10px 16px 4px; color: var(--t3); font: 600 10.5px var(--ff-ui); }
:is(#log-rail, .lc-term) .nolog { padding: 30px 16px; color: var(--t2); text-align: center; }
html.core main { margin-right: 16px; }

/* -------------------------------------------------------------------------- debug / szimulátor */
#core-debug { position: fixed; left: 16px; bottom: 16px; z-index: 70; width: 260px; padding: 12px; border-radius: 14px; font-size: 12px; color: var(--t1);
  background: rgba(6, 9, 15, .94); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(130, 160, 200, .15); }
#core-debug h4 { margin: 0 0 8px; font-size: 12px; color: var(--t0); display: flex; }
#core-debug h4 span { margin-left: auto; font: 500 11px var(--ff-num); color: var(--t2); }
#core-debug .row { display: flex; gap: 6px; margin: 6px 0; }
#core-debug button { flex: 1; padding: 6px 4px; border-radius: 8px; border: 1px solid rgba(130, 160, 200, .2); background: rgba(12, 18, 28, .9); color: var(--t0); cursor: pointer; font: 600 11px var(--ff-ui); }
#core-debug button.g { border-color: rgba(245, 184, 61, .6); color: var(--gold-hot); }
#core-debug button.b { border-color: rgba(30, 242, 160, .5); color: var(--bull); }
#core-debug button.r { border-color: rgba(229, 23, 63, .6); color: #ff5c7a; }
#core-debug input[type=range] { width: 100%; accent-color: var(--gold); }
#core-debug .kv { font: 400 11px var(--ff-num); color: var(--t2); line-height: 1.6; }

/* -------------------------------------------------------------------------- BOOT – a rendszer felizzik */
#boot { position: fixed; inset: 0; z-index: 80; pointer-events: auto; display: grid; place-items: end center; padding-bottom: 8vh;
  background: radial-gradient(ellipse at 50% 45%, rgba(3, 5, 9, .0), rgba(3, 5, 9, .65) 70%); transition: opacity .5s ease; cursor: pointer; }
#boot .bt { font: 500 11px var(--ff-num); color: var(--t2); letter-spacing: .06em; opacity: .8; }
#boot.done { opacity: 0; pointer-events: none; }
html.core.booting .bar, html.core.booting .glass, html.core.booting #xb .card:not(.xb-chart), html.core.booting #xb .xb-banner { opacity: 0; transform: translateY(14px); }
html.core.boot-run .bar { opacity: 1; transform: none; transition: opacity .6s ease .15s, transform .6s ease .15s; }
html.core.boot-run .glass, html.core.boot-run #xb .card:not(.xb-chart), html.core.boot-run #xb .xb-banner {
  opacity: 1; transform: none; transition: opacity .7s ease calc(.85s + var(--bi, 0) * 70ms), transform .8s cubic-bezier(.16, .84, .24, 1) calc(.85s + var(--bi, 0) * 70ms); }
html.core.booting .ohlc, html.core.booting #chart { opacity: 0; }
html.core.boot-run .ohlc, html.core.boot-run #chart { opacity: 1; transition: opacity .7s ease .55s; }

/* -------------------------------------------------------------------------- reszponzív */
@media (max-width: 1400px) {
  html.core #xb { grid-template-columns: 270px minmax(0, 1fr) 300px; column-gap: 34px; }
  html.core aside#side { width: 348px; }
  html.core #ob-main { gap: 36px; }
  html.core .heart { grid-template-columns: 124px 1fr; }
  html.core .heart .reactor { width: 124px; height: 124px; }
  html.core .heart .wr-n { font-size: 32px; }
}
@media (max-width: 1180px) {
  html.core #xb { grid-template-columns: minmax(0, 1fr) 300px; }
  html.core .xb-left { grid-column: 1 / -1; flex-direction: row; }
  html.core .xb-left > * { flex: 1; }
  html.core #xb .xb-chart { grid-column: 1; height: 560px; }
  html.core .xb-right { grid-column: 2; }
  html.core #xb .xb-stats { grid-column: 1 / -1; }
  html.core #xb .xb-ai { grid-column: 1 / -1; }
  html.core #xb .xb-ai .ai-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  html.core body { overflow: auto; }
  html.core main { height: auto; padding: 10px; margin-right: 16px; }
  html.core #ob-main { gap: 18px; }
  html.core aside#side { width: 100%; height: auto; }
  html.core #box-tabs { height: 60vh; flex: none; }
  html.core #xb { grid-template-columns: minmax(0, 1fr); column-gap: 0; padding: 0; }
  html.core .xb-left, html.core .xb-right, html.core #xb .xb-chart, html.core #xb .xb-stats, html.core #xb .xb-ai, html.core #xb .xb-hourly { grid-column: 1; }
  html.core .xb-left { flex-direction: column; }
  html.core #xb .xb-chart { height: 460px; }
  html.core #xb .xb-ai .ai-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  html.core .heart { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  html.core .heart .pnl-k { justify-content: center; }
  #log-rail .panel { width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  html.core .fcard.in, html.core :is(#log-rail, .lc-term) .ln.new, html.core :is(#log-rail, .lc-term) .ln.new .tx { animation-duration: .01ms !important; }
  html.core .shake, html.core .heart.pressure { animation: core-hit 1.1s ease-out !important; }
  html.core .glass { transform: none !important; }
}
