/* iKaru web edition (folder ikage-web). Scoped under .ikage so that it can sit inside the Inkoation website's pages.
   Colours are the native app's look palettes (look.js PALETTES), set as custom properties through the
   CSSOM by app.js: the site's Content Security Policy forbids inline style attributes. */

.ikage {
  --ik-font: var(--font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  --ik-radius: 22px;
  --ik-gutter: 12px;
  /* Museum defaults until app.js sets the palette (same values as look.js PALETTES.museum). */
  --ik-text: rgb(27 27 29);
  --ik-secondary: rgb(51 49 47);
  --ik-panel: rgb(247 245 242 / 0.8);
  --ik-museum-inner: rgb(207 204 200);
  --ik-museum-outer: rgb(163 160 156);
  --ik-macro-inner: rgb(41 46 56);
  --ik-macro-outer: rgb(9 10 13);
  position: relative;
  /* The layout rules below follow the app's own size, not the window's: in a website page the app is
     narrower and shorter than the window (container queries; app.js SHEET_BELOW is the same 760 px). */
  container: ikage / size;
  height: var(--ik-height, 100svh);
  min-height: 480px;
  overflow: hidden;
  font-family: var(--ik-font);
  font-size: 15px;
  line-height: 1.35;
  color: var(--ik-text);
  background: var(--ik-museum-outer);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.ikage *, .ikage *::before, .ikage *::after { box-sizing: border-box; }
.ikage [hidden] { display: none !important; }

.ik-stage { position: absolute; inset: 0; overflow: hidden; }

/* Backdrop: the museum's light warm-grey radial gradient, the macro's dark studio cross-faded over it. */
.ik-backdrop { position: absolute; inset: 0; }
.ik-backdrop-museum { background: radial-gradient(ellipse 115% 85% at 50% 42%, var(--ik-museum-inner) 0%, var(--ik-museum-outer) 100%); }
.ik-backdrop-macro {
  background: radial-gradient(ellipse 115% 85% at 50% 42%, var(--ik-macro-inner) 0%, var(--ik-macro-outer) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ik-backdrop-macro.ik-on { opacity: 1; }

.ik-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none; user-select: none; -webkit-user-select: none;
  outline: none; cursor: grab;
}
.ik-canvas:active { cursor: grabbing; }
.ik-canvas:focus-visible { outline: 2px solid var(--ik-accent); outline-offset: -3px; }

/* Leader labels */
.ik-overlay { position: absolute; inset: 0; pointer-events: none; }
.ik-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ik-leader-halo { stroke: var(--ik-leader-halo); stroke-width: 2.4; stroke-linecap: round; }
.ik-leader-line { stroke: var(--ik-leader); stroke-width: 1; stroke-linecap: round; }
.ik-dot-halo { fill: var(--ik-leader-halo); }
.ik-dot { fill: var(--ik-leader); }
.ik-leader.ik-selected .ik-leader-line { stroke: var(--ik-selection); }
.ik-leader.ik-selected .ik-dot { fill: var(--ik-selection); }
.ik-labels { position: absolute; inset: 0; }
.ik-pill {
  position: absolute; left: 0; top: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--ik-panel);
  box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--ik-leader) 22%, transparent);
  font: 600 12px/15px var(--ik-font);
  color: var(--ik-text);
  text-align: center;
  white-space: nowrap;
  will-change: transform;
}
.ik-pill.ik-selected { color: var(--ik-selection); box-shadow: inset 0 0 0 1px var(--ik-selection); }
.ik-leader, .ik-pill { opacity: 1; transition: opacity 0.24s ease-out 0.06s; }
.ik-leader.ik-enter, .ik-pill.ik-enter { opacity: 0; transition: none; }
.ik-leader.ik-leave, .ik-pill.ik-leave { opacity: 0; transition: opacity 0.12s ease-in; }

/* Header */
.ik-scrim {
  position: absolute; left: 0; right: 0; top: 0;
  height: calc(var(--ik-header-h, 96px) + 28px);
  background: linear-gradient(to bottom, var(--ik-scrim) 0%, var(--ik-scrim) 60%, var(--ik-scrim-clear) 100%);
  pointer-events: none;
}
.ik-header {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 12px 16px 6px;
  display: grid; gap: 4px;
  pointer-events: none;
}
.ik-header > * { pointer-events: auto; }
.ik-header-top { display: flex; align-items: center; gap: 10px; }
.ik-brand { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
.ik-name { font-weight: 800; font-size: 17px; letter-spacing: 0.01em; }
.ik-tools { display: flex; align-items: center; gap: 8px; }
.ik-lens {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 6px 0 12px;
  border-radius: 999px; background: var(--ik-panel);
  font-size: 13px; font-weight: 600;
}
.ik-lens-caption { color: var(--ik-secondary); }
.ik-lens-select {
  appearance: none; -webkit-appearance: none;
  border: 0; border-radius: 999px;
  padding: 6px 26px 6px 10px;
  font: inherit; color: var(--ik-text);
  background: var(--ik-toggle-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23777' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 9px center / 10px 7px;
  cursor: pointer;
}
.ik-lens-select:focus-visible, .ik-round:focus-visible, .ik-toggle:focus-visible, .ik-card-close:focus-visible, .ik-slider:focus-visible {
  outline: 2px solid var(--ik-accent); outline-offset: 2px;
}
.ik-round {
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--ik-panel); color: var(--ik-text);
  cursor: pointer;
}
.ik-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ik-mode { margin: 2px 0 0; font-size: 20px; font-weight: 700; line-height: 1.15; }
.ik-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ik-being { font-size: 12px; font-weight: 500; color: var(--ik-secondary); }
.ik-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
  color: var(--ik-warning); background: var(--ik-warning-fill);
  box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--ik-warning) 45%, transparent);
}

