@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* 2026 „Műhely” téma: grafit felületek, borostyán kiemelés (a kijelölés színe a 3D-ben is) */
:root {
  color-scheme: dark;
  --bg: #101114; --paper: #17181c; --panel: #17181c; --panel2: #1f2126; --line: #2a2d33; --line2: #23262b; --hover: #23262b;
  --text: #e8eaed; --text2: #b4bac3; --muted: #9aa1ab;
  --accent: #ffb547; --accent-ink: #ffc266; --accent-soft: #3a2a12; --on-accent: #17181c;
  --ok: #4ade80; --err: #ff7a70; --err-soft: #3a1714; --warn: #ffc266; --warn-soft: #2b2113;
  --font: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  --shadow: 0 16px 40px -12px rgba(0,0,0,.6);
  --shadow-sm: 0 4px 12px -6px rgba(0,0,0,.5);
  --glass: rgba(23,24,28,.92);
}
* { box-sizing: border-box }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.45 var(--font) }
body.editor { overflow: hidden; overscroll-behavior: none }
a { color: var(--accent) }
a:hover { color: var(--accent-ink) }
.muted { color: var(--muted) }
.small { font-size: 12px }
.mono { font-family: var(--mono) }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 7px 12px; border-radius: 9px; cursor: pointer; font: 500 13px var(--font); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, border-color .15s }
.btn:hover { border-color: #3a3f47; background: var(--hover) }
.btn svg { flex: none }
.btn.icon { width: 36px; height: 36px; padding: 0; border-color: transparent; background: transparent; color: var(--text2) }
.btn.icon:hover { background: var(--hover); color: var(--text) }
.btn.wide { width: 100%; margin-top: 10px }
.btn.ghost { border-style: dashed; background: transparent; color: var(--text2) }
.btn.ghost:hover { color: var(--text); border-color: var(--muted) }
.btn.small { padding: 4px 9px; font-size: 12px }
.btn.danger { color: var(--err) }
.btn.danger:hover { background: var(--err-soft); border-color: #5a2a26 }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600 }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink) }
.btn.dark { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600 }
.btn.dark:hover { background: var(--accent-ink) }
.ic { stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round }
.seg { display: flex; background: #0f1013; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px }
.seg button { border: 0; background: transparent; color: var(--text2); padding: 6px 14px; border-radius: 8px; cursor: pointer; font: 500 13px var(--font) }
.seg button:hover { color: var(--text) }
.seg button.on { background: #2e3238; color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.4) }
.spacer { flex: 1 }
.only-mobile { display: none !important }
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; flex: none }
.mark svg path { fill: var(--on-accent) }

/* ---------- Szerkesztő elrendezés ---------- */
#app { display: grid; grid-template-rows: 56px 1fr 30px; grid-template-columns: 64px 1fr auto; height: 100vh; height: 100dvh }
header { grid-column: 1/4; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0 }
header .back { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--text2); text-decoration: none; flex: none }
header .back:hover { background: var(--hover); color: var(--text) }
.projName { background: transparent; border: 1px solid transparent; color: var(--text); font: 600 15px var(--font); padding: 5px 8px; border-radius: 8px; width: 220px; min-width: 80px }
.projName:hover, .projName:focus { border-color: var(--line); background: var(--paper); outline: none }
#saveState { font-size: 12px; color: var(--muted); margin-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; display: inline-flex; align-items: center; gap: 6px }
#saveState::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3a3f47; flex: none }
#saveState:empty::before { display: none }
#saveState.ok { color: var(--ok) } #saveState.ok::before { background: #22a05a }
#saveState.err { color: var(--warn) } #saveState.err::before { background: var(--warn) }
header .tools-right { display: flex; gap: 2px }
.menu { position: relative }
.menu .drop { display: none; position: absolute; right: 0; top: 100%; padding-top: 6px; z-index: 30; min-width: 250px }
.menu:hover .drop, .menu:focus-within .drop { display: block }
.menu .drop > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 5px }
.menu .drop button { display: block; width: 100%; text-align: left; background: transparent; color: var(--text); border: 0; border-radius: 8px; padding: 9px 11px; font: 13px var(--font); cursor: pointer }
.menu .drop button:hover { background: var(--hover) }

#tools { grid-row: 2; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 2px; overflow-y: auto }
#tools button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 11px; background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; position: relative; transition: background .15s, color .15s }
#tools button:hover { background: var(--hover); color: var(--text) }
#tools button.on { background: var(--accent-soft); color: var(--accent-ink) }
#tools button small { position: absolute; right: 4px; bottom: 2px; font: 500 9px var(--mono); opacity: .7 }
#tools hr { width: 28px; border: 0; border-top: 1px solid var(--line2); margin: 6px 0 }

#stage { grid-row: 2; position: relative; overflow: hidden; min-width: 0; background: var(--paper) }
#plan { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none }
#view3d { position: absolute; inset: 0; display: none }
#view3d canvas { display: block }
#bar3d { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 14; display: flex; gap: 6px; align-items: center; background: var(--glass); border: 1px solid var(--line); padding: 5px; border-radius: 14px; box-shadow: var(--shadow-sm); backdrop-filter: blur(12px) }
#dock3d { display: none }
#bar3d .seg.mode button { padding: 7px 13px; font-weight: 600 }
#bar3d .seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px }
#dock3d .seg span { display: none }
#bar3d .sep { width: 1px; height: 22px; margin: 0 2px; background: var(--line) }
#bar3d .pop { position: relative }
#bar3d .popBtn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 9px; border: 0; background: none; color: var(--text2); font: 500 13px var(--font); cursor: pointer }
#bar3d .popBtn:hover, #bar3d .pop.open .popBtn { background: var(--hover); color: var(--text) }
#bar3d .popBody { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translate(-50%, 4px); min-width: 220px; padding: 8px; display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .14s ease, transform .14s ease, visibility .14s }
#bar3d .pop.open .popBody { opacity: 1; visibility: visible; transform: translate(-50%, 0) }
#bar3d .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 8px; border-radius: 8px; font-size: 13px; color: var(--text2); cursor: pointer; white-space: nowrap }
#bar3d .row:hover { background: var(--hover); color: var(--text) }
#bar3d .row.col { flex-direction: column; align-items: stretch; gap: 6px; cursor: default }
#bar3d .row.col:hover { background: none }
#bar3d .row.col span { font-size: 12px; color: var(--muted) }
#bar3d .row input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0 }
#bar3d select { width: 100%; background: #0f1013; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 8px; font: inherit }
#bar3d input[type=range] { width: 100%; accent-color: var(--accent); margin: 0 }
#pegman { width: 36px; height: 34px; border-radius: 10px; border: 1px solid #5a4220; background: linear-gradient(180deg, #ffc266, #f5a524); color: #3a2a12; display: grid; place-items: center; cursor: grab; touch-action: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 6px -2px rgba(0,0,0,.6); transition: transform .15s ease }
#pegman.on { outline: 2px solid var(--accent); outline-offset: 2px }
#pegman:hover { transform: translateY(-1px) }
#pegman:active, body.pegging #pegman { cursor: grabbing; opacity: .45 }
#pegDrag { position: fixed; left: 0; top: 0; z-index: 60; display: none; pointer-events: none; color: #ffb547; filter: drop-shadow(0 6px 8px rgba(0,0,0,.6)); transform: translate(-50%, -85%) }
body.pegging #pegDrag { display: block }
body.pegging #view3d canvas { cursor: copy }
/* lámpakapcsolás visszajelzése */
#lightToast { position: absolute; left: 50%; bottom: 88px; transform: translate(-50%, 6px); z-index: 25; padding: 8px 14px 8px 32px; border-radius: 99px; background: var(--glass); border: 1px solid #5a4220; color: var(--accent-ink); font-size: 13px; font-weight: 500; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .18s ease, transform .18s ease; box-shadow: var(--shadow-sm) }
#lightToast::before { content: ""; position: absolute; left: 12px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #ffd27a; border: 1px solid #c98a1c }
#lightToast.off { color: var(--text2); border-color: var(--line) }
#lightToast.off::before { background: #4a4e55; border-color: #5c6168 }
#lightToast.show { opacity: 1; transform: translate(-50%, 0) }
#walkhint { position: absolute; inset: 0; display: none; place-items: end center; padding-bottom: 84px; pointer-events: none }
#walkhint div { background: var(--glass); border: 1px solid var(--line); padding: 10px 18px; border-radius: 12px; text-align: center; line-height: 1.6; font-size: 12px; color: var(--text2); max-width: calc(100% - 32px); box-shadow: var(--shadow-sm) }
#walkhint b { color: var(--accent) }
#cross { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; display: none; pointer-events: none }
#cross:before, #cross:after { content: ""; position: absolute; background: #fff; opacity: .9; box-shadow: 0 0 2px rgba(0,0,0,.6) }
#cross:before { left: 6px; top: 0; width: 2px; height: 14px } #cross:after { top: 6px; left: 0; height: 2px; width: 14px }
#cross.hot { transform: scale(1.6) } #cross.hot:before, #cross.hot:after { background: var(--accent); opacity: 1 }
#joy { position: absolute; left: 24px; bottom: 24px; width: 120px; height: 120px; border-radius: 50%; background: rgba(21,23,28,.12); border: 2px solid rgba(21,23,28,.25); display: none; touch-action: none }
#joy div { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(21,23,28,.45); pointer-events: none }

#selPanel { position: absolute; display: none; transform: translate(-50%, calc(-100% - 12px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); z-index: 15; min-width: 230px }
#selPanel::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: inherit; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg) }
.spHead { display: flex; justify-content: space-between; gap: 10px; padding: 0 2px 8px; font-size: 13.5px }
.spHead span { color: var(--muted); font: 12px var(--mono) }
.spRow { display: flex; align-items: center; gap: 4px; margin-top: 5px }
.spRow .lbl { color: var(--muted); font-size: 12px; margin-right: 2px }
.spRow button { min-width: 34px; height: 34px; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 9px; cursor: pointer; font: 500 12.5px var(--font); padding: 0 7px }
.spRow button:hover { background: var(--hover) }
.spRow button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600 }
.spRow button.del { color: var(--err); margin-left: auto; background: var(--err-soft); border-color: #5a2a26 }
.spRow button.step { min-width: 48px; font: 500 12px var(--mono); color: var(--accent) }
.spRow button:disabled { opacity: .35; cursor: default }
#fab { position: absolute; right: 20px; bottom: 18px; height: 52px; padding: 0 20px 0 16px; border-radius: 16px; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; display: flex; align-items: center; gap: 8px; font: 600 14px var(--font); box-shadow: 0 12px 28px -10px rgba(21,23,28,.55); z-index: 20; transition: transform .18s ease, background .15s }
#fab:hover { background: var(--accent-ink) }
#fab svg { transition: transform .18s ease }
#fab.open svg { transform: rotate(45deg) }
#fab canvas { pointer-events: none }
#picker { position: absolute; right: 20px; bottom: 84px; width: min(580px, calc(100% - 40px)); max-height: min(580px, calc(100% - 110px)); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); display: none; flex-direction: column; z-index: 21; overflow: hidden }
#picker.open { display: flex }
.pickHead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line2) }
.pickHead b { white-space: nowrap; font-size: 14px }
.pickHead input { flex: 1; min-width: 0; background: var(--paper); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 11px; font: inherit; font-size: 14px }
.pickHead input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.pickBody { overflow-y: auto; padding: 4px 14px 14px }
.pickBody h4 { margin: 14px 2px 8px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.pickGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px }
.pickGrid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; background: var(--paper); border: 1px solid var(--line2); border-radius: 12px; color: var(--text); font: 12.5px/1.3 var(--font); cursor: pointer; text-align: center; min-height: 96px; transition: border-color .15s, background .15s }
.pickGrid button:hover { border-color: #3a3f47; background: var(--panel) }
.pickGrid button.on { border-color: var(--accent); background: var(--accent-soft) }
.pickGrid button small { color: var(--muted); font: 10px var(--mono) }
aside#panel { grid-row: 2; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: row-reverse; min-height: 0 }
.tabs { display: flex; flex-direction: column; gap: 2px; flex: none; width: 52px; padding: 10px 4px; align-items: center }
.tabs button { position: relative; width: 44px; height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s }
.tabs button > span:not(.badge) { display: none }
.tabs button:hover { background: var(--hover); color: var(--text) }
body.panel-wide .tabs button.on { background: var(--accent-soft); color: var(--accent-ink) }
.tabs .badge { position: absolute; top: 4px; right: 3px; padding: 0 4px; min-width: 15px; font-size: 9px; line-height: 15px }
#panelBody { display: none; width: 292px; flex-direction: column; min-height: 0; border-right: 1px solid var(--line2); position: relative }
body.panel-wide #panelBody { display: flex }
.panelClose { position: absolute; top: 10px; right: 8px; width: 28px !important; height: 28px !important; z-index: 1 }
aside section h3 { padding-right: 30px }
.badge { display: none; background: var(--warn); color: #fff; border-radius: 9px; font: 600 10px var(--mono); padding: 1px 6px; min-width: 18px; text-align: center }
.tab { display: none; overflow-y: auto; flex: 1 }
.tab.on { display: block }
aside section { border-bottom: 1px solid var(--line2); padding: 16px }
aside section:last-child { border-bottom: 0 }
aside h3 { margin: 0 0 10px; font-size: 14.5px; font-weight: 600; letter-spacing: -.005em }
aside label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 7px 0; color: var(--text2) }
aside input, aside select { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 8px; font: inherit; width: 150px }
aside input:focus, aside select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
aside input[type=checkbox] { width: auto; accent-color: var(--accent) }
aside input[type=color] { width: 30px; height: 30px; padding: 0; border: 0; background: none; flex: none; border-radius: 8px; cursor: pointer }
.u { display: flex; align-items: center; gap: 5px }
.u input { width: 100px; font-family: var(--mono); font-size: 12.5px }
.u i { font-style: normal; color: var(--muted); width: 20px; font: 11px var(--mono) }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 8px; padding: 4px 10px; font: 500 12px var(--mono); cursor: pointer }
.chip:hover { background: var(--hover) }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent) }
.chips::before { content: "cm:"; color: var(--muted); font: 11px var(--mono); align-self: center; margin-right: 2px }
.gangBox { background: var(--paper); border: 1px solid var(--line2); border-radius: 10px; padding: 2px 10px; margin: 8px 0 }
.gangs { display: flex; gap: 4px }
.gangs .chip { min-width: 30px }
.propHead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px }
#circuits { margin: 0 -8px 8px }
.circ { position: relative; border-radius: 10px; padding: 8px 8px 8px 10px; cursor: pointer; transition: background .15s }
.circ:hover { background: var(--hover) }
.circ.on { background: rgba(255,181,71,.07); box-shadow: inset 0 0 0 1px rgba(255,181,71,.28) }
.circ .row { display: flex; align-items: center; gap: 10px }
.circ .sw { position: relative; width: 14px; height: 14px; margin: 0; flex: none; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); cursor: pointer }
.circ .sw input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer }
.circ .main { flex: 1; min-width: 0; display: grid; gap: 1px }
.circ .main input[type=text] { width: 100%; min-width: 0; border-color: transparent; background: transparent; font-weight: 600; padding: 2px 4px; margin-left: -4px }
.circ .main input[type=text]:hover, .circ .main input[type=text]:focus { border-color: var(--line); background: var(--paper) }
.circ .main small { font: 11px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.circ .main .fi { color: #8fb4ff; font-weight: 500 }
.circ .n { font: 500 12px var(--mono); color: var(--text2); min-width: 26px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--hover); display: grid; place-items: center }
.circ .det { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0 2px 24px }
.circ .det label { flex-direction: column; align-items: stretch; gap: 4px; margin: 0; font-size: 11.5px; color: var(--muted) }
.circ .det label.chk { flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text2); cursor: pointer; padding: 2px 0 }
.circ .det .wide { grid-column: 1 / -1 }
.circ .det select { width: 100%; padding: 5px 6px }
.tbl { width: 100%; border-collapse: collapse }
.tbl th { text-align: left; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 0 5px }
.tbl td { padding: 5px 4px 5px 0; border-bottom: 1px solid var(--line2); vertical-align: middle }
.tbl .r { text-align: right; font-family: var(--mono); font-size: 12px; white-space: nowrap }
.tbl td.ic { width: 32px }
.tbl td.ic canvas { display: block }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px }
.fi { background: var(--accent-soft); color: var(--accent-ink); border-radius: 5px; padding: 1px 5px; font: 600 10px var(--mono) }
.leg { display: flex; align-items: center; gap: 10px; padding: 4px 0 }
.chk { padding: 9px 11px; border-radius: 10px; margin-bottom: 6px; background: var(--paper); border: 1px solid var(--line2) }
.chk.err { background: var(--err-soft); border-color: #5a2a26 } .chk.warn { background: var(--warn-soft); border-color: #4a3a20 }
.chk.link { cursor: pointer } .chk.link:hover { border-color: #3a3f47 }
.ok { color: var(--ok) }
footer { grid-column: 1/4; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; background: var(--panel); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap }
#hint { overflow: hidden; text-overflow: ellipsis }
#coords { font-family: var(--mono) }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 18px; min-width: min(460px, 92vw); padding: 20px; box-shadow: var(--shadow) }
dialog::backdrop { background: rgba(21,23,28,.35) }
dialog h3 { margin-top: 0; font-size: 17px }
.ver { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line2) }
dialog .list { max-height: 60vh; overflow-y: auto; margin-bottom: 14px }

/* ---------- Telefon / tablet ---------- */
@media (max-width: 900px) {
  .only-mobile { display: grid !important }
  #app { grid-template-columns: 1fr; grid-template-rows: 60px 1fr 64px }
  header { grid-column: 1; gap: 4px; padding: 0 6px }
  .projName { width: 100px; flex: 1 }
  #saveState { display: none }
  #bFit, header .mark, #bPngTop { display: none }
  header .back, .btn.icon { width: 44px; height: 44px }
  .seg button { padding: 9px 12px }
  #stage { grid-row: 2; grid-column: 1 }
  #tools { grid-row: 3; grid-column: 1; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; padding: 8px 8px; gap: 4px; padding-bottom: max(8px, env(safe-area-inset-bottom)) }
  #tools button { width: 46px; height: 46px }
  #tools hr { width: 0; height: 28px; border-top: 0; border-left: 1px solid var(--line2); margin: 0 3px; align-self: center }
  footer { display: none }
  aside#panel { position: fixed; z-index: 40; top: 60px; bottom: 64px; box-shadow: -12px 0 32px -12px rgba(21,23,28,.3); transition: transform .22s ease }
  aside#panel { right: 0; width: min(380px, 92vw); transform: translateX(105%) }
  body.panel-open aside#panel { transform: none }
  aside#panel { flex-direction: column }
  .tabs { flex-direction: row; width: auto; padding: 6px 8px 0; border-bottom: 1px solid var(--line2) }
  .tabs button { flex: 1; width: auto; height: auto; padding: 11px 4px; border-radius: 0; display: inline-flex; gap: 5px; font: 500 13px var(--font); border-bottom: 2px solid transparent }
  .tabs button svg { display: none }
  .tabs button > span:not(.badge) { display: inline }
  .tabs .badge { position: static }
  .tabs button.on { color: var(--text); border-bottom-color: var(--accent); background: none !important }
  #panelBody { display: flex; width: auto; flex: 1; border-right: 0 }
  .panelClose { display: none !important }
  #fab { right: 16px; bottom: 16px; width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 18px }
  #fab span { display: none }
  #picker { left: 0; right: 0; bottom: 0; width: 100%; max-height: 72%; border-radius: 22px 22px 0 0 }
  .pickGrid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)) }
  #bar3d { left: 12px; transform: none; bottom: 16px }
  #bar3d .seg span, #bar3d .popBtn span { display: none }
  aside input, aside select { width: 130px; font-size: 16px }
  .u input { width: 90px }
}

