/* Planet pages (/karte/<id>/), the planet directory (/karte/liste/) and the gate address table (/karte/adressen/).
   Built on glossar.css; the symbols come from glyphen.css (one class per symbol, written by the build). */

/* gate symbols: masks of /assets/glyphen/*.svg in the text colour, as on the map (karte.css) */
.glyph { display: block; width: 100%; height: 100%; background: currentColor;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.glyph-none { background: none; border: 1.5px dashed rgba(255, 138, 43, 0.45); border-radius: 50%; width: 60%; height: 60%; margin: auto; }
.addr-label { font: 600 10.5px/1 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--chevron); }
.addr-net { font: 500 12px/1.3 var(--f-body); color: var(--muted); }

/* an address: one chevron face per symbol, then the point of origin */
.chevrons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 48px); gap: 5px; margin: 0; padding: 0; list-style: none; }
.chev { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.chev-face, .gl-legend .chev-face { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 12%; border-radius: 9px; color: #ffe3c8;
  border: 1px solid rgba(255, 138, 43, 0.38); background: radial-gradient(circle at 50% 40%, rgba(255, 138, 43, 0.16), rgba(4, 6, 12, 0.6)); }
.chev-n { font: 600 11px/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.chev-poo .chev-face { border-style: dashed; color: #bfe9ff; border-color: rgba(86, 200, 255, 0.5);
  background: radial-gradient(circle at 50% 40%, rgba(86, 200, 255, 0.14), rgba(4, 6, 12, 0.6)); }
.chev-poo .chev-n { font-size: 9.5px; letter-spacing: 0.02em; }
.chev-poo .chev-n { overflow-wrap: normal; white-space: nowrap; }   /* one word: never break it, let it overflow its column centred */
.chev-gap .chev-face { border-style: dotted; border-color: rgba(255, 255, 255, 0.28); background: none; color: var(--dim); font: 600 18px/1 var(--f-mono); }

.addr-names { margin: 0; font: 500 13px/1.45 var(--f-body); color: var(--muted); }   /* "Taurus · Serpens Caput · …" */

/* planet page: the address box under the card */
.p-addr { display: grid; gap: 10px; }
.p-addr h2 { font-size: 20px; }
.p-addr-row { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 138, 43, 0.32);
  background: linear-gradient(135deg, rgba(255, 138, 43, 0.1), rgba(255, 138, 43, 0.03)); }
.p-addr-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.p-act { font-size: 14px; }
.p-partial { color: var(--dim); font-size: 13px; }
/* a note on the address (disputed variants, where it comes from) or on the facts (korrekturen.json "hinweise") */
.p-addr-note, .p-fact-note { margin: 0; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--line-strong);
  font-size: 14px; line-height: 1.55; color: var(--muted); }
.p-fact-note { margin-top: 14px; }
.p-note-k { font: 600 11px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-right: 4px; }
.p-poo { grid-template-columns: 40px minmax(0, 1fr); align-items: center; column-gap: 14px; }
.p-poo-g { display: block; width: 40px; height: 40px; color: #ffe3c8; }
.p-est { color: var(--dim); cursor: help; }
/* what tells planets of the same name apart (galaxy or wiki title), in the title, the pager, the list and the table */
.pl-note { color: var(--dim); font-weight: 500; }
.f-h1 .p-note { font: 500 0.42em/1.3 var(--f-body); color: var(--dim); }
.p-map { margin: 0; }

/* /karte/liste/: compact rows instead of cards (the entries keep .g-entry for the filter in glossar.js) */
.pl-n-h { font: 600 14px/1 var(--f-mono); color: var(--dim); margin-left: 6px; }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 2px 18px; }
.pl-list .g-entry { display: block; padding: 6px 8px; border-radius: 8px; border-color: transparent; background: none; line-height: 1.4; overflow-wrap: anywhere; }
.pl-list .g-entry:hover { border-color: var(--line); }
.pl-n { color: var(--text); font-weight: 600; text-decoration: none; }
.pl-n:hover { color: var(--horizon); }
.pl-alt { color: var(--horizon); font: 500 12.5px/1.4 var(--f-mono); }
.pl-meta { display: block; font: 500 11.5px/1.4 var(--f-mono); color: var(--dim); }
.pl-tag { display: inline-block; margin-top: 2px; font: 600 10px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--chevron);
  padding: 3px 6px; border: 1px solid rgba(255, 138, 43, 0.35); border-radius: 6px; }