/* Control strip */
.ik-strip {
  position: absolute;
  left: var(--ik-gutter); right: var(--ik-gutter); bottom: max(var(--ik-gutter), env(safe-area-inset-bottom));
  margin: 0 auto; max-width: 560px;
  padding: 12px 14px 10px;
  border-radius: var(--ik-radius);
  background: var(--ik-panel);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  display: grid; gap: 8px;
}
.ik-explode-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ik-explode-label { font-size: 14px; font-weight: 700; }
.ik-stage-caption { font-size: 12px; color: var(--ik-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ik-slider { width: 100%; margin: 0; accent-color: var(--ik-accent); height: 28px; cursor: pointer; }
.ik-toggles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ik-toggle {
  display: grid; justify-items: center; gap: 3px;
  min-height: 52px; padding: 7px 4px;
  border: 0; border-radius: 14px;
  background: var(--ik-toggle-fill); color: var(--ik-text);
  font: 600 12px/1.2 var(--ik-font);
  cursor: pointer;
}
.ik-toggle.ik-on { background: var(--ik-accent); color: var(--ik-on-accent); }
.ik-toggle-caption { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ik-note { margin: 0; font-size: 12px; color: var(--ik-secondary); }
.ik-hint { margin: 0; font-size: 11.5px; line-height: 1.35; color: var(--ik-secondary); }

/* Part card: a bottom sheet on narrow views, a side panel on wide ones. */
.ik-card {
  position: absolute; z-index: 3;
  right: 16px; top: calc(var(--ik-header-h, 96px) + 8px); bottom: 16px;
  width: min(400px, 42%);
  border-radius: 18px;
  background: var(--ik-card); color: var(--ik-text);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.22);
  overflow: hidden;
}
.ik-sheet .ik-card {
  left: 0; right: 0; top: auto; bottom: 0;
  width: auto; height: 52%;
  border-radius: 18px 18px 0 0;
}
.ik-card.ik-open { animation: ik-card-in 0.28s ease-out; }
.ik-sheet .ik-card.ik-open { animation-name: ik-sheet-in; }
@keyframes ik-card-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ik-sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.ik-card-body {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 18px 24px;
  display: grid; gap: 12px; align-content: start;
}
.ik-card-head { display: flex; align-items: flex-start; gap: 12px; }
.ik-card-title { flex: 1 1 auto; margin: 0; font-size: 19px; font-weight: 700; line-height: 1.2; }
.ik-card-close {
  flex: none; min-height: 34px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: var(--ik-card-section); color: var(--ik-text);
  font: 600 14px var(--ik-font); cursor: pointer;
}
.ik-card-sub { margin: -4px 0 0; font-size: 14px; color: var(--ik-secondary); }
.ik-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ik-card-section { padding: 14px; border-radius: 14px; background: var(--ik-card-section); display: grid; gap: 10px; }
.ik-card-heading { margin: 0; font-size: 14px; font-weight: 700; color: var(--ik-secondary); }
.ik-rule { width: 100%; height: 1px; margin: 2px 0; border: 0; background: color-mix(in srgb, var(--ik-text) 12%, transparent); }
.ik-fact-group { display: grid; gap: 8px; }
.ik-fact-quantity { font-size: 14px; font-weight: 700; }
.ik-fact { display: grid; gap: 4px; }
.ik-fact-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ik-fact-name { font-size: 13px; color: var(--ik-secondary); }
.ik-fact-drawn .ik-fact-name { color: var(--ik-text); }
.ik-fact-value { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ik-fact-drawn .ik-fact-value { font-weight: 800; }
.ik-bar { height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--ik-text) 7%, transparent); overflow: hidden; }
.ik-bar-fill { height: 100%; border-radius: 999px; background: var(--ik-fact-bar); }
.ik-bar-drawn { background: var(--ik-accent); }
.ik-tag {
  justify-self: start;
  padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: var(--ik-on-accent); background: var(--ik-accent);
}
.ik-fact-source { font-size: 11px; color: var(--ik-secondary); }
.ik-row { display: grid; gap: 2px; }
.ik-row-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ik-row-name { flex: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ik-row-value { font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.ik-flagged { color: var(--ik-warning); }
.ik-row-detail { font-size: 12px; color: var(--ik-secondary); }
.ik-sources { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; }
.ik-source-id { font: 600 12px ui-monospace, "SF Mono", Menlo, monospace; }
.ik-source-text { margin: 0; font-size: 12px; color: var(--ik-secondary); overflow-wrap: anywhere; }

/* Loading and errors */
.ik-status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-width: min(420px, 86%);
  padding: 10px 16px; border-radius: 14px;
  background: var(--ik-panel); color: var(--ik-text);
  font-size: 14px; text-align: center;
}
.ik-failed .ik-status { color: var(--ik-warning); }
.ik-loading .ik-strip, .ik-loading .ik-overlay, .ik-failed .ik-strip { visibility: hidden; }

/* Wide views */
@container ikage (min-width: 760px) {
  .ik-header { padding: 18px 24px 8px; }
  .ik-mode, .ik-meta { max-width: 760px; }
  .ik-mode { font-size: 24px; }
  .ik-strip { bottom: 18px; padding: 14px 16px 12px; }
}

/* A side card on a view too narrow for both: the strip keeps to the free area on its left. */
@container ikage (min-width: 760px) and (max-width: 1400px) {
  .ik-has-card:not(.ik-sheet) .ik-strip { margin: 0; left: 24px; right: calc(min(400px, 42%) + 40px); max-width: 560px; }
}

/* Short landscape phones: the slider and the toggles on one row. */
@container ikage (max-height: 520px) and (orientation: landscape) {
  .ik-strip { max-width: 720px; grid-template-columns: 1fr 1fr; align-items: center; }
  .ik-strip .ik-note, .ik-strip .ik-hint { grid-column: 1 / -1; }
  .ik-toggle { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .ik-backdrop-macro { transition: none; }
  .ik-card.ik-open, .ik-sheet .ik-card.ik-open { animation: none; }
}

/* W1: the life phase switch, the way back to the charger, a model's badges and callout. */
.ik-phase { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ik-phase-caption { font-size: 12px; font-weight: 600; color: var(--ik-secondary); }
.ik-segments {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 999px;
  background: var(--ik-toggle-fill);
}
.ik-segment {
  min-height: 32px; padding: 5px 16px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ik-text);
  font: 600 13px/1.2 var(--ik-font);
  white-space: nowrap;
  cursor: pointer;
}
.ik-segment.ik-on { background: var(--ik-accent); color: var(--ik-on-accent); }
.ik-segment:focus-visible, .ik-host:focus-visible { outline: 2px solid var(--ik-accent); outline-offset: 2px; }
.ik-host {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  justify-self: start;
  min-height: 38px; padding: 6px 16px 6px 12px;
  border: 0; border-radius: 999px;
  background: var(--ik-toggle-fill); color: var(--ik-text);
  font: 600 13px/1.2 var(--ik-font);
  cursor: pointer;
}
.ik-model-note.ik-flagged { color: var(--ik-warning); }
.ik-stage-badges { padding-top: 2px; }
.ik-status.ik-status-failed { color: var(--ik-warning); }
.ik-in-model .ik-overlay { display: none; }

/* The callout: a ring at the point, a leader up, the word above it. Positioned through the CSSOM. */
.ik-callout {
  position: absolute; left: 0; top: 0;
  width: 0; height: 0;
  pointer-events: none;
  will-change: transform;
}
.ik-callout-ring {
  position: absolute; left: -15px; top: -15px;
  width: 30px; height: 30px;
  border: 2px solid var(--ik-accent); border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--ik-leader-halo);
}
.ik-callout-line {
  position: absolute; left: -0.75px; top: -34px;
  width: 1.5px; height: 19px;
  background: var(--ik-accent);
}
.ik-callout-pill {
  position: absolute; left: 0; top: -46px;
  transform: translate(-50%, -50%);
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ik-panel);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ik-accent) 60%, transparent);
  font: 600 12px/15px var(--ik-font);
  color: var(--ik-text);
  white-space: nowrap;
}

