/* Netz-Ansicht: großes, leuchtendes Netz auf Schwarz */
.page-net { overflow: hidden; }
#graph { position: fixed; inset: 0; }
#graph canvas { display: block; }

.net-tools {
  position: fixed; top: calc(var(--head-h) + 6px); left: 16px; z-index: 20;
  width: 320px; max-height: calc(100vh - var(--head-h) - 90px); overflow: auto;
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.net-tools .row { display: flex; gap: 8px; }
.net-tools .row .select { flex: 1; min-width: 0; padding: 6px 10px; font-size: 13px; }
.search { position: relative; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0 12px; }
.search:focus-within { border-color: var(--mint); }
.search svg { color: var(--text-3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 9px 0; outline: none; }
#q-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); max-height: 50vh; overflow: auto;
}
#q-results li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
#q-results li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#q-results li small { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
#q-results li[aria-selected="true"], #q-results li:hover { background: var(--bg-3); }

.legend { display: flex; flex-direction: column; gap: 2px; }
.legend button {
  --c: #fff; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0; padding: 5px 8px; border-radius: 8px; color: var(--text); font-size: 13.5px;
}
.legend button:hover { background: var(--bg-2); }
.legend button .n { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.legend button[aria-pressed="false"] { color: var(--text-3); }
.legend button[aria-pressed="false"] .dot { background: transparent; box-shadow: none; border: 1.5px solid var(--c); }
.legend .lg-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 8px 4px; }
.legend .lg-head button { width: auto; padding: 2px 6px; font-size: 11.5px; color: var(--text-3); }

.time-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.time output { font: 600 14px/1 var(--font-display); letter-spacing: .06em; color: var(--mint); }
.time input[type=range] { width: 100%; accent-color: var(--mint); }
.time .ticks { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); padding: 0 2px; }

.net-stats { position: fixed; left: 18px; bottom: 14px; z-index: 10; font-size: 12px; color: var(--text-3); letter-spacing: .02em; pointer-events: none; }
.net-stats b { color: var(--text-2); font-weight: 600; }
.net-hint { position: fixed; left: 18px; bottom: 32px; z-index: 10; font-size: 12px; color: var(--text-3); pointer-events: none; text-align: center; }
.net-zoom { position: fixed; right: 16px; bottom: 16px; z-index: 15; display: flex; flex-direction: column; gap: 6px; }
.net-zoom .btn { background: rgba(20, 20, 24, .85); font-size: 16px; }
body.card-open .net-zoom { right: 456px; }

.tip {
  position: fixed; z-index: 40; pointer-events: none; padding: 6px 10px; border-radius: 8px; font-size: 12.5px;
  background: rgba(10, 10, 12, .92); border: 1px solid var(--line-2); max-width: 280px; box-shadow: var(--shadow);
}
.tip small { display: block; color: var(--text-3); font-size: 11px; }

/* ---------- Steckbrief ---------- */
.card {
  position: fixed; z-index: 30; top: calc(var(--head-h) + 6px); right: 16px; bottom: 16px; width: 424px;
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(8, 8, 10, .94); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: card-in .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes card-in { from { transform: translateX(40px); opacity: 0; } }
.card .close { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .2); }
.card .body { overflow: auto; padding: 18px 20px 22px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.card .stage { position: relative; aspect-ratio: 16 / 9; background: #000; flex: none; overflow: hidden; }
.card .stage .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.card .stage .slide.on { opacity: 1; }
.card .stage .slide.ken { animation: ken 9s ease-out both; }
@keyframes ken { from { transform: scale(1.0); } to { transform: scale(1.08); } }
.card .stage .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; font-size: 12px; color: #ddd; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.card .stage .cap small { color: #999; margin-left: 6px; }
.card .stage .dots { position: absolute; top: 12px; left: 14px; display: flex; gap: 4px; }
.card .stage .dots i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; position: relative; }
.card .stage .dots i.on::after { content: ''; position: absolute; inset: 0; background: #fff; animation: prog var(--d, 5s) linear forwards; transform-origin: left; }
@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.card .stage .pp { position: absolute; right: 12px; bottom: 10px; z-index: 2; }
.card .stage canvas.art { position: absolute; inset: 0; width: 100%; height: 100%; }
.card .type { margin-bottom: 8px; }
.card h2 { font: 600 26px/1.15 var(--font-display); margin: 0 0 6px; letter-spacing: .01em; }
.card .meta { color: var(--text-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; }
.card .meta .vis { color: var(--warn); }
.card p.sum { margin: 0 0 14px; color: #e8e8ee; white-space: pre-line; }
.card details { margin: 0 0 14px; }
.card details summary { cursor: pointer; color: var(--mint); font-size: 13px; }
.card details p { white-space: pre-line; color: var(--text-2); font-size: 14px; }
.card h3 { font: 500 11px/1.2 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.card .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.card .kpi { background: var(--bg-2); border-radius: 10px; padding: 8px 10px; }
.card .kpi b { display: block; font: 600 20px/1.1 var(--font-display); color: var(--text); }
.card .kpi span { font-size: 11px; color: var(--text-3); }
.card ul.ach { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
.card ul.ach li { margin-bottom: 4px; }
.card .goals { display: flex; flex-direction: column; gap: 8px; }
.card .goal { border-left: 3px solid var(--mint); padding: 2px 0 2px 10px; font-size: 13.5px; }
.card .goal small { display: block; color: var(--text-3); }
.card .links { display: flex; flex-direction: column; gap: 12px; }
.card .lgroup .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.card .lgroup .gl { font-size: 11.5px; color: var(--text-3); margin-bottom: 5px; }
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

@media (max-width: 820px) {
  .net-tools { width: auto; right: 12px; left: 12px; max-height: 46px; overflow: hidden; padding: 0; background: transparent; border: 0; backdrop-filter: none; }
  .net-tools.open { max-height: 70vh; overflow: auto; padding: 12px; background: rgba(11, 11, 14, .95); border: 1px solid var(--line); }
  .net-tools .row, .net-tools .legend, .net-tools .time { display: none; }
  .net-tools.open .row, .net-tools.open .legend, .net-tools.open .time { display: flex; }
  .net-tools.open .legend, .net-tools.open .time { flex-direction: column; }
  .card { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 72vh; border-radius: 18px 18px 0 0; }
  body.card-open .net-zoom { display: none; }
  .net-hint { display: none; }
}

/* ---------- Revision 1 ---------- */
.legend .lg-head { gap: 8px; }
.legend .lg-head span:last-child { display: inline-flex; gap: 2px; }
.legend .lg-head button { display: inline; width: auto; padding: 2px 6px; font-size: 12px; color: var(--text-2); border-radius: 6px; }
.legend .lg-head button:hover { color: var(--text); }
.time .ticks { font-size: 11.5px; color: #9a9aa6; }
#btn-tour { min-width: 112px; justify-content: center; }
#btn-tour[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: #fff; }
.tools-toggle { display: none; flex: none; margin-right: -6px; }
@media (max-width: 820px) {
  .tools-toggle { display: inline-flex; }
  .net-tools { max-height: 48px; background: rgba(11, 11, 14, .92); border: 1px solid var(--line); padding: 0; }
  .net-tools .search { border: 0; background: transparent; }
  .net-tools.open { max-height: min(72vh, 560px); padding: 10px; }
  .net-tools.open .search { border: 1px solid var(--line); background: var(--bg); }
  .net-stats { right: 70px; font-size: 11px; line-height: 1.4; }
}
