:root {
  --web-surface: #fcfcfb;
  --web-panel: #ffffff;
  --web-ink: #0b0b0b;
  --web-ink-2: #52514e;
  --web-ink-3: #86857f;
  --web-line: #e4e3de;
  --web-nav: 64px;
}

.web-body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--web-surface);
  color: var(--web-ink);
}

html:has(.web-body) { height: 100%; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.web-full {
  position: fixed;
  inset: var(--web-nav) 0 0 0;
  background: var(--web-surface);
  background-image: radial-gradient(circle at 1px 1px, #ecebe5 1px, transparent 0);
  background-size: 24px 24px;
  overflow: hidden;
  touch-action: none;
}

#web-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#web-canvas.is-dragging { cursor: grabbing; }
#web-canvas.is-node { cursor: pointer; }
#web-canvas.is-moving { cursor: grabbing; }

.web-topbar {
  position: absolute;
  top: 14px; left: 16px; right: 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.web-search input {
  pointer-events: auto;
  width: min(320px, 60vw);
  padding: 9px 14px;
  font: inherit; font-size: 13.5px;
  color: var(--web-ink);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--web-line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.web-search input:focus { outline: 2px solid #2a78d6; outline-offset: 1px; }

.web-counts {
  pointer-events: none;
  font-size: 12.5px;
  color: var(--web-ink-2);
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .82);
  padding: 5px 12px;
  border-radius: 999px;
}

.web-tooltip {
  position: absolute;
  z-index: 4;
  max-width: 300px;
  padding: 9px 11px;
  background: var(--web-panel);
  border: 1px solid var(--web-line);
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(11, 11, 11, .14);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--web-ink-2);
  pointer-events: none;
}
.web-tooltip b { display: block; color: var(--web-ink); font-size: 13px; margin-bottom: 2px; }
.web-tooltip .web-tt-role { color: var(--web-ink-3); }

.web-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: linear-gradient(to top, rgba(252, 252, 251, .96) 55%, rgba(252, 252, 251, 0));
  pointer-events: none;
}

.web-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  pointer-events: auto;
}

.web-legend-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 9px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--web-line);
  border-radius: 999px;
  font: inherit; font-size: 12.5px;
  color: var(--web-ink-2);
  cursor: pointer;
}
.web-legend-item:hover { color: var(--web-ink); border-color: #cfcec8; }
.web-legend-item.is-active {
  color: var(--web-ink);
  border-color: var(--web-ink);
  box-shadow: inset 0 0 0 1px var(--web-ink);
}
.web-legend-reset { padding-left: 12px; }

.web-swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; }

.web-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--web-ink-3);
}

.web-vide {
  display: flex; align-items: center; justify-content: center;
  color: var(--web-ink-2); font-size: 15px;
}

@media (max-width: 720px) {
  .web-topbar { top: 10px; flex-direction: column; align-items: flex-start; }
  .web-counts { align-self: flex-end; }
  .web-hint { display: none; }
  .web-legend-nom { font-size: 12px; }
}
