/* gal6 játékfelület; a tokenek a tokens.css-ben, az arculat leírása a design/ARCULAT-KIVONAT.md-ben */

/* ---------- keret: a végleges, 2012-es terv (design/VEGLEGES-ATALLAS.md, fejlec_final_2) ---------- */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.frame { max-width: 1200px; margin: 0 auto; }
.acc { color: var(--accent); }

/* felső sáv: 75 px, faji fényes átmenet, függőleges elválasztók (head) */
.top { background: var(--g-top); border: 1px solid var(--frame); border-top: 0; box-shadow: inset 0 -2px 0 var(--top-edge); }
.top-in { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto 44px auto auto; align-items: stretch; min-height: 75px; }
.top .cell { display: grid; align-content: center; gap: 3px; padding: 4px 12px; min-width: 0; border-left: 2px solid var(--top-sep); }
.top .cell:first-child { border-left: 0; }
.top .logo { justify-items: center; padding: 4px 6px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-14); color: #fff; text-decoration: none; }
.brand img { display: block; height: 44px; width: auto; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 55%)); }
.brand .mark { height: 32px; }
.top .brand .mark { height: 52px; width: auto; }
.page-head.same { justify-content: flex-end; }
.page-head.same:not(:has(p)) { display: none; }
.planet-id h1 { font-size: var(--fs-18); color: #fff; text-transform: uppercase; letter-spacing: 0.02em; text-shadow: 0 1px 2px rgb(0 0 0 / 55%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .facts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: #fff; text-shadow: 0 1px 1px rgb(0 0 0 / 60%); }
.top .facts b { font-variant-numeric: tabular-nums; }
.top .facts .acc { color: var(--top-acc); }
.top .facts .muted { color: rgb(255 255 255 / 70%); }
.rank-pin { display: inline-block; vertical-align: middle; height: 18px; width: auto; margin-right: 2px; }
.top .race { justify-items: center; padding: 4px; }
.race-mark { display: block; height: 58px; width: auto; max-width: 34px; object-fit: contain; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 55%)); }
.who { display: flex; align-items: center; gap: 6px; }
.who .name { font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }

