/* The sector map page: the map fills the window under the site's header. */
body.map-page { height: 100vh; min-height: 0; overflow: hidden; }
body.map-page main { flex: 1; min-height: 0; display: flex; }
body.map-page .bottom { display: none; }
#app { display: grid; grid-template-columns: 1fr 320px; width: 100%; min-height: 0; font-size: 14px; line-height: 1.45; }
#view { position: relative; overflow: hidden; min-height: 0; }
#view canvas { display: block; }
#app aside { background: var(--panel); border-left: 1px solid var(--line); padding: 16px; overflow-y: auto; }
#app h1 { font-size: 1.5rem; margin: 0 0 2px; font-weight: 600; }
#app h2 { font: 600 0.95rem/1.2 var(--head); margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
#app .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
#app button { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 6px;
  padding: 6px 10px; font: 500 0.85rem/1.2 var(--body); cursor: pointer; }
#app button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.legend { display: grid; grid-template-columns: 14px 1fr; gap: 6px 8px; align-items: center; }
.swatch { width: 14px; height: 14px; border-radius: 3px; }
#details { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-height: 64px; }
#details .id { font-size: 20px; font-weight: 600; }
#details dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 0; }
#details dt { color: var(--muted); }
#details dd { margin: 0; }
#details p { margin: 8px 0 0; }
#tip { position: absolute; pointer-events: none; background: rgba(16, 21, 31, 0.94); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 8px; font-size: 13px; display: none; white-space: nowrap; z-index: 2; }
.label { color: var(--muted); font-size: 12px; font-weight: 600; }
.label.planet { color: #ffd59a; font-weight: 500; }
#status { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--muted); }
#error { position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 24px; }
.panel { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.stack { display: grid; gap: 8px; }
.stack .row { margin-top: 0 !important; }
#editor { margin-top: 10px; }
#app .field { font-size: 12px; }
#app select { padding: 6px 8px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
#editMessage { white-space: pre-wrap; font-size: 13px; }
@media (max-width: 800px) {
  body.map-page { height: auto; overflow: auto; }
  #app { grid-template-columns: 1fr; grid-template-rows: 62vh auto; }
  #app aside { border-left: 0; border-top: 1px solid var(--line); }
}
