:root {
  --bg: #000;
  --panel: rgba(12, 16, 28, 0.82);
  --line: rgba(140, 170, 255, 0.18);
  --text: #e6ebf5;
  --muted: #8d97ad;
  --accent: #7fb4ff;
  --warm: #ffcf7a;
  --font: system-ui, 'Segoe UI', Roboto, sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 var(--font);
}
/* Painel de lugares à esquerda (permanente); o 3D e o resto da interface ficam em #stage, à direita dele.
   O transform de #stage faz os elementos "fixed" de dentro se posicionarem em relação a ele, não à janela. */
:root {
  --side-w: 300px;
  --info-w: 0px;
  --ctl-w: 340px;
}
body.info-open {
  --info-w: 360px;
}
#stage {
  position: fixed;
  top: 0;
  bottom: 0;
  right: var(--ctl-w);
  left: calc(var(--side-w) + var(--info-w));
  overflow: hidden;
  transform: translateZ(0);
}
canvas#view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
canvas#view:active {
  cursor: grabbing;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover {
  background: rgba(127, 180, 255, 0.16);
}
button.on,
button.accent {
  background: rgba(127, 180, 255, 0.22);
  border-color: rgba(127, 180, 255, 0.5);
}
select {
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 6px;
}
.panel {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}
h3 {
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  padding: 2px 8px;
}

#top {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 5;
}
#top > * {
  pointer-events: auto;
}
#where {
  min-width: 220px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  text-shadow: 0 0 8px #000;
  padding-top: 4px;
}
#where b {
  color: var(--text);
  font-weight: 500;
}

#side {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--side-w);
  background: #0a0e18;
  border-right: 1px solid var(--line);
  z-index: 8;
  display: flex;
}
#sideMain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
#sideHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 6px 14px;
}
#brand {
  font-size: 20px;
  letter-spacing: 0.04em;
}
#brand b {
  color: var(--accent);
  font-weight: 700;
}
#sideToggle {
  border: none;
  background: none;
  font-size: 18px;
  color: var(--muted);
  padding: 2px 8px;
}
#searchbox {
  padding: 0 10px 8px;
}
#search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}
#search:focus {
  border-color: var(--accent);
}
#sideScroll {
  flex: 1;
  overflow: auto;
  padding: 0 6px 12px;
  overscroll-behavior: contain;
}
#sideGrip {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  z-index: 2;
}
#sideGrip:hover,
body.resizing #sideGrip {
  background: linear-gradient(90deg, transparent 3px, rgba(127, 180, 255, 0.6) 3px, rgba(127, 180, 255, 0.6) 5px, transparent 5px);
}
body.resizing {
  cursor: col-resize;
  user-select: none;
}
body.resizing canvas#view {
  pointer-events: none;
}
#sideRail {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding-top: 10px;
  cursor: pointer;
}
#sideRail button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  font-size: 16px;
}
#sideRail button:hover {
  background: rgba(127, 180, 255, 0.16);
}
body.side-collapsed #sideMain,
body.side-collapsed #sideGrip {
  display: none;
}
body.side-collapsed #sideRail {
  display: flex;
}

/* árvore */
#tree .tn {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 8px 4px calc(4px + var(--d) * 14px);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}
#tree .tn:hover {
  background: rgba(127, 180, 255, 0.12);
}
#tree .tw {
  width: 12px;
  flex: none;
  color: var(--muted);
  font-size: 11px;
  transition: transform 0.12s;
  text-align: center;
}
#tree .tn.open > .tw {
  transform: rotate(90deg);
}
#tree .tl {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tree .tn small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}
#tree .tn small.tc {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0 6px;
}
#tree .tn.br:not(.go) .tl {
  color: #cdd6ea;
}
#tree .tn[style='--d:0'] {
  margin-top: 2px;
  font-weight: 600;
}
#tree .tn.go .tl::after {
  content: '';
}
#tree .tn.go:hover .tl {
  color: var(--accent);
}
#tree .tn.cur {
  background: rgba(127, 180, 255, 0.22);
  box-shadow: inset 2px 0 0 var(--accent);
}
#tree .tn.wait {
  color: var(--muted);
  font-style: italic;
  cursor: default;
}
#tree mark {
  background: rgba(255, 207, 122, 0.28);
  color: inherit;
  border-radius: 2px;
}
#tree .empty {
  padding: 6px 10px;
}
#catalog h3 {
  margin: 12px 8px 4px;
}
#suggest {
  margin: 0;
  padding: 0;
  list-style: none;
}
#suggest li {
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
#suggest li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#suggest li.sel,
#suggest li:hover {
  background: rgba(127, 180, 255, 0.18);
}
#suggest li small {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

