/* ============================================================================
   Crypto Evolution Matrix — bejárható 3D-térkép (utmutatok/crypto-evolution-matrix) · v2
   Arculat: a site tokenjei (fekete felület, egy piros akcentus #FF4D3D, PRO = arany), serif címsorok
   (Instrument Serif → Newsreader → Georgia), Inter szöveg, JetBrains Mono adat. Nincs glassmorphism,
   nincs gradiens-háttér, nincs neon. Minden szabály a .cem névtér alatt; állapot-osztályok: is-*.
   A színpad a világos témában is sötét betét marad. Full-bleed a Bootstrap .container-en belül (--cem-vw a JS-ből).
   ========================================================================== */
.cem {
  --cem-top: 65px;
  --cem-vw: 100vw;
  --bg: #07090D; --surface: #0D1117; --surface-2: #111827; --line: #1F2937; --line-strong: #2A3441;
  --text: #F9FAFB; --text-2: #D1D5DB; --muted: #9CA3AF; --faint: #6B7280;
  --red: #FF4D3D; --red-soft: rgba(255,77,61,.14); --red-border: rgba(255,77,61,.4);
  --gold: #FFD84A; --gold-soft: rgba(245,184,0,.12); --gold-border: rgba(245,184,0,.42);
  --green: #22C55E; --danger: #EF4444; --blue: #60A5FA;
  --serif: "Instrument Serif", "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  --vignette: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.55) 100%);
  --lbl-bg: rgba(7,9,13,.78); --lbl-sel-bg: rgba(7,9,13,.9); --media-fade: rgba(13,17,23,0); --media-fade-to: rgba(13,17,23,.96); --panel-shadow: 0 24px 60px rgba(0,0,0,.45);
  position: relative; isolation: isolate; box-sizing: border-box;
  width: var(--cem-vw); margin-left: calc(50% - var(--cem-vw) / 2);
  height: calc(100vh - var(--cem-top) - 48px); height: calc(100dvh - var(--cem-top) - 48px); min-height: 560px; max-height: 1000px; scroll-margin-top: calc(var(--cem-top) + 8px);
  overflow: hidden; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.cem *, .cem *::before, .cem *::after { box-sizing: border-box; }
.cem.is-full { position: fixed; inset: 0; width: auto; height: auto; max-height: none; min-height: 0; margin: 0; z-index: 1100; }
html.cem-noscroll, html.cem-noscroll body { overflow: hidden !important; }
.cem::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: var(--vignette); }