/* The station card's text. */
.ik-card-text { margin: 0; font-size: 14px; line-height: 1.45; }
.ik-card-step { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; }

/* W3: the objects row, the doors, the label bubbles, the nine-cell profile, the genesis view. */
.ik-objects-row .ik-segments { max-width: 100%; }
.ik-objects .ik-segment { padding: 5px 12px; overflow: hidden; text-overflow: ellipsis; }
.ik-door-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ik-door-row:not(:has(.ik-door-button:not([hidden]))) { display: none; }
.ik-door-button { min-height: 34px; padding: 4px 12px 4px 9px; }
.ik-door-button .ik-icon { width: 17px; height: 17px; }
.ik-door-button.ik-on { background: var(--ik-accent); color: var(--ik-on-accent); }
.ik-door-button:focus-visible, .ik-profile-button:focus-visible, .ik-bubble:focus-visible, .ik-door:focus-visible { outline: 2px solid var(--ik-accent); outline-offset: 2px; }
.ik-toggles.ik-toggles-one { grid-template-columns: 1fr; }
.ik-toggles.ik-toggles-one .ik-toggle { min-height: 40px; grid-auto-flow: column; justify-content: center; align-items: center; gap: 8px; }

.ik-bubble-host { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ik-bubbles { position: absolute; inset: 0; }
.ik-bubble {
  position: absolute; left: 0; top: 0;
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 9px;
  border: 0; border-radius: 999px;
  font: 600 12px/15px var(--ik-font);
  white-space: nowrap;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.25), inset 0 0 0 0.5px rgb(255 255 255 / 0.18);
  pointer-events: auto; cursor: pointer;
  will-change: transform;
}
.ik-bubble-dot {
  position: absolute; left: 50%; bottom: -10px;
  width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 1.5px rgb(0 0 0 / 0.45);
}
.ik-bubble.ik-selected { box-shadow: 0 0 0 2px var(--ik-accent), 0 1px 4px rgb(0 0 0 / 0.25); }
.ik-bubble-object {
  background: var(--ik-panel); color: var(--ik-text);
  border-radius: 14px; padding: 6px 10px 7px;
  font-size: 13px;
}
.ik-bubble-object .ik-bubble-dot { background: var(--ik-text); }