/* ficha do selecionado: coluna inteira ao lado do painel de lugares */
#info {
  position: fixed;
  left: var(--side-w);
  top: 0;
  bottom: 0;
  width: var(--info-w);
  overflow: auto;
  padding: 16px 16px 24px;
  z-index: 7;
  background: #0c111d;
  border-right: 1px solid var(--line);
  overscroll-behavior: contain;
}
#info[hidden] {
  display: none;
}
#info .earthSec {
  margin-top: 18px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
#info .earthSec h3 {
  color: #7fd8ff;
}
#info .earthSec button:disabled {
  opacity: 0.35;
  cursor: default;
}
#info .kind {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#info h2 {
  font-size: 20px;
  margin: 2px 0 4px;
  padding-right: 20px;
}
#info .aka {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
#info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  margin: 10px 0;
  font-size: 13px;
}
#info dt {
  color: var(--muted);
}
#info dd {
  margin: 0;
}
#info .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}
#info .note {
  font-size: 12px;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 8px;
  margin-top: 10px;
}
#info .lighttime {
  color: var(--warm);
  font-size: 13px;
  margin: 8px 0;
}
#info img.thumb {
  width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  background: #000;
}
#info ul.planets {
  list-style: none;
  margin: 6px 0;
  padding: 0;
  font-size: 13px;
}
#info svg.sizecmp text {
  fill: var(--muted);
  font-size: 11px;
}
#info b.hz {
  color: #3ddc84;
}
#info ul.planets li {
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}
#info ul.planets li:hover {
  background: rgba(127, 180, 255, 0.14);
}

#feedList .cat {
  margin: 14px 0 4px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#feedList button[data-ch] {
  display: block;
  width: 100%;
  text-align: left;
  margin: 2px 0;
  border-color: transparent;
  background: none;
}
#feedList button[data-ch]:hover {
  background: rgba(127, 180, 255, 0.14);
}
#feedList button[data-ch] small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
#feedList .skin {
  font-size: 12px;
  background: rgba(127, 180, 255, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
}
#feedList .skin button {
  font-size: 11px;
  padding: 2px 6px;
  margin-left: 4px;
}
#feedList a {
  color: var(--accent);
}
#dsnPanel {
  position: fixed;
  right: 12px;
  top: 64px;
  width: 360px;
  max-height: calc(100% - 140px);
  overflow: auto;
  padding: 14px;
  z-index: 5;
}
#info .row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
#info input:not([type='checkbox']) {
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 6px;
  min-width: 0;
  flex: 1;
}
#info details[data-plblock] {
  margin: 6px 0;
}
#info details[data-plblock] > summary {
  cursor: pointer;
  padding: 6px 4px;
  font-size: 13px;
  color: #cdd6ea;
  border-radius: 6px;
}
#info details[data-plblock] > summary:hover {
  background: rgba(127, 180, 255, 0.1);
}
#info #plStatus {
  margin: 4px 0 10px;
}
.plRow {
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.plRow small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.plRow:hover {
  background: rgba(127, 180, 255, 0.14);
}
.lbl.card {
  color: #ffcf7a;
  font-weight: 700;
  font-size: 14px;
}
.lbl.card::before,
.lbl.const::before {
  display: none;
}
.lbl.const {
  color: rgba(130, 170, 230, 0.85);
  font-style: italic;
  font-size: 11.5px;
  letter-spacing: 0.03em;
}
#timePanel section[hidden] {
  display: none;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.tabs button.on {
  background: rgba(127, 180, 255, 0.25);
  border-color: rgba(127, 180, 255, 0.6);
}
#timePanel input[type='range'] {
  width: 100%;
}
#timePanel input[type='datetime-local'] {
  flex: 1;
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 6px;
  color-scheme: dark;
}
.scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.scale b {
  color: var(--warm);
  font-weight: 500;
}
.eclRow,
.repRow {
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.eclRow small,
.repRow small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.eclRow:hover,
.repRow:hover {
  background: rgba(127, 180, 255, 0.14);
}
.tabs.wrap {
  flex-wrap: wrap;
}
.tabs.wrap button {
  font-size: 12px;
  padding: 4px 8px;
}
#info img.eht {
  width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}
