html,
body {
  height: 100%;
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    Cantarell,
    Arial;
  background: #ffffff;
  color: #000;
}

#app {
  height: 100%;
  display: grid;
  grid-template-columns: 380px 1fr;
  grid-template-rows: auto 1fr;
}

header {
  grid-column: 1 / 3;
  border-bottom: 1px solid #ddd;
  padding: 8px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
}

header h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

header .hint {
  font-size: 12px;
  color: #666;
}

aside {
  padding: 10px;
  border-right: 1px solid #ddd;
  overflow: auto;
  background: #fff;
}

main {
  position: relative;
  background: #f5f5f5;
}

#viewport {
  position: absolute;
  inset: 0;
  display: block;
}

fieldset {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 10px 0;
  background: #fff;
}

legend {
  font-weight: 600;
  padding: 0 6px;
  color: #222;
}

label {
  display: block;
  font-size: 12px;
  color: #333;
  margin: 6px 0 2px;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  color: #000;
}

input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 2px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  background: #fff;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.row4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid #bbb;
  background: #fff;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  color: #222;
}

.btn:hover {
  background: #f2f2f2;
}

.btn.primary {
  background: #1a73e8;
  color: #fff;
  border-color: #1669c1;
}

.btn:active {
  transform: translateY(1px);
}

ul.list {
  list-style: none;
  padding: 0;
  margin: 6px 0;
  border: 1px solid #eee;
  border-radius: 6px;
  max-height: 160px;
  overflow: auto;
  background: #fff;
}

ul.list li {
  padding: 6px 8px;
  border-top: 1px solid #f1f1f1;
  cursor: pointer;
  color: #222;
}

ul.list li:first-child {
  border-top: none;
}

ul.list li.sel {
  background: #e8f0fe;
}

.note {
  font-size: 12px;
  color: #555;
}

.pass {
  color: #2e7d32;
}

.fail {
  color: #c62828;
}

.muted {
  color: #888;
  font-style: italic;
}

/* görgetősáv, hogy szépen nézzen ki */
aside::-webkit-scrollbar,
ul.list::-webkit-scrollbar {
  width: 8px;
}

aside::-webkit-scrollbar-thumb,
ul.list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

aside::-webkit-scrollbar-track,
ul.list::-webkit-scrollbar-track {
  background: #f5f5f5;
}

/* === Control Lines panel kiegészítés ============================================= */
#clPane {
  margin-top: 10px;
}

/* A CL panelen két oszlopos elrendezést szeretnénk */
#clPane .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* A bal/jobb hasábok rugalmasan méreteződjenek */
#clPane .column {
  min-width: 0;
}

/* Gombok sora a listák alatt */
#clPane .btnrow {
  display: flex;
  gap: 6px;
  margin: 6px 0;
}

/* Két- és háromhasábos rács a mezőkhöz (csak a CL panelen) */
#clPane .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#clPane .grid3 {
  grid-template-columns: 1fr 1fr; /* eddigi 3 helyett 2 oszlop */
}

/* kényelmesebb „touch-size” és olvashatóbb font */
#clPane #cpStyle,
#clPane #cpLineStyle,
#clPane #cpIW,
#clPane #cpOW {
  height: 36px;
  font-size: 14px;
  padding: 6px 8px;
}

/* A panelen belüli inputok/legördülők szépen kitöltsék a sort */
#clPane input,
#clPane select {
  width: 100%;
}


/* Checkbox rows: Rot(Y), AuxPoints, ShowRad */
.checkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.checkrow label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.checkrow input[type="checkbox"] {
  margin: 0;
}


/*
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.header-links a {
  margin-left: 0.75rem;
  text-decoration: none;
  font-size: 0.95rem;
}

.header-links a:hover {
  text-decoration: underline;
}*/

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Linkek a címsorban – gombszerű “pill” stílus */
.header-links {
  display: flex;
  gap: 0.5rem;
}

.header-links a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #888;
  background: #ffffff;
  color: #222;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease;
}

.header-links a:hover {
  background: #2f80ed;
  color: #ffffff;
  border-color: #2f80ed;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.header-links a:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

#clLineRefList li,
#clCPRefList li,
#clSupportMajorRefList li,
#clSupportMinorRefList li {
  font-size: 7px;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.btn-icon {
  padding: 0 4px;
  min-width: 0;
  font-size: 11px;
  line-height: 1;
}


#gpList li.sel {
    background: #444;
    color: #fff;
}
#grpList li.sel {
    background: #444;
    color: #fff;
}
#scnAddSourceTree li.sel {
    background: #4b9ee2;
    color: #131313;
}

#gpList {
  max-height: none;
  overflow-y: visible; // ha a .list-ben auto volt, és nem akarsz scrollt 
} 



.variant-icon-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.variant-icon {
  min-width: 20px;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid #444;
  font-size: 12px;
  text-align: center;
  box-sizing: border-box;
}

#avatarCorner {
  position: fixed;          /* mindig a sarokban marad */
  top: 8px;                 /* állíthatod: pl. bottom: 8px; is lehetne */
  right: 8px;
  width: var(--avatar-size, 64px);
  height: var(--avatar-size, 64px);
  z-index: 1000;            /* hogy minden fölött legyen */
  pointer-events: none;     /* ne zavarja a kattintást az editorban */
}

#avatarCorner img {
  width: 100%;
  height: 100%;
  object-fit: contain;      /* ne torzuljon a kép */
  border-radius: 50%;       /* ha kör alakút szeretnél, különben kiveheted */
}


/* gpList és Scene tree: ne legyen default bullet*/
#gpList ul,
#gpList li,
#scnAddSourceTree ul,
#scnAddSourceTree li {
  list-style-type: none;
  margin: 0;
  padding-left: 8px; /* hogy legyen egy kis behúzás */
}

/* az ikon a fő csoport előtt */
.tree-main-icon {
  width: 32px;      /* itt állítod a pixel méretet */
  height: 30px;
  margin-right: 2px;
  vertical-align: middle;
}