.cem-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; z-index: 0; }
.cem.is-full .cem-gl, .cem.is-engaged .cem-gl { touch-action: none; }
.cem.is-dragging .cem-gl { cursor: grabbing; }
.cem.is-hover .cem-gl { cursor: pointer; }
.cem-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.cem-lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, 0); pointer-events: auto; cursor: pointer; padding: 3px 9px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: var(--lbl-bg); border: 1px solid var(--line); white-space: nowrap; transition: opacity .25s var(--ease), border-color .25s, color .25s; line-height: 1.5; animation: cemFade .35s var(--ease); }
.cem-lbl.is-moon { font-size: 9.5px; text-transform: none; letter-spacing: .03em; color: var(--muted); }
.cem-lbl.is-sys { font-family: var(--serif); font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); }
.cem-lbl.is-sun { font-size: 16px; border-color: var(--red-border); background: var(--lbl-sel-bg); }
.cem-lbl.is-hover { border-color: var(--line-strong); color: var(--text); }
.cem-lbl.is-sel { border-color: var(--red); color: var(--text); }
.cem-lbl.is-dim { opacity: .18; }
.cem-lbl.is-hidden { display: none; }
.cem-lbl.is-pro::before { content: "🔒 "; }
@keyframes cemFade { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- HUD ---------- */
.cem-hud { position: absolute; z-index: 5; pointer-events: none; }
.cem-hud > * { pointer-events: auto; }
.cem-hud-top { top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.cem-brand { display: flex; flex-direction: column; gap: 1px; margin-right: auto; }
.cem-brand small { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.cem-brand b { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -.01em; color: var(--text); line-height: 1.15; }
.cem-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cem-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.cem-seg button { appearance: none; border: 0; background: transparent; color: var(--muted); font: 500 12px var(--sans); padding: 7px 12px; border-radius: 999px; cursor: pointer; letter-spacing: .01em; line-height: 1.3; transition: background .2s, color .2s; }
.cem-seg button:hover { color: var(--text); }
.cem-seg button.is-on { background: var(--line); color: var(--text); }
.cem-btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: 500 12px var(--sans); padding: 8px 13px; border-radius: 999px; cursor: pointer; letter-spacing: .01em; line-height: 1.3; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: border-color .2s, color .2s, background .2s; }
.cem-btn:hover { border-color: var(--line-strong); color: var(--text); }
.cem-btn.is-red { border-color: var(--red-border); color: var(--red); }
.cem-btn.is-red:hover { background: var(--red); color: #fff; border-color: var(--red); }
.cem-btn.is-gold { border-color: var(--gold-border); color: var(--gold); }
.cem-btn.is-sm { padding: 6px 10px; font-size: 11px; }

.cem-hud-bottom { left: 0; right: 0; bottom: 0; padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.cem-timeline { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); max-width: 760px; }
.cem-timeline label { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); white-space: nowrap; margin: 0; }
.cem-timeline input[type="range"] { flex: 1; accent-color: var(--red); margin: 0; min-width: 80px; border-radius: 0; }
.cem-timeline b { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--text); min-width: 58px; text-align: right; }
.cem-timeline .cem-era { font-size: 11.5px; color: var(--muted); max-width: 260px; }
.cem-tour { display: none; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--red-border); max-width: 760px; }
.cem-tour.is-on { display: flex; }
.cem-tour .cem-tstep { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); white-space: nowrap; }
.cem-tour .cem-tname { font-family: var(--serif); font-size: 16px; color: var(--text); flex: 1; }
.cem-hint { font-size: 11px; color: var(--faint); }