#tourPanel {
  position: fixed;
  left: 12px;
  top: 64px;
  width: 380px;
  max-height: calc(100% - 140px);
  overflow: auto;
  padding: 14px;
  z-index: 6;
}
#tourCap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: min(760px, calc(100% - 24px));
  padding: 10px 14px;
  z-index: 6;
}
#tourCap[hidden] {
  display: none;
}
#tcText {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.5;
}
#tcExtra {
  margin-top: 8px;
}
#tcBar {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
#replayCap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: min(720px, calc(100% - 24px));
  padding: 10px 14px;
  z-index: 6;
}
#replayCap[hidden] {
  display: none;
}
.rcHead {
  display: flex;
  gap: 10px;
  align-items: center;
}
.rcHead b {
  font-size: 14px;
}
.rcBtns {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.rcBtns button {
  padding: 3px 9px;
}
.rcProg {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 6px 0;
}
.rcProg i {
  display: block;
  height: 100%;
  background: var(--warm);
  border-radius: 2px;
}
#rcText {
  margin: 4px 0 0;
  font-size: 14px;
}
#rcNote {
  margin: 4px 0 0;
}
#neoPanel {
  position: fixed;
  left: 12px;
  top: 64px;
  bottom: 70px;
  width: 380px;
  overflow: auto;
  padding: 14px;
  z-index: 5;
}
.neoRow {
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.neoRow small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.neoRow:hover {
  background: rgba(127, 180, 255, 0.14);
}
.neoRow.inside b {
  color: #ff8a7a;
}
#dsnPanel h3 {
  margin-top: 10px;
}
.dsnRow {
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 13px;
}
.dsnRow small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.dsnRow.go {
  cursor: pointer;
}
.dsnRow.go:hover {
  background: rgba(127, 180, 255, 0.14);
}
#viewer {
  position: fixed;
  inset: 0;
  z-index: 11;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
}
#viewer[hidden] {
  display: none;
}
#viewer header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
}
#viewer header h2 {
  margin: 0;
  font-size: 17px;
  flex: 1;
}
#viewer header h2 small {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  margin-left: 8px;
}
#viewer header .close {
  position: static;
}
#vStage {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#vImg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
#vFrame {
  width: min(100%, 177vh);
  aspect-ratio: 16/9;
  max-height: 100%;
  border: 0;
}
#vStatus {
  position: absolute;
  color: var(--muted);
}
#vNav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  padding: 14px 12px;
  background: rgba(0, 0, 0, 0.5);
}
#vNav button:first-child {
  left: 12px;
}
#vNav button:last-child {
  right: 12px;
}
#viewer footer {
  padding: 10px 16px 14px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