/* G6T kijelző: zöld LCD-szerű számjegyek majdnem fekete dobozban, kör számítása közben vörös (o. 22-23) */
.g6t { justify-items: end; }
.g6t-box { display: inline-flex; align-items: baseline; gap: 8px; min-width: 175px; justify-content: space-between; padding: 3px 8px; background: var(--c-g6t-bg); border: 1px solid var(--c-g6t); color: var(--c-g6t); font-style: italic; font-weight: 700; }
.g6t-box .lbl { font-size: var(--fs-9); letter-spacing: 0.08em; }
.g6t-box strong { font-size: var(--fs-18); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; text-shadow: 0 0 6px rgb(7 182 41 / 45%); }
.g6t-box .at { font-size: var(--fs-10); }
.g6t-box.busy { color: var(--c-g6t-busy); border-color: var(--c-g6t-busy); }
.g6t-box.busy strong { text-shadow: 0 0 6px rgb(255 0 0 / 45%); }
.g6t-box.stopped { color: var(--c-warn); border-color: var(--c-warn); font-style: normal; }
.g6t .round { font-size: var(--fs-10); color: #fff; text-align: right; text-shadow: 0 1px 1px rgb(0 0 0 / 60%); }
.g6t .round b { font-variant-numeric: tabular-nums; }

/* információs sor: 100 px, sötét, cellánként elválasztó (info_sav) */
.info {
  display: grid; grid-template-columns: minmax(210px, 1.25fr) minmax(150px, 0.85fr) 96px 120px 98px 98px 108px; align-items: stretch; min-height: 100px;
  background: linear-gradient(#403c3b 0, #27221f 45%, #1e1915 100%); border: 1px solid var(--frame); border-top: 0; font-size: var(--fs-10);
}
.info .cell { min-width: 0; padding: 5px 8px; border-left: 2px solid #493f3e; }
.info .cell:first-child { border-left: 0; }
.info h3 { margin-bottom: 4px; font-size: var(--fs-10); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info .fleets { display: grid; align-content: space-around; gap: 2px; padding: 4px 8px; }
.fl-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 6px; min-height: 21px; }
.fl-name { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; color: var(--c-title); }
.fl-name span { color: var(--accent); font-size: var(--fs-9); }
.fl-state { color: var(--c-muted); }
.fl-track { display: grid; grid-template-columns: 16px minmax(0, 1fr) 16px; align-items: center; gap: 3px; }
.fl-end { width: 16px; height: 16px; object-fit: contain; }
.fl-bar { position: relative; height: 8px; background: #3a2414; border: 1px solid #000; overflow: hidden; }
.fl-bar .fill { height: 100%; background: linear-gradient(#e6a05b, #b65c1b); }
.fl-row.defend .fl-bar .fill { background: linear-gradient(#8fd06f, #3f941b); }
.fl-row.scout .fl-bar .fill { background: linear-gradient(#8fb6ff, #2c5fd0); }
.fl-row.back .fl-bar .fill { margin-left: auto; }
.info .moves { display: grid; align-content: space-around; }
.mv-row { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 700; color: #fff; }
.mv-row .n { min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.mv-row .chev { letter-spacing: -2px; font-weight: 700; }
.mv-row .chev.in { color: var(--accent); }
.mv-row .chev.out { color: var(--c-g6t); }
.mv-ico { width: 22px; height: 22px; object-fit: contain; margin: 0 2px; }
.mv-row.none { gap: 8px; font-weight: 400; }
.info .plasma { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 6px; margin: 0; align-items: center; }
.info .plasma dt { display: flex; }
.info .plasma dd { margin: 0; text-align: right; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.info .plasma .ri { width: 20px; height: 11px; object-fit: contain; }
.info .plasma .off { filter: grayscale(1) brightness(0.8); color: var(--c-muted); }
.info .resbar { display: grid; gap: 3px; font-variant-numeric: tabular-nums; }
.info .res { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.info .res .ri { width: 12px; height: 12px; }
.info .res .amt { font-weight: 700; color: var(--accent); }
.info .res.full .amt { color: var(--c-danger); }
.top-list .place { display: flex; align-items: center; gap: 3px; margin-top: 6px; font-size: var(--fs-11); font-variant-numeric: tabular-nums; }
.top-list .place b { color: #fff; }
.top-list .trend { width: 7px; height: 5px; }
.top-list .val { margin-top: 2px; color: var(--c-title); font-weight: 700; font-variant-numeric: tabular-nums; }
.info .avatar { display: grid; place-items: center; padding: 3px; background: radial-gradient(circle, #2a2a2a 0, #0b0b0b 70%); }
.info .avatar img { width: 92px; height: 92px; }

/* törzs: bal ikonsáv 40 px, tartalompanel, jobb eseménysáv 115 px */
.body {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 115px; grid-template-rows: 31px auto 1fr; min-height: 560px;
  margin-bottom: 40px; border: 1px solid var(--frame); border-top: 0; background: rgb(0 0 0 / 55%);
}
.body.solo { grid-template-columns: 40px minmax(0, 1fr); }
.body.solo main { grid-column: 2; }
.nav { display: contents; }
.nav-main { grid-column: 1; grid-row: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding: 2px 0; background: #0f110c; border-right: 1px solid #000; }
.rail-block { display: grid; gap: 1px; background: #1b1d1f; }
.rail-block.comm { background: #26282a; }
.rail-block.sys { margin-top: auto; }
.nav-main button {
  position: relative; display: grid; place-items: center; width: 100%; height: 30px; padding: 0; border: 0; background: #2a2d30; cursor: pointer; color: #b9b9b9;
}
.nav-main button img { max-width: 22px; max-height: 20px; filter: grayscale(1) brightness(0.75); transition: filter 0.15s ease; }
.nav-main button .ic { width: 16px; height: 16px; }
.nav-main button:hover img, .nav-main button.on img, .nav-main button[aria-current="true"] img { filter: none; }
.nav-main button:hover { background: #383c40; color: #fff; }
.nav-main button.on, .nav-main button[aria-current="true"] { background: var(--g-box-head); color: #fff; }
.nav-main button.on::after { content: ""; position: absolute; right: -6px; top: 50%; border: 5px solid transparent; border-left-color: var(--accent); transform: translateY(-50%); }
.nav-main .count { position: absolute; top: 1px; right: 1px; }

.panel-head {
  grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 14px; min-width: 0;
  background: linear-gradient(#8f8f8f 0, #7b7b7b 48%, #6a6a6a 52%, #5e5e5e 100%); border-bottom: 1px solid #000; position: relative;
}
.panel-head::before { content: ""; position: absolute; left: 0; top: 50%; border: 5px solid transparent; border-left-color: var(--accent); transform: translateY(-50%); }
.panel-head h2 { font-size: var(--fs-14); color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / 70%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-sub { grid-column: 2; grid-row: 2; display: flex; align-items: stretch; gap: 2px; padding: 6px 10px 0; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--frame); }
.nav-sub:has(> :only-child) { display: none; }
.nav-sub button {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 24px; padding: 0 14px; background: var(--g-tab-off); border: 1px solid var(--c-line-soft); border-bottom: 0;
  color: var(--text-off); cursor: pointer; white-space: nowrap; font-weight: 700; font-size: var(--fs-11);
}
.nav-sub button:hover { color: #fff; }
.nav-sub button[aria-current="page"] { background: var(--g-box-head); border-color: var(--frame); color: #fff; text-shadow: 0 1px 1px rgb(0 0 0 / 60%); }
.count { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 2px; background: #e50000; color: #fff; font-size: var(--fs-9); font-weight: 700; line-height: 14px; text-align: center; }

main { grid-column: 2; grid-row: 3; display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; align-content: start; min-width: 0; padding: 10px; }

/* jobb eseménysáv: olvasatlan-összesítő, mátrix (be- és kimenő), gyorsgombok (news) */
.news { grid-column: 3; grid-row: 1 / -1; display: flex; flex-direction: column; background: #232323; border-left: 1px solid #000; }
.news button { cursor: pointer; font: inherit; }
.news-total { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 31px; padding: 0 8px; background: linear-gradient(#4a4a4a, #2a2a2a); border: 0; border-bottom: 1px solid #000; color: #cfcfcf; }
.news-total .lbl { font-size: var(--fs-9); }
.news-total .count.big { font-size: var(--fs-11); line-height: 18px; min-width: 30px; background: #555; }
.news-total.hot .count.big { background: #e50000; }
.matrix { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #000; }
.mx { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2px; height: 30px; padding: 0 5px; background: #2e3235; border: 0; border-bottom: 1px solid #1a1a1a; color: var(--c-muted); }
.mx:nth-child(odd) { border-right: 1px solid #1a1a1a; }
.mx:hover { background: #3a3f43; }
.mx img { width: 25px; height: 12px; object-fit: contain; }
.mx .n { font-size: var(--fs-10); font-weight: 700; font-variant-numeric: tabular-nums; }
.mx.hot .n { color: #fff; }
.mx.off { cursor: help; }
.mx.off img { filter: grayscale(0.6); opacity: 0.6; }
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; }
.shortcuts button { position: relative; display: grid; place-items: center; height: 40px; background: #2a2d30; border: 0; border-bottom: 1px solid #1a1a1a; }
.shortcuts button:nth-child(odd) { border-right: 1px solid #1a1a1a; }
.shortcuts button:hover { background: #383c40; }
.shortcuts button.on { background: #4a2a10; box-shadow: inset 0 0 0 1px var(--accent); }
.shortcuts img { width: 24px; height: 24px; }
.shortcuts .count { position: absolute; top: 3px; right: 6px; }

/* oldalcím a panelben: a cím a panelfejlécben áll, itt csak az alcím látszik */
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 0 2px 2px; border-bottom: 1px solid var(--c-line-soft); }
.page-head h2 { font-size: var(--fs-12); color: var(--accent); }
.page-head p { color: var(--c-muted); font-size: var(--fs-10); }

/* doboz: 20 px-es faji fejléc, középre igazított félkövér cím, szögletes (e/4) */
.card { position: relative; background: var(--g-panel); background-color: var(--c-box); border: 1px solid var(--frame); padding: 8px 10px; min-width: 0; }
.card > h3:first-child, .card > .card-head:first-child { margin: -8px -10px 8px; }
.card.stack > h3:first-child, .card.stack > .card-head:first-child { margin-bottom: 0; }
.card > h3, .card-head > h3, .card-head > strong:first-child { font-size: var(--fs-11); }
.card > h3:first-child { min-height: var(--h-box-head); padding: 3px 10px; background: var(--g-box-head); color: #fff; text-align: center; text-shadow: 0 1px 1px rgb(0 0 0 / 70%); }
.card > .card-head:first-child { min-height: var(--h-box-head); padding: 1px 4px 1px 10px; background: var(--g-box-head); color: #fff; text-shadow: 0 1px 1px rgb(0 0 0 / 70%); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head .muted { color: rgb(255 255 255 / 85%); }
.card-head .tag { background: rgb(0 0 0 / 55%); }
.card-head .btn.small { min-height: 16px; padding: 0 6px; font-size: var(--fs-10); }
.card > h3.side-att, .card-head.side-att { background: var(--g-head-att); }
.card > h3.side-def, .card-head.side-def { background: var(--g-head-msg); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 9px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.stack { display: grid; gap: 8px; align-content: start; }
.stack > .btn { justify-self: start; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.row.end { justify-content: flex-end; }
.muted { color: var(--c-muted); }
.small { font-size: var(--fs-10); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--mono); }

main > section.stack > h3 { padding: 4px 10px; background: var(--g-head-news); border: 1px solid var(--c-line); color: var(--c-title); font-size: var(--fs-11); }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; margin: 0; }
.kv dt { color: var(--c-muted); }
.kv dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- címke, jelzés ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; line-height: 16px; border-radius: 2px; border: 1px solid var(--c-line);
  font-size: var(--fs-10); font-weight: 700; color: var(--c-muted); background: #0a0a0a; white-space: nowrap;
}
.tag.ok { color: var(--c-ok); border-color: var(--c-def-line); background: var(--c-def-bg); }
.tag.warn { color: var(--c-warn); border-color: var(--c-warn-line); background: var(--c-warn-bg); }
.tag.bad { color: var(--c-danger); border-color: var(--c-att-line); background: var(--c-att-bg); }
.tag.info { color: var(--accent); border-color: var(--frame); background: var(--field); }
.tag img { width: 14px; height: 14px; }

.why { color: var(--c-muted); font-size: var(--fs-10); }
.why.bad { color: var(--c-danger); }

/* haladásjelző: G6T-doboz zöld helyett faji kitöltéssel */
.bar { height: 10px; background: var(--c-g6t-bg); border: 1px solid var(--frame); overflow: hidden; }
.bar .fill { height: 100%; width: 0; background: var(--g-box-head); transition: width 0.4s ease; }

/* ---------- táblázat (o. 41) ---------- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 3px 8px; text-align: left; vertical-align: middle; }
th { height: var(--h-box-head); background: var(--g-th); color: #fff; font-size: var(--fs-11); font-weight: 700; text-shadow: 0 1px 1px rgb(0 0 0 / 60%); white-space: nowrap; }
tbody tr:nth-child(odd) td { background: var(--c-row-a); }
tbody tr:nth-child(even) td { background: var(--c-row-b); }
td { border-top: 1px solid #0b0b0b; }
.tbl { overflow-x: auto; border: 1px solid var(--frame); background: var(--c-box); }
.tbl table td.name { font-weight: 700; }
tr.mine td, tbody tr.mine:nth-child(n) td { background: var(--c-hl); }
tr.unread td { font-weight: 700; color: var(--c-title); }
tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--field); }
tr.click:focus-visible { outline-offset: -2px; }

/* költség: nyersanyag-ikon (raszter, tájékoztató hely) vagy színkocka */
.res-cost { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; font-variant-numeric: tabular-nums; }
.res-cost span { display: inline-flex; align-items: center; gap: 3px; }
.res-cost span::before { content: ""; width: 8px; height: 8px; background: var(--c-metal); }
.res-cost .crystal::before { background: var(--c-crystal); }
.res-cost .narion::before { background: var(--c-narion); }
.res-cost.ico span::before { display: none; }
.res-cost img { width: 14px; height: 14px; }
.res-cost .short { color: var(--c-danger); font-weight: 700; }

/* ---------- üzenetsáv ---------- */
.empty { color: var(--c-muted); padding: 4px 0; }
.alert { padding: 6px 10px; border: 1px solid var(--c-line); background: #0a0a0a; }
.alert.warn { border-color: var(--c-warn-line); background: var(--c-warn-bg); color: #ffe2b8; }
.alert.bad { border-color: var(--c-att-line); background: linear-gradient(#3a1512, #200a09); color: #ffd6d1; }
.alert.info { border-color: var(--frame); background: var(--field); }
.alert p + p { margin-top: 3px; }
.alert.row { justify-content: space-between; }

.side-att { color: var(--c-att); }
.side-def { color: var(--c-def); }
.card > h3.side-att, .card > h3.side-def { color: #fff; }
.card > h3 .ico-in { width: 14px; height: 14px; vertical-align: -3px; margin-right: 5px; }

/* ---------- belépés, új planéta ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 12px; }
.gate > .card { width: min(420px, 100%); padding: 16px; }
.gate .brand { justify-content: center; margin-bottom: 12px; }
.gate .brand img { height: 56px; }
.gate h2 { font-size: var(--fs-14); color: var(--accent); }
.gate .join { width: min(720px, 100%); }
.switch-tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 10px; border-bottom: 1px solid var(--frame); }
.switch-tabs button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 auto; min-height: var(--h-tab); padding: 0 12px;
  background: var(--g-tab-off); border: 1px solid var(--c-line-soft); border-bottom: 0; color: var(--text-off); cursor: pointer; font-weight: 700;
}
.switch-tabs button + button { margin-left: 2px; }
.switch-tabs button:hover { color: #fff; }
.switch-tabs button[aria-selected="true"] { background: var(--field); border-color: var(--frame); color: var(--accent); }
.switch-tabs.multi { margin-bottom: 0; }
.switch-tabs.multi button { flex: 1 1 110px; }

.race-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 6px; margin: 0; padding: 0; border: 0; }
.race-list legend { margin-bottom: 4px; }
.race {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 6px 8px; cursor: pointer;
  background: var(--g-panel); border: 1px solid var(--frame);
}
.race strong { color: var(--accent); }
.race .pl { grid-column: 3; grid-row: 1 / 6; width: 48px; height: 48px; }
.race:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--field); }
.race.off { opacity: 0.6; cursor: not-allowed; }
.race small { grid-column: 2; color: var(--c-muted); font-size: var(--fs-10); }
.race .tip { font-style: italic; }

.field { display: grid; gap: 3px; min-width: 0; }
.field > label { font-weight: 700; font-size: var(--fs-10); color: var(--c-muted); }
.form { display: grid; gap: 10px; }
input[type="number"] { width: 90px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- modál, értesítés ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 12px; background: rgb(0 0 0 / 72%); animation: fade 0.16s ease-out; }
.modal { width: min(540px, 100%); max-height: calc(100vh - 24px); overflow: auto; display: grid; gap: 10px; animation: pop 0.18s ease-out; box-shadow: 0 0 0 1px #000, 0 8px 30px rgb(0 0 0 / 70%); }
.modal.card > .card-head:first-child { position: sticky; top: -8px; z-index: 1; margin-bottom: 0; }
.modal.wide { width: min(760px, 100%); }
.modal .actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(6px); } }

/* értesítő buborék a tooltip-keretből: narancs vonal, fekete gyűrű, halvány sárga külső keret (e/5) */
.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: grid; gap: 12px; width: min(360px, calc(100vw - 32px)); }
.toast {
  padding: 7px 10px; background: var(--c-row-b); border: 1px solid var(--c-flotta); box-shadow: 0 0 0 3px #0c0805, 0 0 0 5px #d8ce76, 0 6px 18px rgb(0 0 0 / 60%);
  animation: rise 0.2s ease-out;
}
.toast strong { display: block; color: var(--c-flotta); }
.toast.ok strong { color: var(--c-g6t); }
.toast.bad { border-color: var(--c-g6t-busy); }
.toast.bad strong { color: #ff6b5e; }
.toast.out { animation: sink 0.2s ease-in forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes sink { to { opacity: 0; transform: translateY(8px); } }

.loading { padding: 30px; text-align: center; color: var(--c-muted); }
.loading::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; }

/* lépésjelző: egymás melletti fülek */
.steps { display: flex; gap: 2px; flex-wrap: wrap; }
.steps span { flex: 1 1 auto; padding: 3px 10px; background: var(--g-tab-off); border: 1px solid var(--c-line-soft); color: var(--text-off); font-weight: 700; text-align: center; }
.steps span.on { background: var(--g-box-head); border-color: var(--frame); color: #fff; }

.report-sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }

/* ---------- közösség, admin ---------- */
textarea { width: 100%; min-height: 76px; line-height: 1.45; resize: vertical; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.unread { border-color: var(--accent); }
.post { display: grid; gap: 3px; padding: 6px 0; border-top: 1px solid var(--c-line); }
.post strong { color: var(--c-title); }
.quote { margin: 0; padding: 6px 10px; background: #050505; border: 1px solid var(--c-line); color: var(--c-muted); }
.guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 26px; padding: 3px 8px; text-align: left;
  background: var(--c-row-a); color: var(--c-text); border: 1px solid transparent; cursor: pointer;
}
.guide li:nth-child(even) button { background: var(--c-row-b); }
.guide button:hover { border-color: var(--accent); }
.guide .t { flex: 1; }
.guide .chk { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--frame); background: #050505; flex: none; }
.guide .chk .ic { width: 12px; height: 12px; }
.guide li.done .chk { background: var(--c-def-strong); border-color: var(--c-def); color: #fff; }
.guide li.done .t { color: var(--c-muted); text-decoration: line-through; }
.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip.wide { max-width: 420px; }
td .row { gap: 4px; }
td img.ri { width: 14px; height: 14px; vertical-align: -3px; }
.race-ico { height: 16px; width: auto; max-width: 22px; object-fit: contain; vertical-align: -4px; margin-right: 5px; }

/* ---------- D6 V3: tablet és mobil (a végleges tervben nincs, saját) ---------- */
.info { overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
.info .cell { scroll-snap-align: start; }
@media (max-width: 1080px) {
  .frame { padding: 0 6px; }
  .top .race { display: none; }
  .top-in { grid-template-columns: 100px minmax(0, 1fr) auto auto auto; }
}
@media (max-width: 860px) {
  .frame { padding: 0; }
  .top, .info, .body { border-left: 0; border-right: 0; }
  .top-in { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; min-height: 0; }
  .top .cell { padding: 5px 8px; }
  .top .logo { grid-row: 1 / 3; }
  .brand img, .top .brand .mark { height: 34px; }
  .top .planet-id { grid-column: 2; grid-row: 1; }
  .planet-id h1 { font-size: var(--fs-14); }
  .top .tools { grid-column: 3; grid-row: 1; }
  .who .name { display: none; }
  .top .rank { grid-column: 2; grid-row: 2; border-left: 0; border-top: 1px solid var(--top-sep); }
  .top .rank .facts { display: inline-flex; }
  .top .rank { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; }
  .top .g6t { grid-column: 3; grid-row: 2; border-top: 1px solid var(--top-sep); }
  .g6t-box { min-width: 0; gap: 6px; }
  .g6t-box .at, .g6t .round { display: none; }
  .info { min-height: 0; grid-template-columns: 230px 170px 96px 120px 98px 98px; }
  .info .avatar { display: none; }
  .body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; min-height: 0; margin-bottom: 0; padding-bottom: 52px; }
  .nav-main {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; flex-direction: row; gap: 4px; height: 48px; padding: 0 2px;
    border-right: 0; border-top: 1px solid var(--frame); overflow-x: auto; scrollbar-width: none;
  }
  .rail-block { display: flex; gap: 1px; }
  .rail-block.sys { margin-top: 0; margin-left: auto; }
  .nav-main button { width: 42px; height: 46px; flex: none; }
  .nav-main button.on::after { display: none; }
  .nav-main button.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .panel-head { grid-column: 1; grid-row: 1; }
  .nav-sub { grid-column: 1; grid-row: 2; padding: 6px 6px 0; }
  .news { grid-column: 1; grid-row: 3; flex-direction: row; border-left: 0; border-bottom: 1px solid #000; overflow-x: auto; scrollbar-width: none; }
  .news-total { height: auto; flex-direction: column; justify-content: center; gap: 2px; border-bottom: 0; border-right: 1px solid #000; }
  .matrix { grid-template-columns: repeat(8, minmax(52px, 1fr)); flex: 1; border-bottom: 0; }
  .mx, .mx:nth-child(odd) { border-right: 1px solid #1a1a1a; }
  .shortcuts { display: none; }
  main, .body.solo main { grid-column: 1; grid-row: 4; padding: 8px; }
  .report-sides { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .toasts { left: 12px; right: 12px; bottom: 60px; width: auto; }
}
@media (pointer: coarse) {
  .nav-main button { min-height: 40px; }
  .mx { height: 40px; }
}

/* M5a: planéta nélküli admin-keret, Beállítások, visszaállító kód */
.settings { max-width: 420px; }
.reset-code { font-size: var(--fs-18); letter-spacing: 0.12em; text-align: center; padding: 10px; border: 1px solid var(--frame); background: rgb(0 0 0 / 40%); user-select: all; }