.ik-cells { display: inline-flex; align-items: flex-start; gap: 3px; }
.ik-cell-wrap { display: inline-grid; justify-items: center; gap: 2px; }
.ik-cell-id { font-size: 9.5px; font-weight: 600; color: var(--ik-secondary); font-variant-numeric: tabular-nums; }
.ik-cell {
  display: inline-block; width: 18px; height: 18px; border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28), 0 0 0 0.5px rgb(0 0 0 / 0.35);
}
.ik-cell-outlined { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28), 0 0 0 1.5px var(--ik-text); }
.ik-cell-hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ik-secondary); }
.ik-cell-crossed { background: linear-gradient(to top right, transparent 46%, var(--ik-secondary) 46%, var(--ik-secondary) 54%, transparent 54%); box-shadow: inset 0 0 0 1px var(--ik-secondary); }
.ik-bubble-strip .ik-cell, .ik-cells-small .ik-cell { width: 10px; height: 10px; border-radius: 2px; }
.ik-bubble-strip { gap: 2px; }
.ik-cells-small { gap: 2px; }
.ik-profile-button {
  display: inline-flex; align-items: center;
  padding: 4px 7px; border: 0; border-radius: 8px;
  background: var(--ik-panel); cursor: pointer;
}

.ik-profile { gap: 8px; }
.ik-profile-bubble { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.ik-bubble-swatch { flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.4); }
.ik-profile-readon { margin: 0; font-size: 12px; font-weight: 600; color: var(--ik-secondary); }
.ik-profile-frame { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ik-level-chip { padding: 2px 9px; border-radius: 999px; background: var(--ik-toggle-fill); font-size: 12px; font-weight: 700; }
.ik-profile-system { font-size: 14px; }
.ik-verdict { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.ik-verdict-mark { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ik-secondary); }
.ik-verdict-sustains .ik-verdict-mark { background: rgb(84 157 64); border-color: rgb(84 157 64); }
.ik-verdict-mixed .ik-verdict-mark { background: linear-gradient(90deg, rgb(84 157 64) 50%, transparent 50%); border-color: rgb(84 157 64); }
.ik-verdict-destroys .ik-verdict-mark { background: rgb(18 18 20); border-color: rgb(18 18 20); }
.ik-strip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ik-flag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--ik-warning); background: var(--ik-warning-fill); }
.ik-doors { display: flex; flex-wrap: wrap; gap: 6px; }
.ik-door {
  min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--ik-accent); color: var(--ik-on-accent);
  font: 600 13px var(--ik-font); cursor: pointer;
}
.ik-genesis-steps { margin: 0; padding: 0 0 0 4px; list-style: none; display: grid; gap: 0; counter-reset: step; }
.ik-genesis-step {
  position: relative; padding: 5px 0 5px 22px;
  font-size: 13.5px; line-height: 1.35;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.ik-genesis-step::before {
  content: ""; position: absolute; left: 4px; top: 10px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ik-accent);
}
.ik-genesis-step::after {
  content: ""; position: absolute; left: 8px; top: 21px; bottom: -8px;
  width: 1.5px; background: color-mix(in srgb, var(--ik-text) 25%, transparent);
}
.ik-genesis-step:last-child::after { display: none; }
.ik-genesis-gap { color: var(--ik-secondary); }
.ik-genesis-gap::before { background: transparent; border: 1.5px dashed var(--ik-secondary); }
/* Narrow views: the strip keeps its first two honesty badges (the card lists them all). */
.ik-sheet .ik-stage-badges .ik-badge:nth-child(n+3) { display: none; }

/* ===================================================================================================== */
/* W4 (native_plan_R4.md §16): the atlas main page, the lineage view, the way back, the charter's focus,  */
/* the install hint. Colours that carry meaning come from the data (atlas.yaml hues, the bubble steps).   */

/* The charter's focus (§1): the frame darker toward its edges, never over the controls. */
.ik-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 78% 70% at 50% 46%, rgb(0 0 0 / 0) 55%, rgb(0 0 0 / 0.16) 100%);
}
.ikage[data-look="macro"] .ik-vignette { background: radial-gradient(ellipse 78% 70% at 50% 46%, rgb(0 0 0 / 0) 50%, rgb(0 0 0 / 0.42) 100%); }

/* The way back (decision 58, R4.8g): in every object view, before the app's name. */
.ik-back .ik-icon { width: 22px; height: 22px; stroke-width: 2.2; }