/* ---------- panel ---------- */
.cem-panel { position: absolute; z-index: 6; top: 72px; right: 18px; bottom: 96px; width: 440px; max-width: calc(100% - 36px); overflow: auto; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--panel-shadow); transform: translateX(24px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease); scrollbar-width: thin; overscroll-behavior: contain; }
.cem-panel.is-on { transform: none; opacity: 1; pointer-events: auto; }
.cem-pclose { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--lbl-sel-bg); color: var(--text); font-size: 16px; cursor: pointer; line-height: 1; padding: 0; }
.cem-pclose:hover { border-color: var(--red); }
.cem-pmedia { height: 170px; overflow: hidden; border-bottom: 1px solid var(--line); position: relative; }
.cem-pmedia img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.cem-pmedia::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--media-fade) 55%, var(--media-fade-to) 100%); }
.cem-pbody { padding: 18px 22px 24px; }
.cem.is-anim .cem-pbody > * { animation: cemReveal .4s var(--ease) both; }
.cem.is-anim .cem-pbody > *:nth-child(2) { animation-delay: .04s } .cem.is-anim .cem-pbody > *:nth-child(3) { animation-delay: .08s } .cem.is-anim .cem-pbody > *:nth-child(4) { animation-delay: .12s } .cem.is-anim .cem-pbody > *:nth-child(5) { animation-delay: .16s } .cem.is-anim .cem-pbody > *:nth-child(n+6) { animation-delay: .2s }
@keyframes cemReveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cem-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cem .cem-pbody h2 { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.08; letter-spacing: -.01em; color: var(--text); }
.cem .cem-pbody p { margin: 0 0 10px; color: var(--text-2); font-size: 14.5px; line-height: 1.55; font-weight: 400; }
.cem .cem-pbody p.cem-sum { font-size: 15.5px; color: var(--text); margin: 0 0 14px; line-height: 1.5; }
.cem-block { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.cem .cem-block h4, .cem .cem-sec h4, .cem .cem-dfh h4, .cem .cem-quiz h4, .cem .cem-pro h4, .cem .cem-gate h4 { margin: 0 0 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.cem .cem-block p { margin: 0; font-size: 13.5px; }
.cem-block.is-risk { border-color: rgba(239,68,68,.35); }
.cem-block.is-mis { border-color: var(--gold-border); }
.cem .cem-block.is-mis p::before { content: "„"; }
.cem-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.cem-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.cem-status.is-ok::before { background: var(--green); } .cem-status.is-plan::before { background: var(--gold); } .cem-status.is-chk::before { background: var(--danger); }
.cem-status.is-anal { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: .01em; font-size: 12.5px; border-style: dashed; } .cem-status.is-anal::before { display: none; }
.cem-steps { counter-reset: cems; margin: 12px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.cem-step { position: relative; padding: 10px 12px 10px 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.cem-step::before { counter-increment: cems; content: counter(cems); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--red); color: var(--red); font-family: var(--mono); font-size: 11px; display: grid; place-items: center; }
.cem-step b { color: var(--text); display: block; margin-bottom: 2px; font-weight: 500; }

/* élő tartalom-szekciók */
.cem-sec { margin: 16px 0 0; }
.cem-rows { display: flex; flex-direction: column; gap: 6px; }
.cem-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 13.5px; line-height: 1.4; transition: border-color .2s; }
a.cem-row:hover { border-color: var(--line-strong); color: var(--text); }
.cem-row .cem-date { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.cem-row .cem-ttl { color: var(--text); }
.cem-row .cem-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cem-row.is-locked .cem-ttl { color: var(--text-2); }
.cem-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cem-chip.is-pro { border-color: var(--gold-border); color: var(--gold); }
.cem-chip.is-long { border-color: rgba(34,197,94,.45); color: var(--green); } .cem-chip.is-short { border-color: rgba(239,68,68,.45); color: var(--danger); }
.cem-chip.is-traded { border-color: rgba(34,197,94,.45); color: var(--green); } .cem-chip.is-signaled { border-color: var(--red-border); color: var(--red); } .cem-chip.is-watched { border-color: rgba(96,165,250,.45); color: var(--blue); } .cem-chip.is-shelved { color: var(--muted); }
.cem-thesis { display: block; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--text-2); transition: border-color .2s; }
.cem-thesis:hover { border-color: var(--line-strong); color: var(--text-2); }
.cem-thesis b { display: block; font-family: var(--serif); font-weight: 400; font-size: 16px; color: var(--text); margin-bottom: 3px; }
.cem-thesis .cem-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.cem-thesis span.cem-story { font-size: 13px; color: var(--text-2); display: block; }
.cem-asset { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: baseline; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.cem-asset .cem-sym { font-family: var(--mono); font-size: 12px; color: var(--text); }
.cem-asset .cem-name { color: var(--text-2); }
.cem-asset .cem-pnl { font-family: var(--mono); font-size: 12px; } .cem-pnl.is-up { color: var(--green); } .cem-pnl.is-down { color: var(--danger); }
.cem-asset .cem-th { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.cem-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.cem-stat { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); min-width: 92px; }
.cem-stat b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 400; color: var(--text); line-height: 1.1; }
.cem-stat span { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cem-links { display: flex; flex-wrap: wrap; gap: 6px; }
.cem .cem-links a { display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 12.5px; transition: border-color .2s, color .2s; }
.cem .cem-links a:hover { border-color: var(--red); color: var(--text); }
.cem-more { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--red); text-decoration: none; }
.cem-more:hover { color: var(--text); }

.cem-dfh { margin: 14px 0 0; }
.cem .cem-dfh a { display: block; padding: 8px 12px; margin-bottom: 6px; border-radius: 10px; border: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 13px; line-height: 1.45; transition: border-color .2s; }
.cem .cem-dfh a:hover { border-color: var(--line-strong); color: var(--text); }
.cem-quiz { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.cem .cem-quiz p { margin: 0 0 8px; font-size: 13.5px; color: var(--text); }
.cem .cem-quiz .cem-answer { display: none; color: var(--text-2); font-size: 13.5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.cem .cem-quiz.is-open .cem-answer { display: block; }
.cem-pro { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--gold-border); background: var(--gold-soft); }
.cem .cem-pro h4 { color: var(--gold); }
.cem .cem-pro p { font-size: 13.5px; }
.cem-pro.is-locked { position: relative; overflow: hidden; }
.cem-pro.is-locked .cem-ghost { height: 54px; margin: 8px 0 12px; border-radius: 8px; background: repeating-linear-gradient(180deg, rgba(255,255,255,.1) 0 9px, transparent 9px 18px); filter: blur(4px); opacity: .6; }
.cem .cem-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 16px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 500; font-size: 13px; text-decoration: none; line-height: 1.3; transition: background .2s; }
.cem .cem-cta:hover { background: #FF604F; color: #fff; }
.cem .cem-cta.is-gold { background: var(--gold); color: #1a1407; } .cem .cem-cta.is-gold:hover { background: #ffe27a; color: #1a1407; }
.cem-gate { margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--red-border); background: var(--red-soft); }
.cem .cem-gate h4 { color: var(--red); }
.cem-gate.is-pro { border-color: var(--gold-border); background: var(--gold-soft); } .cem .cem-gate.is-pro h4 { color: var(--gold); }
.cem .cem-teaser { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cem .cem-teaser li { padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: center; margin: 0; list-style: none; }
.cem .cem-teaser li::before { content: "🔒"; font-size: 12px; }
.cem .cem-teaser.is-open li::before { content: "→"; color: var(--gold); }
.cem .cem-teaser.is-open li { cursor: pointer; }
.cem-layers { margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.cem-layer { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--c); font-size: 13.5px; cursor: pointer; color: var(--text-2); }
.cem-layer b { display: block; color: var(--text); margin-bottom: 2px; font-weight: 500; }
.cem-layer.is-sel { background: var(--line); }
.cem-layer .cem-lpro { margin-top: 6px; color: var(--gold); font-size: 12.5px; }
.cem-pnav { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.cem-prochip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; border: 1px dashed var(--gold-border); color: var(--gold); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
.cem-hint-in { display: block; margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- lista nézet (2D fallback) ---------- */
.cem-list { position: absolute; z-index: 7; inset: 0; background: var(--bg); overflow: auto; display: none; padding: 20px 18px 40px; }
.cem-list.is-on { display: block; }
.cem-list-in { max-width: 980px; margin: 0 auto; }
.cem-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.cem-list-sys { margin: 0 0 22px; }
.cem .cem-list-sys h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0 0 8px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.cem-list-sys h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.cem-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.cem-list-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s; }
.cem-list-item:hover { border-color: var(--line-strong); }
.cem-list-item b { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; font-weight: 500; }
.cem-list-item span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cem-list-item.is-pro { border-color: var(--gold-border); }
.cem-nowebgl { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; z-index: 4; }
.cem.is-nowebgl .cem-nowebgl { display: flex; }
.cem-nowebgl div { max-width: 520px; }

.cem-toast { position: absolute; z-index: 8; left: 50%; bottom: 150px; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 12.5px; opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.cem-toast.is-on { opacity: 1; }

/* ---------- világos téma: a site [data-theme="light"] állapotában a színpad is világos, élénk bolygókkal ---------- */
[data-theme="light"] .cem {
  --bg: #F7F8FB; --surface: #FFFFFF; --surface-2: #F1F3F7; --line: #E2E8F0; --line-strong: #CBD5E1;
  --text: #111827; --text-2: #374151; --muted: #6B7280; --faint: #9CA3AF;
  --red: #FF4D3D; --red-soft: #FFE6E1; --red-border: #FFB8AD;
  --gold: #8A5A00; --gold-soft: #FFF3C4; --gold-border: #E6B800;
  --green: #16A34A; --danger: #DC2626; --blue: #2563EB;
  --vignette: radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(15,23,42,.07) 100%);
  --lbl-bg: rgba(255,255,255,.86); --lbl-sel-bg: rgba(255,255,255,.96); --media-fade: rgba(255,255,255,0); --media-fade-to: rgba(255,255,255,.96); --panel-shadow: 0 24px 60px rgba(15,23,42,.14);
}
[data-theme="light"] .cem-pro.is-locked .cem-ghost { background: repeating-linear-gradient(180deg, rgba(15,23,42,.14) 0 9px, transparent 9px 18px); }
[data-theme="light"] .cem .cem-cta.is-gold { background: #E6B800; color: #1a1407; }
[data-theme="light"] .cem-status.is-plan::before { background: #E6B800; }
[data-theme="light"] .cem-chip.is-pro { border-color: #E6B800; color: #8A5A00; }
[data-theme="light"] .cem-legend { color: var(--dfi-text-muted, #6B7280); }

@media (prefers-reduced-motion: reduce) { .cem-panel, .cem-lbl, .cem-toast { transition: none; } .cem-lbl, .cem.is-anim .cem-pbody > * { animation: none; } }

@media (max-width: 767px) {
  .cem { --cem-top: 53px; font-size: 14px; min-height: 520px; }
  .cem-hud-top { padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; }
  .cem-brand { grid-area: 1 / 1; margin-right: 0; } .cem-brand small { display: none; } .cem-brand b { font-size: 18px; }
  .cem-fullwrap { grid-area: 1 / 2; }
  .cem-tools { grid-area: 2 / 1 / 3 / 3; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .cem-tools::-webkit-scrollbar { display: none; }
  .cem-tools > * { flex: 0 0 auto; }
  .cem-seg button { padding: 6px 10px; font-size: 11px; }
  .cem-btn { padding: 7px 10px; font-size: 11px; }
  .cem-panel { top: auto; right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%; max-height: 56%; border-radius: 16px 16px 0 0; transform: translateY(30px); }
  .cem-pmedia { height: 120px; }
  .cem .cem-pbody h2 { font-size: 24px; }
  .cem-hud-bottom { padding: 10px 12px 12px; }
  .cem-timeline { padding: 8px 12px; gap: 10px; }
  .cem-timeline .cem-era { display: none; }
  .cem-hint { display: none; }
  .cem-toast { bottom: 110px; }
}

/* ---------- app WebView embed (layouts.app-embed, nincs site-fejléc): a színpad a lap tetejétől indul ---------- */
body.dhs-embed-body .cem { --cem-top: 0px; height: calc(100vh - 48px); height: calc(100dvh - 48px); }
.cem-embed-hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ---------- a színpad alatti sáv (jelmagyarázat, kapu) — a site témáját követi ---------- */
.cem-below { max-width: 980px; margin: 28px auto 8px; }
.cem-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: var(--dfi-text-muted, #6B7280); margin: 0 0 10px; }
.cem-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cem-legend i { display: inline-block; width: 26px; border-top: 2px solid currentColor; opacity: .8; }
.cem-legend i.is-dashed { border-top-style: dashed; } .cem-legend i.is-dotted { border-top-style: dotted; }
.cem-legend em { font-style: normal; display: inline-flex; align-items: center; gap: 6px; }
.cem-legend em::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cem-disclaimer { font-size: 12px; color: var(--dfi-text-muted, #6B7280); margin: 0; }
