/* ============================================================================================
   LIVING CORE v2 – összefűzött felület (csak elrendezés). html.core.lc2 alatt él; a tokenek, színek,
   üveg és hangulat a core.css-ből jönnek. Fluid: clamp() méretek, container query-k, töréspont csak ott,
   ahol az elrendezés szerkezete változik (gyűrű → két oszlop → egy oszlop).
   ============================================================================================ */
html.core.lc2 {
  --hdr: 49px;
  --pad: clamp(10px, 1.1vw, 20px);
  --gap-c: clamp(30px, 3.4vw, 66px);        /* kábel-csatorna a mag és az oldalsó panelek között */
  --gap-r: clamp(14px, 2.2vh, 30px);        /* kábel-csatorna felül / alul */
  --ease-out: cubic-bezier(.16, .84, .24, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}
html.core.lc2 #ob-main, html.core.lc2 #xb { display: none !important; }
html.core.lc2 #views { display: none; }
html.core.lc2 main { display: block; padding: 0; margin-right: 16px; height: calc(100dvh - var(--hdr)); overflow: hidden; }

/* -------------------------------------------------------------------------- lapozó tároló */
#lc { height: 100%; overflow-x: hidden; overflow-y: auto; scroll-snap-type: y proximity; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(120, 150, 190, .25) transparent; }
#lc::-webkit-scrollbar { width: 6px; } #lc::-webkit-scrollbar-thumb { background: rgba(120, 150, 190, .22); border-radius: 3px; }
.lc-page { position: relative; min-height: 100%; box-sizing: border-box; padding: var(--pad) calc(var(--pad) + 22px) var(--pad) var(--pad); scroll-snap-align: start; }

/* -------------------------------------------------------------------------- 1. oldal: gyűrű a mag körül */
.lc-p1 { height: 100%; display: grid;
  grid-template-columns: clamp(258px, 21vw, 400px) minmax(0, 1fr) clamp(276px, 23vw, 430px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "status status status" "top top top" "left core right" "left feed right";
  column-gap: var(--gap-c); row-gap: var(--gap-r); }
.lc-status { grid-area: status; }
.lc-status:empty, .lc-status:has(.xb-banner.hidden) { display: none; }
.lc-top { grid-area: top; display: grid; gap: clamp(10px, 1vw, 16px);
  grid-template-columns: minmax(180px, .85fr) minmax(250px, 1.15fr) minmax(250px, 1.15fr) minmax(200px, .9fr); }
.lc-left { grid-area: left; }
.lc-right { grid-area: right; }
.lc-core { grid-area: core; position: relative; min-height: 0; display: flex; }
.lc-feed { grid-area: feed; position: relative; }
html.core.lc2 #chart-wrap { flex: 1; width: 100%; height: 100%; min-height: 0; }

.lc-slot { position: relative; min-width: 0; container-type: inline-size; }
html.core.lc2 .lc-slot > .card, html.core.lc2 .lc-slot > .glass, html.core.lc2 .pg-page > .card {
  background: none !important; box-shadow: none !important; backdrop-filter: none !important; border: 0 !important; border-radius: 0 !important; transform: none !important; }
html.core.lc2 .lc-slot > .card::before, html.core.lc2 .lc-slot > .card::after, html.core.lc2 .lc-slot > .glass::before, html.core.lc2 .lc-slot > .glass::after,
html.core.lc2 .pg-page > .card::before, html.core.lc2 .pg-page > .card::after { display: none !important; }

/* állapotsáv – tömör, egy soros; rámutatva kinyílik */
html.core.lc2 .lc-status .xb-banner { display: flex; flex-direction: row; gap: 8px; }
html.core.lc2 .lc-status .bn { flex: 1 1 0; min-width: 0; }
html.core.lc2 .lc-status .bn { padding: 6px 14px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 10px; }
html.core.lc2 .lc-status .bn:hover { white-space: normal; }

/* felső sor: ár · OB-szív · AI-szív · bot */
.s-quote { display: flex; flex-direction: column; justify-content: center; }
html.core.lc2 .s-quote .quote { padding: clamp(10px, 1vw, 16px); }
html.core.lc2 .s-quote .quote .px { font-size: clamp(22px, 2vw, 32px); letter-spacing: -.035em; }
html.core.lc2 .s-quote .quote .sub { line-height: 1.5; }
.s-quote::after { content: "XAUUSD · MT5 élő ár"; position: absolute; top: 10px; right: 14px; font-size: 10.5px; color: var(--t3); }
html.core.lc2 .lc-slot .heart { --rs: clamp(84px, 30cqw, 124px); padding: clamp(10px, 1vw, 14px) clamp(12px, 1.2vw, 16px);
  grid-template-columns: var(--rs) minmax(0, 1fr); gap: clamp(10px, 1vw, 16px); justify-items: stretch; text-align: left; }
html.core.lc2 .lc-slot .heart .reactor { width: var(--rs); height: var(--rs); }
html.core.lc2 .lc-slot .heart .wr-n { font-size: clamp(22px, 9cqw, 34px); }
html.core.lc2 .lc-slot .heart .wr-n small { font-size: .45em; }
html.core.lc2 .lc-slot .heart .wr-k { font-size: 10px; }
html.core.lc2 .lc-slot .heart .pnl-v { font-size: clamp(20px, 8.4cqw, 30px); margin: 2px 0 4px; }
html.core.lc2 .lc-slot .heart .pnl-k { justify-content: space-between; }
html.core.lc2 .lc-slot .heart canvas.eq { height: 26px; margin-top: 6px; }
html.core.lc2 .s-heart-ob .pnl-k .lab::before { content: "◆ OrderBlock · "; color: var(--id-ob); font-weight: 600; }
html.core.lc2 .s-heart-ai .pnl-k .lab::before { content: "● XAUBot-AI · "; color: var(--id-ai); font-weight: 600; }
html.core.lc2 #heart-ai { grid-template-columns: var(--rs) minmax(0, 1fr); justify-items: stretch; text-align: left; }
html.core.lc2 #heart-ai .pnl { width: auto; }
html.core.lc2 #heart-ai .pnl-k { justify-content: space-between; }
html.core.lc2 .lc-slot .heart .pnl-sub { grid-template-columns: repeat(4, auto); justify-content: start; gap: 2px 14px; }
html.core.lc2 .s-hero .xb-hero { display: grid !important; grid-template-columns: 1fr 1fr; height: 100%; }
html.core.lc2 .s-hero .xb-hero > div { padding: clamp(10px, 1vw, 14px) !important; border: 0 !important; }
html.core.lc2 .s-hero .xb-hero > div:nth-child(2), html.core.lc2 .s-hero .xb-hero > div:nth-child(3), html.core.lc2 .s-hero .xb-hero > div:nth-child(4) { display: none; }
html.core.lc2 .s-hero .xb-hero > div:last-child { border-left: 1px solid rgba(130, 160, 200, .07) !important; }
html.core.lc2 .s-hero .xb-hero .big { font-size: clamp(18px, 1.6vw, 24px); }
html.core.lc2 .s-hero .xb-hero .sub { font-size: 11px; }
@container (max-width: 380px) {
  html.core.lc2 .lc-slot .heart .pnl-sub { grid-template-columns: 1fr 1fr; }
}
@container (max-width: 280px) {
  html.core.lc2 .lc-slot .heart, html.core.lc2 #heart-ai { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  html.core.lc2 .lc-slot .heart .pnl { width: 100%; }
  html.core.lc2 .s-hero .xb-hero { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------- lapozható panel */
.pager { display: flex; flex-direction: column; min-height: 0; overflow: hidden; outline: none; }
.pg-head { display: flex; align-items: center; gap: 10px; padding: 8px clamp(12px, 1.1vw, 16px) 0; border-bottom: 1px solid rgba(130, 160, 200, .07); }
.pg-tabs { display: flex; gap: clamp(12px, 1.2vw, 20px); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pg-tabs button { position: relative; background: none; border: 0; padding: 9px 0 11px; color: var(--t2); cursor: pointer; white-space: nowrap;
  font: 600 12.5px var(--ff-ui); letter-spacing: .005em; transition: color .3s; }
.pg-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--flow);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-out); box-shadow: 0 0 10px rgba(108, 156, 188, .7); }
.pg-tabs button:hover { color: var(--t1); }
.pg-tabs button.on { color: var(--t0); }
.pg-tabs button.on::after { transform: scaleX(1); }
.pg-dots { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.pg-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(130, 160, 200, .25); cursor: pointer; transition: width .45s var(--ease-out), background .3s; }
.pg-dots i.on { width: 18px; background: var(--flow); box-shadow: 0 0 8px rgba(108, 156, 188, .6); }
.pg-view { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y; }
.pg-track { display: flex; height: 100%; transition: transform .6s var(--ease-out); will-change: transform; }
.pg-page { flex: 0 0 100%; min-width: 0; height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(120, 150, 190, .22) transparent; }
html.core.lc2 .pg-page > .card > h3 { display: none; }
html.core.lc2 .pg-page > .tab { display: block !important; height: auto; overflow: visible; }
html.core.lc2 .pg-page > .card .body { padding: clamp(10px, 1vw, 14px) clamp(12px, 1.1vw, 16px) 16px; }
html.core.lc2 .pg-page th { background: rgba(8, 12, 19, .96); }
html.core.lc2 .pg-page .ai-grid { grid-template-columns: 1fr !important; }

/* -------------------------------------------------------------------------- top 3 + felugró sáv */
html.core.lc2 .lc-feed .feed3 { padding: 8px 10px 10px; }
html.core.lc2 .lc-feed .feed3 .fh { padding: 0 4px 6px; }
html.core.lc2 .lc-feed .feed3 .list { flex-direction: row; min-height: 60px; gap: 8px; align-items: stretch; }
html.core.lc2 .lc-feed .fcard { flex: 1 1 0; min-width: 0; max-height: none; transition: opacity 1.2s ease, filter 1.2s ease, flex-basis .6s var(--ease-io) .8s, padding .6s ease .8s, margin .6s ease .8s; }
html.core.lc2 .lc-feed .fcard.cool { flex: 0 0 0; padding-left: 0; padding-right: 0; margin-left: -8px; max-height: none; }
html.core.lc2 .lc-feed .fcard.in { animation-name: feed-in-t; }
html.core.lc2 .lc-feed .empty-f { flex: 1; padding: 14px 8px; }
.lc-pop { position: absolute; left: 7%; right: 7%; top: 6px; z-index: 6; pointer-events: none; }
.lc-pop .pop { --c: 108, 156, 188; position: absolute; inset: 0 0 auto 0; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  height: 46px; padding: 0 18px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(90deg, rgba(var(--c), .3), rgba(var(--c), .1) 55%, rgba(5, 8, 13, .94)), rgba(5, 8, 13, .9);
  box-shadow: inset 0 0 0 1px rgba(var(--c), .6), 0 14px 44px -10px rgba(var(--c), .6); backdrop-filter: blur(12px);
  animation: pop-in .55s var(--ease-out) both; }
.lc-pop .pop.gold { --c: 245, 184, 61; } .lc-pop .pop.bull { --c: 30, 242, 160; } .lc-pop .pop.bear { --c: 229, 23, 63; }
.lc-pop .pop .ic { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: rgb(var(--c)); background: rgba(var(--c), .16); box-shadow: inset 0 0 0 1px rgba(var(--c), .4); }
.lc-pop .pop b { font: 600 13px var(--ff-ui); color: var(--t0); white-space: nowrap; }
.lc-pop .pop .tx { font: 400 12px var(--ff-num); color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-pop .pop .sb { font: 700 10px var(--ff-ui); color: var(--t2); }
.lc-pop .pop.gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgba(255, 244, 214, .5) 48%, transparent 70%); animation: feed-sheen 1.1s ease-out .2s both; }
.lc-pop .pop.bear { animation: pop-in .4s var(--ease-out) both, core-shake .3s .1s; }
.lc-pop .pop.melt { animation: pop-melt .6s var(--ease-io) forwards; }
@keyframes pop-in { 0% { opacity: 0; transform: translateY(-16px) scaleX(.62); filter: brightness(2.4); } 55% { opacity: 1; filter: brightness(1.25); } 100% { transform: none; filter: none; } }
@keyframes pop-melt { to { opacity: 0; transform: translateY(30px) scale(.9, .7); filter: blur(3px) brightness(1.4); } }

/* -------------------------------------------------------------------------- 2. és 3. oldal */
.lc-ph { padding: clamp(8px, 1.2vh, 18px) 4px clamp(10px, 1.6vh, 20px); }
.lc-ph h2 { margin: 0; font: 600 clamp(18px, 1.5vw, 24px)/1.2 var(--ff-ui); color: var(--t0); letter-spacing: -.01em; }
.lc-ph p { margin: 6px 0 0; color: var(--t2); font-size: 13px; max-width: 70ch; }
.lc-p2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(12px, 1.6vh, 20px); align-content: start; }
html.core.lc2 .s-stats .card > h3, html.core.lc2 .s-hourly .card > h3 { padding: 14px 18px 0; }
.lc-p3 { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.s-log { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.lc-term .ph { padding: 12px 16px 6px; color: var(--t2); font: 500 11px var(--ff-num); }
.lc-term .term { flex: 1; min-height: 0; overflow: auto; padding: 6px 0 18px; font: 400 12px/1.55 var(--ff-num); }

/* -------------------------------------------------------------------------- oldalpontok */
#lc-dots { position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 45; display: flex; flex-direction: column; gap: 12px; }
#lc-dots button { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(130, 160, 200, .3); cursor: pointer;
  transition: height .5s var(--ease-out), background .3s, box-shadow .3s; }
#lc-dots button::before { content: ""; position: absolute; inset: -8px; }
#lc-dots button.on { height: 26px; background: var(--flow); box-shadow: 0 0 12px rgba(108, 156, 188, .7); }
#lc-dots button span { position: absolute; right: 18px; top: 50%; transform: translate(6px, -50%); opacity: 0; white-space: nowrap; pointer-events: none;
  font: 500 11px var(--ff-ui); color: var(--t1); padding: 4px 9px; border-radius: 7px; background: rgba(8, 12, 19, .92); box-shadow: inset 0 0 0 1px rgba(130, 160, 200, .14);
  transition: opacity .25s, transform .35s var(--ease-out); }