/* The atlas covers the 3D view; the object's header lines and the control strip step aside. */
.ik-atlas-host { position: absolute; inset: 0; }
.ik-atlas-on .ik-canvas, .ik-atlas-on .ik-vignette, .ik-atlas-on .ik-overlay, .ik-atlas-on .ik-bubble-host,
.ik-atlas-on .ik-callout, .ik-atlas-on .ik-strip, .ik-atlas-on .ik-mode, .ik-atlas-on .ik-meta, .ik-atlas-on .ik-scrim { display: none; }
.ik-atlas-on .ik-backdrop-macro { opacity: 0; }
.ik-atlas {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, rgb(214 210 202) 0%, rgb(178 173 165) 100%);
  overflow: hidden;
  --ik-ink: rgb(25 30 42);
  --ik-paper: rgb(245 244 240);
}
.ik-atlas-map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ik-atlas-map:active { cursor: grabbing; }
.ik-atlas-map:focus-visible { outline: 2px solid var(--ik-accent); outline-offset: -3px; }
.ik-atlas-ground { stroke: rgb(25 30 42 / 0.18); stroke-width: 0.15; }
.ik-atlas-grid line { stroke: rgb(25 30 42 / 0.07); stroke-width: 0.08; }
.ik-atlas-family { fill-opacity: 0.62; }
.ik-atlas-border { fill: none; stroke-width: 0.22; stroke-dasharray: 0.9 0.6; stroke-opacity: 0.95; filter: brightness(0.62); }
.ik-atlas-valley { fill: none; stroke-width: 2.1; stroke-opacity: 0.55; stroke-linecap: round; stroke-linejoin: round; }
.ik-atlas-line { fill: none; stroke: rgb(25 30 42 / 0.5); stroke-width: 0.14; stroke-linecap: round; }
.ik-atlas-source { fill: rgb(25 30 42 / 0.75); }
.ik-atlas-source-absolute_beginning { fill: rgb(140 45 30); }
.ik-atlas-member { fill: var(--ik-paper); stroke: rgb(25 30 42 / 0.7); stroke-width: 0.14; }
.ik-atlas-example { fill: var(--ik-paper); stroke: var(--ik-ink); stroke-width: 0.22; }
.ik-atlas-shadow { fill: rgb(25 30 42 / 0.16); }
.ik-atlas-disc { fill: var(--ik-paper); }
.ik-atlas-rim { fill: none; stroke: rgb(25 30 42 / 0.35); stroke-width: 0.12; }
.ik-atlas-petal { stroke: rgb(25 30 42 / 0.35); stroke-width: 0.06; }
.ik-atlas-petal-hollow { fill: rgb(245 244 240 / 0.5); stroke: rgb(25 30 42 / 0.55); stroke-dasharray: 0.25 0.18; stroke-width: 0.08; }
.ik-atlas-petal-crossed { fill: rgb(25 30 42 / 0.2); }
.ik-atlas-seat { stroke: var(--ik-ink); stroke-width: 0.16; }
.ik-atlas-seat-stem { stroke: var(--ik-ink); stroke-width: 0.12; }
.ik-atlas-engraving path, .ik-atlas-engraving rect { fill: none; stroke: rgb(60 45 30); stroke-width: 0.8; stroke-linejoin: round; }
.ik-atlas-engraving .ik-atlas-filament { stroke: rgb(140 70 20); }
.ik-atlas-token, .ik-atlas-part { cursor: pointer; }
.ik-atlas-token.ik-atlas-focus .ik-atlas-rim { stroke: var(--ik-ink); stroke-width: 0.35; }
.ik-atlas-token.ik-atlas-related .ik-atlas-rim { stroke: rgb(25 30 42 / 0.8); stroke-width: 0.25; }
.ik-atlas-part-body { stroke: rgb(25 30 42 / 0.45); stroke-width: 0.06; }
.ik-atlas-part.ik-atlas-focus .ik-atlas-part-body { stroke: var(--ik-ink); stroke-width: 0.22; }
.ik-atlas-part-dot { stroke: rgb(25 30 42 / 0.5); stroke-width: 0.05; }
.ik-atlas-hit { fill: transparent; }
.ik-atlas-has-focus .ik-atlas-token:not(.ik-atlas-focus):not(.ik-atlas-related) { opacity: 0.55; }
.ik-atlas-route { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ik-atlas-route-works_in { stroke-width: 3.2; }
.ik-atlas-route-made_through { stroke-width: 2.6; }
.ik-atlas-route-dots { fill: none; stroke: rgb(255 255 255 / 0.95); stroke-width: 2; stroke-dasharray: 0.1 12; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: ik-atlas-flow 1.4s linear infinite; }
.ik-atlas-route-double-out { stroke-width: 4; }
.ik-atlas-route-double-in { stroke: rgb(214 210 202); stroke-width: 1.6; vector-effect: non-scaling-stroke; fill: none; }
@keyframes ik-atlas-flow { to { stroke-dashoffset: -12.1; } }

.ik-atlas-names { position: absolute; inset: 0; pointer-events: none; }
.ik-atlas-name {
  position: absolute; left: 0; top: 0;
  white-space: nowrap; transform-origin: 0 0;
  color: rgb(25 30 42 / 0.86);
  text-shadow: 0 0 3px rgb(225 222 216 / 0.95), 0 0 6px rgb(225 222 216 / 0.7);
  will-change: transform;
}
.ik-atlas-name-family { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; font-variant: small-caps; text-transform: lowercase; color: rgb(40 36 30 / 0.82); }
.ik-atlas-name-lane { font-size: 11px; font-style: italic; font-weight: 600; color: rgb(25 30 42 / 0.72); }
.ik-atlas-name-member { font-size: 10.5px; font-weight: 500; color: rgb(25 30 42 / 0.68); }
.ik-atlas-name-example { font-style: italic; }
.ik-atlas-name-token { font-size: 12.5px; font-weight: 700; }
.ik-atlas[data-altitude="atlas"] .ik-atlas-name-token { font-size: 11.5px; }
.ik-atlas-name-lit { padding: 3px 9px; border-radius: 999px; background: rgb(245 244 240 / 0.92); text-shadow: none; box-shadow: 0 1px 3px rgb(25 30 42 / 0.25); }
.ik-atlas-pill {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  background: rgb(245 244 240 / 0.92); color: var(--ik-ink);
  font-size: 12px; box-shadow: 0 1px 3px rgb(25 30 42 / 0.22);
}
.ik-atlas-pill span { opacity: 0.62; font-weight: 500; }
.ik-atlas-gauge {
  position: absolute; left: 30px; top: calc(var(--ik-header-h, 64px) + 6px);
  width: 14px; height: 120px; pointer-events: none;
  display: grid; grid-template-rows: repeat(5, 26px); justify-items: center; align-items: center;
}
.ik-atlas-gauge::before { content: ""; position: absolute; left: 6.5px; top: 6px; width: 1px; height: 104px; background: rgb(25 30 42 / 0.28); }
.ik-atlas-gauge-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: rgb(245 244 240 / 0.9); box-shadow: inset 0 0 0 1px rgb(25 30 42 / 0.45); }
.ik-atlas-gauge-dot.ik-past { background: rgb(25 30 42 / 0.55); box-shadow: none; }
.ik-atlas-gauge-dot.ik-on { width: 11px; height: 11px; background: var(--ik-ink); box-shadow: 0 0 0 2px var(--ik-paper), 0 0 1px 2px rgb(0 0 0 / 0.35); }
.ik-atlas-gauge-word {
  position: absolute; left: 20px; top: 3px; white-space: nowrap;
  padding: 1px 7px; border-radius: 999px; background: rgb(245 244 240 / 0.6);
  font-size: 11.5px; font-weight: 600; color: rgb(25 30 42 / 0.75);
  transition: transform 0.2s ease-out;
}
.ik-atlas-legend-button { position: absolute; right: 16px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 44px); width: 40px; height: 40px; background: rgb(245 244 240 / 0.8); }
.ik-atlas-legend-button svg { width: 20px; height: 20px; fill: none; stroke: var(--ik-ink); stroke-width: 1.6; stroke-linecap: round; }
.ik-atlas-legend-button svg .ik-fill { fill: var(--ik-ink); stroke: none; }
.ik-atlas-has-focus .ik-atlas-legend-button, .ik-atlas-has-focus .ik-atlas-hint { display: none; }
.ik-atlas-hint {
  position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  margin: 0; max-width: calc(100% - 24px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px;
  padding: 6px 14px; border-radius: 999px; background: rgb(245 244 240 / 0.62);
  font-size: 12.5px; font-weight: 500; color: rgb(25 30 42 / 0.8);
  pointer-events: none; text-align: center;
}
.ik-atlas-hint-dot { opacity: 0.45; }
.ik-atlas-legend {
  position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px; max-height: 72%;
  margin: 0 auto; max-width: 560px;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 18px 20px; border-radius: 18px;
  background: rgb(243 241 238); color: var(--ik-ink);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.25);
  display: grid; gap: 10px; align-content: start;
}
.ik-atlas-legend-head { display: flex; align-items: flex-start; gap: 12px; }
.ik-atlas-legend-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ik-atlas-legend-row { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start; font-size: 13.5px; line-height: 1.4; }
.ik-atlas-sample { width: 46px; height: 22px; overflow: visible; }
.ik-atlas-sample-ground { fill-opacity: 0.75; }
.ik-atlas-sample-valley { stroke-width: 9; stroke-opacity: 0.6; stroke-linecap: round; fill: none; }
.ik-atlas-sample-line { stroke: rgb(25 30 42 / 0.45); stroke-width: 1; }
.ik-atlas-sample-source { fill: rgb(25 30 42 / 0.75); }
.ik-atlas-sample-hollow { fill: none; stroke: rgb(25 30 42 / 0.45); stroke-dasharray: 3 2; }
.ik-atlas-sample-route { stroke-width: 4; }
.ik-atlas-sample-dots { stroke-dasharray: 0.1 9; }
.ik-atlas-sample-made { stroke-width: 3; stroke-dasharray: 0.1 6; stroke-linecap: round; fill: none; }
.ik-atlas-sample-same { stroke-width: 1.2; fill: none; }
.ik-atlas-sample-stem { stroke: var(--ik-ink); stroke-width: 1.5; }
.ik-atlas-sample .ik-atlas-seat { stroke-width: 1.5; }
.ik-atlas-sample-example { stroke-width: 1.5; }
.ik-atlas-hypothesis { font-style: italic; color: rgb(25 30 42 / 0.7); }