/* séta: kurzor mód jelző és guggolás gomb */
#walkBadge { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); display: none; background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 7px 16px; font-size: 12.5px; color: var(--text2); white-space: nowrap; pointer-events: none; z-index: 12; box-shadow: var(--shadow-sm) }
#walkBadge b { color: var(--accent) }
#crouchBtn { position: absolute; right: 24px; bottom: 100px; width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(21,23,28,.2); background: var(--glass); color: var(--text); font-size: 24px; display: none; place-items: center; align-content: center; gap: 0; touch-action: none; z-index: 12 }
#crouchBtn small { display: block; font-size: 10px; margin-top: -4px }
#crouchBtn.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent) }
.spRow select.spPreset { flex: 1; min-width: 0; height: 34px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 9px; font: 12px var(--font); padding: 0 6px }

/* elosztó kiosztás (DIN-sín) */
.din { display: flex; flex-direction: column; gap: 6px; margin-top: 8px }
.rail { display: flex; gap: 3px; background: var(--paper); border: 1px solid var(--line); padding: 6px 5px; border-radius: 10px; position: relative }
.dm { min-width: 0; background: var(--panel); color: var(--text); border: 1px solid #3a3f47; border-top: 4px solid #888; border-radius: 0; padding: 3px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 9.5px/1.25 var(--mono); height: 58px; overflow: hidden }
.dm b { font-size: 11px }
.dm span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted) }
.dm.rcd { background: var(--text); color: #fff; border-color: var(--text) }
.dm.rcd span { color: #c9ccd2 }
.dm.free { background: transparent; border: 1px dashed #3a3f47 }
aside label.stack { flex-direction: column; align-items: stretch; gap: 4px }
aside label.stack select { width: 100% }

/* kábel áramkör-választó */
.circPick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px }
.circPick button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--text2); font: 500 12px var(--font); cursor: pointer }
.circPick button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c) }
.circPick button:hover { color: var(--text); border-color: var(--muted) }
.circPick button.on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent) }
.circPick button.add { border-style: dashed; padding: 0 10px }
.circPick button.add::before { display: none }

