/* Palime Knowledge Map — structured temporal swimlane UI */
.km-root { position: relative; width: 100%; height: calc(100vh - 60px); min-height: 600px;
  background: radial-gradient(ellipse at 50% 30%, #0c1018 0%, #06070c 100%); overflow: hidden; color: #cdd5e0; }
.km-scene { position: absolute; inset: 0; }
.km-svg { width: 100%; height: 100%; display: block; }

.km-era-label { fill: #aeb9c9; font: 600 14px Inter, Arial, sans-serif; }
.km-era-sub { fill: #5a6577; font: 11px Inter, Arial, sans-serif; }
.km-lane-label { fill: #8b97a8; font: 600 14px Inter, Arial, sans-serif; }
.km-node-label { fill: #e7edf4; font: 12px Inter, Arial, sans-serif; pointer-events: none; }
.km-node { transition: opacity .2s; }
.km-node.km-sel rect { stroke-width: 2.4; filter: drop-shadow(0 0 6px currentColor); }
.km-edges path { transition: opacity .2s; }
.km-dim-y { fill: #6b7686; }

/* top bar */
.km-top { position: absolute; top: 12px; left: 16px; right: 16px; height: 40px; display: flex;
  align-items: center; gap: 14px; z-index: 5; pointer-events: none; }
.km-top > * { pointer-events: auto; }
.km-title { display: flex; flex-direction: column; line-height: 1.1; }
.km-title b { font-size: 15px; color: #eef2f7; }
.km-title span { font-size: 11px; color: #6b7686; }
.km-cambtns { display: flex; gap: 6px; margin-left: 10px; }
.km-btn { background: rgba(20,26,38,.8); border: 1px solid #2a3342; color: #b8c2d0;
  padding: 6px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.km-btn:hover { border-color: #3d6ea5; }
.km-btn.active { background: #1f2c44; border-color: #4f86c6; color: #fff; }
.km-search { margin-left: auto; width: 240px; background: rgba(20,26,38,.85); border: 1px solid #2a3342;
  color: #cdd5e0; padding: 7px 12px; border-radius: 8px; font-size: 13px; }

/* right card */
.km-card { position: absolute; top: 64px; right: 16px; width: 268px; max-height: calc(100% - 150px);
  overflow: auto; background: rgba(12,16,24,.96); border: 1px solid #28303f; border-radius: 12px;
  padding: 16px; z-index: 6; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.km-card-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: #6b7686;
  font-size: 20px; cursor: pointer; line-height: 1; }
.km-card-name { font-size: 18px; font-weight: 700; color: #f1f4f8; padding-right: 18px; }
.km-card-meta { font-size: 12px; color: #8b97a8; margin-top: 2px; }
.km-card-year { font-size: 12px; color: #aeb9c9; margin-top: 4px; }
.km-card-tags { margin-top: 8px; }
.km-tagchip { display: inline-block; background: #1a2436; border: 1px solid #2c3a52; color: #9fc0e8;
  font-size: 11px; padding: 2px 8px; border-radius: 10px; margin: 2px 3px 0 0; }
.km-card-sec { margin-top: 14px; }
.km-card-sec-t { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #5f6b7c; margin-bottom: 5px; }
.km-card-rel { display: block; color: #cdd5e0; text-decoration: none; font-size: 13px; padding: 4px 8px;
  border-radius: 6px; background: rgba(255,255,255,.025); margin-bottom: 4px; }
.km-card-rel:hover { background: rgba(79,134,198,.18); }
.km-card-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.km-card-path { background: #c0392b; border: none; color: #fff; padding: 9px; border-radius: 8px; font-size: 13px; cursor: pointer; font-weight: 600; }
.km-card-open { text-align: center; background: rgba(255,255,255,.05); border: 1px solid #2a3342; color: #cdd5e0;
  padding: 9px; border-radius: 8px; font-size: 13px; text-decoration: none; }

/* timeline */
.km-timeline { position: absolute; bottom: 34px; left: 16px; right: 300px; height: 36px; z-index: 5;
  background: rgba(12,16,24,.7); border: 1px solid #222a38; border-radius: 8px; }
.km-tl-track { position: relative; height: 100%; }
.km-tl-tick { position: absolute; top: 10px; transform: translateX(-50%); font-size: 11px; color: #6b7686; }

/* legend */
.km-legend { position: absolute; bottom: 8px; left: 16px; right: 16px; font-size: 11px; color: #5f6b7c; z-index: 5; }


/* 3D windowed navigator */
.km-canvas { position: absolute; inset: 0; display: block; }
.km3d-hud { position: absolute; top: 14px; left: 0; right: 0; text-align: center; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 8px; pointer-events: none; }
.km3d-hud > * { pointer-events: auto; }
.km3d-nav { background: rgba(12,16,24,.85); border: 1px solid #28303f; color: #b8c2d0; width: 30px; height: 30px;
  border-radius: 50%; font-size: 17px; cursor: pointer; line-height: 1; }
.km3d-nav:hover { border-color: #4f86c6; color: #fff; }
.km3d-hint { position: absolute; bottom: 78px; left: 0; right: 0; text-align: center; font-size: 11px; color: #5a6577; z-index: 5; }
.km3d-winlabel { display: inline-block; background: rgba(12,16,24,.8); border: 1px solid #28303f;
  border-radius: 20px; padding: 6px 18px; font-size: 13px; color: #aeb9c9; }
.km3d-scrub { position: absolute; bottom: 18px; left: 24px; right: 24px; height: 52px; z-index: 5;
  background: rgba(10,14,22,.82); border: 1px solid #222a38; border-radius: 10px; cursor: pointer; }
.km3d-scrub-bars { position: absolute; inset: 0 0 18px 0; }
.km3d-scrub-bars i { position: absolute; bottom: 0; width: 3px; background: linear-gradient(#5a7fb0,#2c3e5a);
  transform: translateX(-50%); border-radius: 2px; }
.km3d-scrub-axis { position: absolute; bottom: 2px; left: 0; right: 0; height: 14px; }
.km3d-scrub-axis span { position: absolute; transform: translateX(-50%); font-size: 10px; color: #6b7686; }
.km3d-scrub-win { position: absolute; top: 0; bottom: 16px; background: rgba(79,134,198,.16);
  border-left: 1px solid rgba(120,170,230,.5); border-right: 1px solid rgba(120,170,230,.5); pointer-events: none; }
.km3d-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #e8554e; transform: translateX(-50%);
  box-shadow: 0 0 8px #e8554e; }