/* The atlas card (mockup 02): schema first, its family's colour beside it; the cells; the three doors. */
.ik-atlas-card-sub { margin: -6px 0 0; font-size: 13px; color: var(--ik-secondary); }
.ik-atlas-schema { display: grid; grid-template-columns: 4px 1fr; gap: 10px; }
.ik-atlas-schema-bar { border-radius: 2px; background: var(--ik-secondary); }
.ik-atlas-schema-words { display: grid; gap: 3px; }
.ik-atlas-schema-name { margin: 0; font-size: 14px; font-weight: 700; }
.ik-atlas-schema-op { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ik-secondary); }
.ik-atlas-cells .ik-cell { width: 26px; height: 15px; border-radius: 3px; }
.ik-atlas-uses { margin: 0; font-size: 12px; color: var(--ik-secondary); }
.ik-atlas-doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ik-atlas-door {
  min-height: 44px; padding: 4px 8px;
  border: 0; border-radius: 14px;
  background: var(--ik-toggle-fill); color: var(--ik-accent);
  font: 600 13.5px var(--ik-font); cursor: pointer;
}
.ik-atlas-door.ik-primary { background: var(--ik-accent); color: var(--ik-on-accent); }
.ik-atlas-door:disabled { opacity: 0.45; cursor: default; }
.ik-atlas-door:focus-visible { outline: 2px solid var(--ik-accent); outline-offset: 2px; }