.pl-i[hidden], .g-sec[hidden] { display: none; }

/* /karte/adressen/: one table per gate network; on phones every row becomes a small card */
.ad-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ad-table th, .ad-table td { text-align: left; vertical-align: middle; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.ad-table thead th { font: 600 10.5px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ad-table tbody th { font-weight: 600; }
/* the rows carry .g-entry for the filter (glossar.js): a table row again, not one of its cards */
.ad-table tr.g-entry { display: table-row; padding: 0; border: 0; border-radius: 0; background: none; }
.ad-table tbody th a { color: var(--text); }
.ad-table .pl-alt { display: block; }
.ad-chev { grid-auto-columns: minmax(0, 34px); gap: 3px; }
.ad-chev .chev-face { border-radius: 7px; }
.ad-chev .chev-n { font-size: 10px; }
.ad-chev .chev-poo .chev-n { font-size: 8.5px; }
@media (min-width: 901px) { .ad-chev { grid-auto-columns: 34px; } }   /* table layout otherwise squeezes the tracks to ~20px */
@media (max-width: 400px) { .chev-poo .chev-n { font-size: 8px; letter-spacing: 0; } }   /* keeps "Atlantis" inside the address box */
.ad-table .ep-nr { padding: 2px 6px; margin-right: 4px; }
.ad-links { white-space: nowrap; }
.ad-links .p-partial { white-space: normal; }
.ad-none { color: var(--dim); }
.gl-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 12px 8px; }
.gl-legend li { display: grid; justify-items: center; align-content: start; gap: 4px; }
.gl-name { font: 500 11px/1.25 var(--f-body); color: var(--muted); text-align: center; overflow-wrap: anywhere; hyphens: auto; }
.gl-legend .chev-face { width: 48px; }
/* screen only: a printed page is narrower than 900px too, and the cards would take ~3 times the pages */
@media screen and (max-width: 900px) {
  .ad-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ad-table, .ad-table tbody, .ad-table tr, .ad-table th, .ad-table td { display: block; }
  .ad-table tr.g-entry { display: block; padding: 12px 16px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r);
    background: linear-gradient(160deg, var(--hull), rgba(10, 16, 32, 0.4)); }
  /* ~100 cards with ~5,000 masked symbols: on the first load only the cards near the screen (the guess is about the
     median card), then freigabe.js releases them in chunks, as on the lexicon lists (glossar.css) */
  .ad-table tr.g-entry { content-visibility: auto; contain-intrinsic-size: auto 290px; }
  .ad-table tr.g-entry.cv-frei { content-visibility: visible; }
  html:has(.ad-table tr.g-entry) { scroll-behavior: auto; }
  .ad-table th, .ad-table td { border: 0; padding: 3px 0; }
  .ad-table td::before { content: attr(data-label); display: block; font: 600 10px/1.6 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
  .ad-table tbody th { font-size: 16px; }
  .ad-links { white-space: normal; }
}

@media print {
  .p-map, .p-act { display: none !important; }
  .chev-face { border: 1px solid #999 !important; }
  .glyph { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }   /* the symbol is a background: keep it on paper */
  .ad-chev { grid-auto-columns: 26px; }
  .chev-poo .chev-n, .ad-chev .chev-n { overflow-wrap: normal; white-space: nowrap; }
}

@media (forced-colors: active) {
  .glyph { forced-color-adjust: none; background: CanvasText; }   /* the mask is drawn with the background: keep it in the system text colour */
  .glyph-none { background: none; border-color: CanvasText; }
}