/* kapcsoló billentyűinek lámpái */
.keyMap { margin: 10px 0; padding: 10px 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2) }
.keyMap .kmT { display: block; font-size: 12.5px; margin-bottom: 6px }
.kmRow { display: grid; gap: 4px; margin-bottom: 6px }
.kmRow > span { font-size: 12px; color: var(--muted) }
.kmRow .circPick { margin: 0 }
.cores p { margin: 2px 0 6px }

/* Beállítások fül az ikonsáv alján */
.tabs .setTab { margin-top: auto }
#toolSec[hidden] { display: none }
aside label .u { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px }
aside label .u input { width: 70px }
/* szerelvény kábelei */
.itemCables { margin: 10px 0; padding-top: 10px; border-top: 1px solid var(--line2) }
.icRow { display: grid; grid-template-columns: 1fr 52px auto; align-items: center; gap: 4px 6px; padding: 6px 0 6px 12px; position: relative; border-bottom: 1px solid var(--line2) }
.icRow:last-child { border-bottom: 0 }
.icRow .to { grid-column: 1 / -1 }
.icRow::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--c) }
.icRow .to { font-size: 12.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
aside .icRow select { width: 100%; padding: 5px 6px; font-size: 12px }
aside .icRow input { width: 52px; padding: 5px 6px; font-size: 12px }
.icRow .unit { font-size: 11px; color: var(--muted) }
/* anyagjegyzék */
.bomSum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px }
.bomSum div { background: var(--paper); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; display: grid }
.bomSum b { font: 600 17px var(--mono); color: var(--text) }
.bomSum span { font-size: 11px; color: var(--muted) }
.bomGrp { border-bottom: 1px solid var(--line2) }
.bomGrp summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 600; color: var(--text) }
.bomGrp summary::-webkit-details-marker { display: none }
.bomGrp summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: 2px }
.bomGrp[open] summary::before { transform: rotate(45deg) }
.bomGrp summary span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.bomGrp summary em { font: 500 11px var(--mono); font-style: normal; color: var(--muted) }
.bomRow { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 4px 0 4px 2px; font-size: 12.5px; color: var(--text2) }
.bomRow i canvas { display: block }
.bomRow b { font: 500 12px var(--mono); color: var(--text); white-space: nowrap }
.bomRow:last-child { padding-bottom: 10px }
.legendBox { margin-top: 14px }
.legendBox summary { cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 6px 0 }
/* tervellenőrzés */
.chkSum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px }
.chkSum span { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line) }
.chkSum .err { color: #ff8a80; border-color: #5a2a26 } .chkSum .warn { color: #ffcf7a; border-color: #4a3a20 } .chkSum .info { color: var(--text2) }
.chk { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: start; padding: 9px 4px; margin: 0; border: 0; border-bottom: 1px solid var(--line2); border-radius: 0; background: none; font-size: 12.5px; color: var(--text2) }
.chk.err, .chk.warn { background: none; border-color: var(--line2) }
.chk i { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: #8c9196 }
.chk.err i { background: #ff6b5e } .chk.warn i { background: #ffb547 }
.chk b { display: block; color: var(--text); font-weight: 600; margin-bottom: 1px }
.chk.link { cursor: pointer } .chk.link:hover { background: var(--hover) }
.chkOk { color: var(--ok); font-size: 13px }
#tab-check .note { margin-top: 12px }

/* elosztó bekötése: kapcsolási rajz */
#wiringDlg { width: min(1180px, 96vw); max-width: none; max-height: 92vh; padding: 0; overflow: hidden; display: none; flex-direction: column }
#wiringDlg[open] { display: flex }
#wiringDlg::backdrop { background: rgba(8,9,11,.65) }
.wdHead { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line) }
.wdHead h3 { margin: 0; font-size: 16px }
#wiringBody { overflow: auto; padding: 18px 22px 26px; background: repeating-linear-gradient(0deg, transparent 0 23px, #1a1c20 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, #1a1c20 23px 24px) }
.wdNet { display: flex; align-items: center; gap: 10px }
.wdNet > span { font: 600 11px var(--mono); color: var(--muted); letter-spacing: .08em }
.wdNet > i { width: 40px; height: 2px; background: #d6463a }
.wdMain, .wdRcd, .wdDev { border: 1.5px solid var(--line); background: var(--panel); border-radius: 8px; display: grid; padding: 6px 10px }
.wdMain { border-color: #8a3a32 } .wdMain b { color: #ff8a80 }
.wdMain b, .wdRcd b, .wdDev b { font: 700 13px var(--mono) }
.wdMain span, .wdRcd span, .wdDev span { font-size: 11px; color: var(--muted) }
.wdBus { height: 18px; margin-left: 150px; border-left: 2px solid #d6463a }
.wdGroups { display: flex; gap: 22px; align-items: flex-start; border-top: 2px solid #d6463a; padding-top: 18px; margin-left: 150px; position: relative }
.wdGrp { display: grid; justify-items: start; gap: 0; position: relative }
.wdGrp::before { content: ""; position: absolute; left: 22px; top: -18px; height: 18px; border-left: 2px solid #d6463a }
.wdRcd { border-color: #2d6cdf } .wdRcd b { color: #8fb4ff }
.wdRcd.none { border-style: dashed; border-color: var(--line) } .wdRcd.none b { color: var(--text2) }
.wdRail { height: 14px; margin-left: 22px; border-left: 2px solid #6a8fd6 }
.wdMcbs { display: flex; gap: 10px; border-top: 2px solid #6a8fd6; padding-top: 14px; position: relative }
.wdMcb { position: relative; width: 168px; display: grid; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px }
.wdMcb::before { content: ""; position: absolute; left: 50%; top: -17px; height: 14px; border-left: 2px solid #6a8fd6 }
.wdDev { grid-auto-flow: column; justify-content: space-between; align-items: center; padding: 4px 8px }
.wdName { background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--text); font: 600 13px var(--font); padding: 3px 4px; width: 100% }
.wdName:hover, .wdName:focus { border-color: var(--line); outline: none; background: var(--paper) }
.wdF { display: grid; grid-template-columns: 1fr 1fr; gap: 6px }
.wdMcb label { display: grid; gap: 3px; font-size: 10.5px; color: var(--muted) }
.wdMcb select { width: 100%; background: var(--paper); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 4px 5px; font: 12px var(--font) }
.wdOut { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text2); margin-top: 2px }
.wdOut i { width: 2px; height: 14px; background: var(--c) }
.wdItems { display: flex; flex-wrap: wrap; gap: 4px }
.wdItems em { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--line); color: var(--text2) }

.wdImg { display: block; height: auto; border-radius: 3px; box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 6px 14px -6px rgba(0,0,0,.6) }
.wdMcb .wdImg { justify-self: center; max-width: 100% }
.wdMain, .wdRcd { grid-auto-flow: column; align-items: center; gap: 10px; justify-content: start }
.wdMain > div, .wdRcd > div { display: grid }

.wsWrap { overflow-x: auto; background: #f4f5f4; border-radius: 12px; padding: 12px; margin-bottom: 18px }
.wsSvg { display: block }
.wsT { font: 700 13px var(--mono); fill: #2b2e33 }
.wsS { font: 600 10px var(--mono); fill: #4a4f55 }
.wsC { font: 700 11px var(--font); text-anchor: start }
.wsDev[data-circ]:not([data-circ=""]) { cursor: pointer }
.wsDev[data-circ]:not([data-circ=""]):hover rect:first-child { stroke: var(--accent); stroke-width: 2 }
.wdSub { margin: 0 0 12px; font-size: 13px; color: var(--text2) }
.wdMcb.hl { outline: 2px solid var(--accent); outline-offset: 2px }

/* bekötés-szerkesztő */
.wsWrap { position: relative }
.wsTools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px }
.wsTools > span { font-size: 12px; color: var(--muted) }
.wsTools [data-pen] { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--text2); font: 500 12px var(--font); cursor: pointer }
.wsTools [data-pen]::before { content: ""; width: 16px; height: 4px; border-radius: 2px; background: var(--w) }
.wsTools [data-pen].on { border-color: var(--accent); color: var(--text); background: var(--accent-soft) }
.wsHelp { margin: 0 0 10px }
.wsNode.term rect { fill: #f8f9f9; stroke: #c4c8cb }
.wsNode.term circle { fill: #d9dde0; stroke: #8d9297 }
.wsNode.term path { stroke: #6a6f74; stroke-width: 1.2 }
.wsNode.bar { fill: #d9dde2; stroke: #4a5a75 }
.wsNode.end { fill: #fff; stroke: #8d9297; stroke-width: 1.5 }
.wsNode { cursor: crosshair }
.wsNode:hover rect, .wsNode:hover circle, .wsNode.bar:hover, .wsNode.end:hover { stroke: #ffb547; stroke-width: 2 }
.wsWire { cursor: pointer }
.wsWire:hover path:nth-child(2) { stroke-width: 4 }
.wsWire.sel path:nth-child(2) { filter: drop-shadow(0 0 3px rgba(255,181,71,.9)) }
.wsDev { cursor: grab } .wsDev.drag { cursor: grabbing; opacity: .8 }
.wsDev[data-kind="main"] { cursor: default }
.wsBtn { cursor: pointer } .wsBtn rect { fill: #fff; stroke: #9aa0a7 } .wsBtn text { font: 600 11px var(--font); fill: #2b2e33; text-anchor: middle }
.wsBtn:hover rect { stroke: #ffb547; stroke-width: 2 }
#wsPop { position: absolute; z-index: 5; width: 230px; display: grid; gap: 8px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); color: var(--text) }
#wsPop[hidden] { display: none }
#wsPop label { display: grid; gap: 3px; font-size: 11px; color: var(--muted) }
#wsPop select { width: 100%; background: var(--paper); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 5px 6px; font: 12px var(--font) }
#wsPop p { margin: 0 }
.wsCols { display: flex; gap: 6px }
.wsCols button { flex: 1; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper); color: var(--text2); font: 600 11px var(--mono); cursor: pointer; position: relative; padding-top: 6px }
.wsCols button::before { content: ""; position: absolute; left: 6px; right: 6px; top: 4px; height: 4px; border-radius: 2px; background: var(--w) }
.wsCols button.on { border-color: var(--accent); color: var(--text) }
.wsRubber { pointer-events: none }

/* elosztószekrény-szerkesztő */
.wiTools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px }
.wiMain { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start }
.wiMain .wsWrap { margin: 0; max-height: calc(92vh - 150px); overflow: auto }
.wsSlot { fill: none; stroke: #c9ccd0; stroke-dasharray: 4 4 }
.wsName { font: 600 9.5px var(--font); fill: #2b2e33; text-anchor: middle }
.wsName.strong { font-weight: 700; fill: #4a4f55 }
.wsDev { cursor: grab } .wsDev[data-kind="main"] { cursor: pointer }
.wsDev.drag { cursor: grabbing; opacity: .85; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)) }
.wiSide { display: grid; gap: 10px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; position: sticky; top: 0 }
.wiSide label { display: grid; gap: 4px; font-size: 11.5px; color: var(--muted) }
.wiSide input:not([type=color]), .wiSide select { width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 8px; font: 13px var(--font) }
.wiSide input[type=color] { width: 44px; height: 28px; padding: 0; border: 0; background: none }
.wiSide p { margin: 0 }
.wiHead { display: flex; gap: 12px; align-items: center }
.wiHead img { height: 74px; border-radius: 3px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.6) }
.wiHead b { display: block; font-size: 14px; color: var(--text) }
.wiHead span { font-size: 12px; color: var(--muted) }
.wiTwo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.wiStat { display: flex; gap: 12px; font-size: 12px; color: var(--text2) }
.wiStat b { font-family: var(--mono); color: var(--text) }
.wiItems { display: flex; flex-wrap: wrap; gap: 4px }
.wiItems em { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--text2) }
@media (max-width: 900px) { .wiMain { grid-template-columns: 1fr } }
.wiSeg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line) }
.wiTool { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: none; color: var(--text2); font: 500 12.5px var(--font); cursor: pointer }
.wiTool.on { background: var(--accent-soft); color: var(--accent-ink) }
.wiPens { display: inline-flex; gap: 4px; flex-wrap: wrap }
.wiPens button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--text2); font: 500 12px var(--font); cursor: pointer }
.wiPens button::before { content: ""; width: 16px; height: 4px; border-radius: 2px; background: var(--w) }
.wiPens button.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft) }
.wiHelp { margin: 0 0 10px }
.wsGrp { font: 600 9.5px var(--mono); fill: #6a7078; text-anchor: middle }
.wsHandle { fill: #ffb547; stroke: #fff; stroke-width: 2; cursor: grab; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)) }
.wsComb { cursor: pointer }
.wsRubberComb { fill: rgba(165,171,177,.7); stroke: #ffb547; stroke-dasharray: 4 3; pointer-events: none }

/* ================= Megújított kinézet (v3): mélyebb grafit, finomabb vonalak, kártyás panel ================= */
:root {
  --bg: #0c0d10; --paper: #121317; --panel: #16171b; --panel2: #1d1f24; --line: #262930; --line2: #1f2227; --hover: #1f2228;
  --text: #eceef1; --text2: #b3b9c2; --muted: #8b929c;
  --accent: #ffb547; --accent-ink: #ffc670; --accent-soft: rgba(255,181,71,.13);
  --field: #0f1013; --r: 10px;
  --shadow: 0 24px 48px -16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.03);
}
header { background: linear-gradient(180deg, #17181d, #141519); border-bottom-color: var(--line2) }
.projName { font-size: 14.5px; letter-spacing: -.01em }
.mark { background: linear-gradient(180deg, #ffc670, #f5a524); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 2px 6px -2px rgba(0,0,0,.6) }
#tools { background: var(--panel); border-right-color: var(--line2); gap: 4px }
#tools button { border-radius: 12px }
#tools button.on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(255,181,71,.25) }
#tools button.on::before { content: ""; position: absolute; left: -10px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent) }
#stage { background: var(--paper) }
aside#panel { background: var(--panel); border-left-color: var(--line2) }
.tabs { gap: 4px; padding: 12px 4px }
.tabs button { border-radius: 12px }
body.panel-wide .tabs button.on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(255,181,71,.25) }
#panelBody { width: 316px; background: var(--paper); border-right-color: var(--line2) }
.tab.on { padding: 10px }
aside section { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; margin-bottom: 10px }
aside section:last-child { border-bottom: 1px solid var(--line2) }
aside h3 { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 12px }
aside input, aside select { background: var(--field); border-color: var(--line); border-radius: 9px }
aside input:hover, aside select:hover { border-color: #343841 }
.btn { border-radius: var(--r) }
.btn.wide { border-radius: 11px }
#bar3d { border-radius: 16px; padding: 6px; background: rgba(18,19,23,.86); border-color: rgba(255,255,255,.07); box-shadow: 0 18px 40px -14px rgba(0,0,0,.75) }
.seg { background: var(--field); border-color: var(--line2) }
.seg button.on { background: #2a2d34; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 1px 3px rgba(0,0,0,.5) }
#fab { border-radius: 16px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.12) inset }
footer { background: var(--panel); border-top-color: var(--line2) }
#selPanel, .menu .drop > div, #picker, dialog { border-color: var(--line); box-shadow: var(--shadow) }
.panelClose { top: 14px; right: 16px }
@media (max-width: 900px) {
  #panelBody { width: auto }
  #tools button.on::before { display: none }
  .tab.on { padding: 8px }
}

/* ---------- Rétegek fa ---------- */
.olSec { padding-bottom: 10px }
.olBar { display: flex; gap: 4px; align-items: center; margin-bottom: 10px }
aside .olBar input { flex: 1; width: auto; min-width: 0; padding: 7px 10px }
.olBar .btn.icon { width: 32px; height: 32px; flex: none }
.olLayers { display: grid; gap: 1px; padding: 4px; background: var(--field); border: 1px solid var(--line2); border-radius: 12px; margin-bottom: 12px }
.olL { display: flex; align-items: center; gap: 9px; padding: 5px 4px 5px 8px; border-radius: 8px; color: var(--text) }
.olL:hover { background: var(--hover) }
.olL svg { color: var(--muted); flex: none }
.olL span { flex: 1 }
.olL em, .olH em { font: 500 11px var(--mono); font-style: normal; color: var(--muted) }
.dim > span, .dim > .nm, .dim > svg, .dim > i, .olF.dim > .olH .nm, .olF.dim > .olH .dot { opacity: .38 }
.ey, .so { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--text2); cursor: pointer; transition: background .12s, color .12s }
.ey:hover, .so:hover { background: #2a2d34; color: var(--text) }
.ey.off { color: #5c626b }
.so { opacity: 0 }
.olH:hover .so, .so:focus-visible { opacity: 1 }
.olTree { display: grid; gap: 2px; margin: 0 -4px }
.olF { border-radius: 11px }
.olF.open { background: color-mix(in srgb, var(--c) 5%, transparent) }
.olH { display: flex; align-items: center; gap: 8px; padding: 5px 4px 5px 6px; border-radius: 10px; cursor: pointer; user-select: none }
.olH:hover { background: var(--hover) }
.olH .car { color: var(--muted); flex: none; transition: transform .15s ease }
.olF.open .car { transform: rotate(90deg) }
.olH .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none }
.olH .nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.olF.cur > .olH .nm::after { content: "aktív"; margin-left: 7px; padding: 1px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); font: 600 9.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; vertical-align: 1px }
.olK { padding: 2px 0 6px 18px; margin-left: 11px; border-left: 1px solid var(--line) }
.olI { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 6px; border-radius: 8px; cursor: pointer; color: var(--text2); font-size: 12.5px }
.olI:hover { background: var(--hover); color: var(--text) }
.olI.sel { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,181,71,.3) }
.olI > i { width: 20px; height: 20px; flex: none; display: grid; place-items: center }
.olI > i canvas { display: block }
.olI > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.olI b { font-weight: 500; color: var(--muted); font-family: var(--mono); font-size: 11px }
.olI small { display: block; font-size: 10.5px; color: var(--muted) }
.olI.cab > span { white-space: normal; line-height: 1.3 }
.olI .ln { position: relative }
.olI .ln::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--c) }
.olSub { margin: 8px 0 2px 6px; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.olE { padding: 6px; color: var(--muted); font-size: 12px }
.tab { overflow-x: hidden }
.olTree { margin: 0 }
.olH em { white-space: nowrap }
.olTree, .olLayers { grid-template-columns: minmax(0, 1fr) }
.olF, .olK, .olI, .olH { min-width: 0 }