/* The install hint (pwa.js): a note at the foot of the atlas, above the gesture hint. */
.ik-install {
  position: absolute; z-index: 5; left: 12px; right: 12px; top: calc(var(--ik-header-h, 64px) + 4px);
  margin: 0 auto; max-width: 520px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 14px; border-radius: 16px;
  background: rgb(25 30 42 / 0.9); color: rgb(245 244 240);
  font-size: 12.5px; line-height: 1.35;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.25);
}
.ik-install-text { flex: 1 1 auto; }
.ik-install-button {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px;
  background: rgb(245 244 240); color: rgb(25 30 42); font: 700 13px var(--ik-font); cursor: pointer;
}
.ik-install-button .ik-icon { width: 16px; height: 16px; }
.ik-install-close { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.12); color: inherit; font: 600 18px var(--ik-font); cursor: pointer; }
.ik-atlas-on .ik-install ~ * { }
.ik-install:not([hidden]) ~ .ik-atlas-host .ik-atlas-gauge { top: calc(var(--ik-header-h, 64px) + 70px); }

/* The lineage view: parchment (the charter §4: parchment for historical drawings in the lineage view). */
.ik-lineage {
  position: absolute; inset: 0; z-index: 6;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 16px 24px;
  background: radial-gradient(ellipse 110% 80% at 50% 30%, rgb(241 233 214) 0%, rgb(224 212 186) 100%);
  color: rgb(43 33 24);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  display: flex; flex-direction: column; gap: 8px;
  --ik-iron-gall: rgb(92 72 52);
  --ik-sanguine: rgb(150 58 38);
  --ik-parchment: rgb(246 240 226);
}
.ik-lineage-top { display: flex; align-items: center; gap: 10px; }
.ik-lineage-titles { flex: 1 1 auto; min-width: 0; }
.ik-lineage-kicker { margin: 0; font-size: 13px; font-style: italic; color: var(--ik-iron-gall); }
.ik-lineage-title { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.2; }
.ik-lineage-round {
  flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgb(43 33 24 / 0.09); color: inherit; font: 700 18px/1 Georgia, serif; cursor: pointer;
}
.ik-lineage-round:disabled { opacity: 0.3; cursor: default; }
.ik-lineage-round:focus-visible, .ik-lineage-seg:focus-visible, .ik-lineage-vignette:focus-visible, .ik-lineage-chip:focus-visible, .ik-lineage-enter:focus-visible { outline: 2px solid var(--ik-sanguine); outline-offset: 2px; }
.ik-lineage-ribbon, .ik-lineage-more, .ik-lineage-op { margin: 0; font-size: 12.5px; font-style: italic; color: var(--ik-iron-gall); }
.ik-lineage-none { margin: 8px 0; font-size: 16px; font-style: italic; color: var(--ik-iron-gall); }
.ik-lineage-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ik-lineage-seg { min-height: 36px; border: 0; border-radius: 999px; background: rgb(43 33 24 / 0.07); color: inherit; font: 13px Georgia, serif; cursor: pointer; }
.ik-lineage-seg[aria-pressed="true"] { background: rgb(43 33 24); color: var(--ik-parchment); font-weight: 600; }
.ik-lineage-body { display: grid; gap: 14px; }
.ik-lineage-pager { display: grid; grid-template-columns: 40px 1fr 40px; gap: 8px; align-items: center; }
.ik-lineage-wash-head { min-width: 0; }
.ik-lineage-wash { margin: 0; font-size: 17px; font-weight: 600; }
.ik-lineage-lanes { position: relative; height: 34px; }
.ik-lineage-lane-name { position: absolute; top: 0; font-size: 12px; font-weight: 600; line-height: 1.2; }
.ik-lineage-roll { position: relative; max-height: 62vh; overflow: auto; border-top: 1px solid rgb(43 33 24 / 0.2); border-bottom: 1px solid rgb(43 33 24 / 0.2); }
.ik-lineage-roll-box { position: relative; }
.ik-lineage-svg { position: absolute; left: 0; top: 0; }
.ik-lineage-rule { stroke: rgb(43 33 24 / 0.07); stroke-width: 1; }
.ik-lineage-rule-major { stroke: rgb(43 33 24 / 0.16); stroke-width: 1; }
.ik-lineage-today { stroke: var(--ik-sanguine); stroke-width: 1.2; stroke-dasharray: 4 3; }
.ik-lineage-year { position: absolute; left: 2px; transform: translateY(-50%); font-size: 10.5px; color: var(--ik-iron-gall); font-variant-numeric: tabular-nums; }
.ik-lineage-year-today { color: var(--ik-sanguine); font-style: italic; }
.ik-lineage-ink { stroke: rgb(43 33 24 / 0.8); stroke-width: 2.4; stroke-linecap: round; }
.ik-lineage-ink-before { stroke: rgb(43 33 24 / 0.3); stroke-width: 1.2; stroke-dasharray: 2 4; }
.ik-lineage-ink-dormant { stroke: var(--ik-parchment); stroke-width: 2.4; stroke-dasharray: 3 3; }
.ik-lineage-thread { fill: none; stroke: rgb(43 33 24 / 0.7); stroke-width: 1.2; stroke-dasharray: 2 3; }
.ik-lineage-glyph .ik-stroke { fill: var(--ik-parchment); stroke: rgb(43 33 24); stroke-width: 1.6; }
.ik-lineage-glyph .ik-thick { stroke-width: 2.4; fill: none; }
.ik-lineage-glyph .ik-dashed { stroke-dasharray: 2 2; }
.ik-lineage-glyph .ik-fill-sanguine { fill: var(--ik-sanguine); }
.ik-lineage-glyph .ik-fill-paper { fill: var(--ik-parchment); }
.ik-lineage-glyph .ik-fill-ink { fill: rgb(43 33 24); }
.ik-lineage-mark.ik-on .ik-stroke { stroke: var(--ik-sanguine); }
.ik-lineage-hit { fill: transparent; cursor: pointer; }
.ik-lineage-vignette {
  position: absolute; z-index: 1;
  padding: 3px 8px; border-radius: 6px;
  border: 1.2px dashed rgb(43 33 24 / 0.7); background: var(--ik-parchment);
  font: 12px/1.25 Georgia, serif; color: inherit; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ik-lineage-vignette.ik-solid, .ik-lineage-chip.ik-solid { border-style: solid; border-width: 1.4px; }
.ik-lineage-vignette.ik-focus, .ik-lineage-chip.ik-focus { box-shadow: 0 0 0 2px var(--ik-sanguine); font-weight: 700; }
.ik-lineage-vignette.ik-on, .ik-lineage-chip.ik-on { background: rgb(43 33 24); color: var(--ik-parchment); }
.ik-lineage-section { display: grid; gap: 6px; }
.ik-lineage-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ik-lineage-chip {
  display: inline-grid; gap: 1px; padding: 5px 10px; border-radius: 8px;
  border: 1.2px dashed rgb(43 33 24 / 0.7); background: var(--ik-parchment);
  font: 13px/1.25 Georgia, serif; color: inherit; text-align: left; cursor: pointer;
}
.ik-lineage-chip.ik-overlap { border-color: var(--ik-sanguine); }
.ik-lineage-chip-lane, .ik-lineage-chip-schema { font-size: 11px; font-style: italic; color: var(--ik-iron-gall); }
.ik-lineage-surprises { padding-top: 6px; border-top: 1px solid rgb(43 33 24 / 0.2); }
.ik-lineage-pair { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: rgb(255 255 255 / 0.35); }
.ik-lineage-pair-text { margin: 0; font-size: 13.5px; line-height: 1.4; }
.ik-lineage-folio {
  position: sticky; bottom: 0; z-index: 2; margin-top: auto;
  display: grid; gap: 8px; padding: 14px 16px 16px; border-radius: 14px;
  background: var(--ik-parchment); box-shadow: 0 -2px 16px rgb(43 33 24 / 0.2), inset 0 0 0 1px rgb(43 33 24 / 0.2);
  max-height: 48vh; overflow-y: auto;
}
.ik-lineage-folio-close { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; font-size: 16px; }
.ik-lineage-folio-title { margin: 0 40px 0 0; font-size: 18px; font-weight: 600; }
.ik-lineage-folio-text { margin: 0; font-size: 15px; line-height: 1.4; }
.ik-lineage-enter {
  justify-self: start; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgb(43 33 24); color: var(--ik-parchment); font: 600 14px Georgia, serif; cursor: pointer;
}
.ik-lineage-row { display: grid; gap: 1px; }
.ik-lineage-row-key { font-size: 12px; font-style: italic; color: var(--ik-iron-gall); }
.ik-lineage-row-value { font-size: 14px; }
.ik-lineage-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ik-lineage-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  border: 0.8px solid rgb(150 58 38 / 0.6); color: var(--ik-sanguine); font-size: 11px; font-style: italic;
}
.ik-lineage-badges .ik-lineage-badge { margin-left: 0; }
.ik-lineage-compare { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ik-lineage-compare li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.ik-lineage-compare .ik-comparable { font-weight: 600; }
.ik-lineage-verdict { font-size: 11.5px; font-style: italic; color: var(--ik-sanguine); text-align: right; }
.ik-lineage-compare .ik-comparable .ik-lineage-verdict { color: inherit; }
.ik-lineage-legend {
  position: absolute; z-index: 3; left: 16px; right: 16px; top: 64px;
  margin: 0 auto; max-width: 420px;
  padding: 14px 16px; border-radius: 14px; background: var(--ik-parchment);
  box-shadow: 0 8px 24px rgb(43 33 24 / 0.25), inset 0 0 0 1px rgb(43 33 24 / 0.2);
}
.ik-lineage-legend-rows { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ik-lineage-legend-rows li { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 8px; font-size: 14px; }
.ik-lineage-legend-glyph { width: 30px; height: 20px; overflow: visible; }
.ik-lineage-legend-box { width: 30px; height: 18px; border-radius: 5px; border: 1.2px dashed rgb(43 33 24); }
.ik-lineage-legend-box.ik-solid { border-style: solid; }
@media (prefers-reduced-motion: reduce) {
  .ik-atlas-route-dots { animation: none; }
}