#vCaption {
  flex: 1;
  min-width: 260px;
  font-size: 13.5px;
}
#vCaption a {
  color: var(--accent);
}
#viewer .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.globeBtn {
  margin-top: 8px;
}
#perf {
  position: fixed;
  left: 12px;
  bottom: 16px;
  width: 380px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font:
    11.5px/1.45 ui-monospace,
    Consolas,
    monospace;
  pointer-events: none;
}
#perf[hidden] {
  display: none;
}
#perf .head {
  font-size: 13px;
  margin-bottom: 2px;
}
#perf .ok {
  color: #7dff9a;
}
#perf .warn {
  color: #ffd36b;
}
#perf .bad {
  color: #ff7a6b;
}
#perf .gpu,
#perf .foot {
  color: var(--muted);
  margin-bottom: 4px;
}
#perf .foot {
  margin: 4px 0 0;
}
#perf .r {
  display: grid;
  grid-template-columns: 110px 1fr 64px;
  gap: 6px;
  align-items: center;
}
#perf .r i {
  display: block;
  height: 6px;
  background: var(--accent);
  border-radius: 3px;
}
#perf .r em {
  font-style: normal;
  text-align: right;
}
.lbl.link {
  color: #7fd8ff;
  font-weight: 600;
}
.lbl.link.dist {
  color: #ffcf7a;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 1px 6px;
}
#clock {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
  min-width: 150px;
  text-align: center;
}
#layers label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
  cursor: pointer;
}
#layers input[type='range'] {
  width: 100%;
}
#layers small {
  margin-left: auto;
}
#layers label select {
  margin-left: auto;
  padding: 2px 4px;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}
.chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  opacity: 0.45;
  border-color: var(--c);
}
.chip::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  margin-right: 5px;
}
.chip.on {
  opacity: 1;
}
.row {
  display: flex;
  gap: 6px;
  margin: 6px 0;
}

#labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.lbl {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-size: 12px;
  color: rgba(225, 232, 248, 0.85);
  text-shadow:
    0 0 4px #000,
    0 0 2px #000;
  pointer-events: auto;
  cursor: pointer;
  padding: 1px 4px;
  will-change: transform;
}
.lbl:hover {
  color: #fff;
}
.lbl.planet {
  color: #ffe2a8;
}
.lbl.moon {
  color: #d8cfb8;
  font-size: 11px;
}
.lbl.star {
  color: #cfe0ff;
}
.lbl.exo {
  color: #9ff0c4;
}
.lbl.deep {
  color: #f5b3ff;
}
.lbl.gal {
  color: #b8c8ff;
  font-size: 11px;
}
.lbl.psr {
  color: #d6a8ff;
  font-size: 11px;
}
.lbl.lss {
  color: #ffd38a;
  font-size: 13px;
  font-weight: 600;
}
.lbl.sb {
  color: #ffd59a;
  font-size: 11px;
}
.lbl.craft {
  color: #8fdcff;
  font-size: 11px;
}
.lbl.sel {
  color: #fff;
  font-weight: 600;
}
.lbl::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

#warp {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(90, 140, 255, 0.1) 70%, rgba(20, 30, 80, 0.35) 100%);
  transition: opacity 0.2s;
}

#scope {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #000;
}
#scopeExit {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  padding: 8px 14px;
  font-size: 14px;
  background: rgba(12, 16, 28, 0.88);
  border-color: rgba(127, 180, 255, 0.5);
}
#scopeExit:hover {
  background: rgba(40, 60, 100, 0.95);
}
#aladin {
  position: absolute;
  inset: 0;
}
#bands .band {
  margin-bottom: 8px;
}
#bands .band h3 {
  margin: 10px 0 4px;
  display: flex;
  justify-content: space-between;
}
#bands .band h3 span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
#bands button.switch {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  font-size: 13px;
}
#bands button {
  margin: 2px 2px 2px 0;
  padding: 4px 8px;
  font-size: 12px;
}
#overlayCtl select,
#overlayCtl input {
  width: 100%;
  margin-top: 4px;
}
#scopeCredit a,
#info .telSec a {
  color: var(--accent);
}
#info .telSec {
  margin-top: 18px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