#lc-dots button:hover span, #lc-dots button:focus-visible span { opacity: 1; transform: translate(0, -50%); }
html:not(.lc2) #lc-dots { display: none; }

/* -------------------------------------------------------------------------- fókusz mód */
html.core.lc2 #lc-focus[aria-pressed="true"] { color: var(--t0); border-color: rgba(108, 156, 188, .5); box-shadow: 0 0 14px -4px var(--flow); }
html.lc-focus #lc { overflow: hidden; }
html.lc-focus .lc-p1 > :not(.lc-core) { opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s .35s; }
html.lc-focus .lc-core { position: fixed; inset: calc(var(--hdr) + 12px) 22px 14px 14px; z-index: 30; animation: focus-in .45s var(--ease-out); }
html.lc-focus .bar > :not(.brand):not(.tfs):not(#layers-menu):not(#lc-focus):not(#fit) { display: none !important; }
html.lc-focus #lc-dots, html.lc-focus #log-rail, html.lc-focus #core-debug { display: none !important; }
html.lc-focus main { margin-right: 0; }
@keyframes focus-in { from { opacity: .4; transform: scale(.985); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------------------- reszponzív szerkezet */
@media (max-width: 1320px) and (min-width: 1101px) {
  .lc-top { grid-template-columns: minmax(150px, .7fr) minmax(250px, 1.2fr) minmax(250px, 1.2fr) minmax(190px, .9fr); }
}
/* alacsony képernyőn (laptop) a mag kapja a helyet: tömör felső sor */
@media (max-height: 900px) and (min-width: 1101px) {
  html.core.lc2 { --gap-r: clamp(10px, 1.6vh, 18px); }
  html.core.lc2 .lc-slot .heart { --rs: clamp(68px, 22cqw, 92px); padding-top: 8px; padding-bottom: 8px; }
  html.core.lc2 .lc-slot .heart canvas.eq { display: none; }
  html.core.lc2 .lc-slot .heart .wr-k { display: none; }
  html.core.lc2 .lc-slot .heart .pnl-sub { grid-template-columns: repeat(4, auto); font-size: 10.5px; }
  html.core.lc2 .s-hero .xb-hero > div { padding: 8px 12px !important; }
  html.core.lc2 .s-hero .xb-hero .sub { font-size: 10.5px; line-height: 1.35; }
  html.core.lc2 .s-hero .xb-hero .big { font-size: 18px; }
  html.core.lc2 .s-hero .xb-hero > div:last-child { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-content: start; }
  html.core.lc2 .s-hero .xb-hero > div:last-child > .k { grid-column: 1 / -1; }
  html.core.lc2 .s-hero .xb-hero > div:last-child > .mid { grid-row: span 3; align-self: center; font-size: 13px; }
  .s-quote::after { display: none; }
  html.core.lc2 .lc-status .bn { padding: 4px 12px; }
  html.core.lc2 .lc-feed .feed3 .fh { display: none; }
  html.core.lc2 .lc-feed .feed3 { padding: 8px; }
}
@media (max-width: 1100px) {
  .lc-p1 { height: auto; min-height: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto clamp(360px, 58vh, 660px) auto clamp(420px, 62vh, 620px);
    grid-template-areas: "status status" "top top" "core core" "feed feed" "left right"; column-gap: clamp(14px, 2vw, 24px); }
  .lc-page { padding-right: calc(var(--pad) + 18px); }
}
@media (max-width: 760px) {
  html.core.lc2 main { height: calc(100svh - var(--hdr)); }
  #lc { scroll-snap-type: none; }
  #lc-dots { display: none; }
  .lc-page { padding: 8px 22px 12px 8px; min-height: 0; }
  .lc-p1 { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto clamp(280px, 52svh, 520px) auto auto 70svh 70svh;
    grid-template-areas: "status" "core" "top" "feed" "left" "right"; row-gap: 14px; }
  .lc-top { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
  .lc-top > * { scroll-snap-align: start; }
  html.core.lc2 .lc-feed .feed3 .list { flex-direction: column; }
  html.core.lc2 .lc-feed .fcard { flex: none; }
  html.core.lc2 #pine, html.core.lc2 #fit, html.core.lc2 .sel { display: none; }
  html.core.lc2 .bar { gap: 6px; padding: 6px 10px; }
  html.core.lc2 .pill { max-width: 84px; }
  html.core.lc2 .lc-feed .fcard.cool { flex: none; max-height: 0; padding-top: 0; padding-bottom: 0; margin: -6px 0 0; }
  .lc-pop { position: fixed; left: 10px; right: 26px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 55; }
  .lc-p3 { height: 80svh; }
  .pg-tabs button { padding: 12px 0 13px; font-size: 13.5px; }
}
@media (pointer: coarse) {
  .pg-dots i { width: 8px; height: 8px; } .pg-dots i.on { width: 22px; }
  html.core.lc2 .feed3 .fh button { padding: 8px 14px; }
  #log-rail .strip { width: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-track, .pg-tabs button::after, #lc-dots button { transition-duration: .01ms !important; }
  .lc-pop .pop, .lc-pop .pop.melt { animation-duration: .01ms !important; }
}