#info .telSec .bands button {
  margin: 2px 2px 2px 0;
  padding: 4px 8px;
  font-size: 12px;
}

#help {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px));
  max-height: 80vh;
  overflow: auto;
  padding: 20px;
  z-index: 12;
}
#help td {
  padding: 3px 12px 3px 0;
  vertical-align: top;
}
#help td:first-child {
  color: var(--accent);
  white-space: nowrap;
}
#help ul {
  padding-left: 18px;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  z-index: 15;
  max-width: 80%;
}
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 30;
  font-size: 18px;
  letter-spacing: 0.05em;
  transition: opacity 0.6s;
}
#loading small {
  color: var(--muted);
  font-size: 12px;
}
#loading.done {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  #where {
    display: none;
  }
  #scopePanel {
    left: 12px;
    width: auto;
    top: auto;
    bottom: 12px;
    max-height: 45%;
  }
}

/* Painel da direita: controles globais da vista, em seções que abrem e fecham */
#ctl {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--ctl-w);
  background: #0a0e18;
  border-left: 1px solid var(--line);
  z-index: 8;
  display: flex;
}
#ctlMain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
#ctlHead {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--line);
}
#ctlHead .row {
  display: flex;
  gap: 6px;
  align-items: center;
}
#ctlHead .grow {
  flex: 1;
}
#ctlToggle {
  border: none;
  background: none;
  font-size: 18px;
  color: var(--muted);
  padding: 2px 8px;
}
#timebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
#timebar #clock {
  font-size: 13px;
  line-height: 1.25;
}
#timebar #clock small {
  color: var(--muted);
  font-size: 11px;
}
#timebar .tbtn {
  display: flex;
  gap: 3px;
}
#timebar .tbtn button {
  padding: 4px 7px;
}
#ctlScroll {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
}
#ctl .sec {
  border-bottom: 1px solid var(--line);
}
#ctl .secHead {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cdd6ea;
  cursor: pointer;
  user-select: none;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
}
#ctl .secHead:hover {
  background: rgba(127, 180, 255, 0.1);
}
#ctl .secHead .tw {
  color: var(--muted);
  font-size: 11px;
  transition: transform 0.12s;
  width: 10px;
}
#ctl .sec.open .secHead .tw {
  transform: rotate(90deg);
}
#ctl .secBody {
  display: none;
  padding: 4px 12px 14px;
}
#ctl .sec.open .secBody {
  display: block;
}
#ctl .secBody > h3:first-child {
  margin-top: 8px;
}
#ctl #skySel {
  width: 100%;
}
#ctl .row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
#ctlRail {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding-top: 10px;
}
#ctlRail button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  font-size: 16px;
}
#ctlRail button:hover {
  background: rgba(127, 180, 255, 0.16);
}
body.ctl-collapsed #ctlMain {
  display: none;
}
body.ctl-collapsed #ctlRail {
  display: flex;
}

/* transmissões na ficha */
#info .feedSec {
  margin-top: 18px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
#info .feedSec h3 small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
#info .feedSec details {
  margin: 4px 0;
}
#info .feedSec summary {
  cursor: pointer;
  padding: 5px 4px;
  font-size: 13px;
  color: #cdd6ea;
  border-radius: 6px;
}
#info .feedSec summary:hover {
  background: rgba(127, 180, 255, 0.1);
}
#info .feedRow {
  display: block;
  width: 100%;
  text-align: left;
  margin: 2px 0;
  border-color: transparent;
  background: none;
  white-space: normal;
}
#info .feedRow:hover {
  background: rgba(127, 180, 255, 0.14);
}
#info .feedRow small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
#info .skin {
  font-size: 12px;
  background: rgba(127, 180, 255, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
  margin: 6px 0;
}
#info .skin button {
  font-size: 11px;
  padding: 2px 6px;
  margin-left: 4px;
}
