/* The three.js Comparator (board3d.js), layered over the SVG elevation (comparator.css).
   Every rule is scoped to .cmp3d or .cmp.cmp-3d, so without the module this file does nothing.
   Colours are board.css tokens; board3d.js reads the same tokens for the scene, light and dark. */
.cmp.cmp-3d .cmp-box { display: none; }
.cmp3d { margin-top: 6px; }
.cmp3d-view {
  position: relative; height: clamp(300px, 44vw, 500px); overflow: hidden;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--sheet);
}
.cmp3d-canvas { display: block; width: 100%; height: 100%; }
.cmp3d-tags { position: absolute; inset: 0; pointer-events: none; font: 600 12px/1.2 var(--mono); }
.cmp3d-tag {
  position: absolute; left: 0; top: 0; white-space: nowrap; color: var(--ink);
  padding: 2px 5px; background: color-mix(in srgb, var(--sheet) 82%, transparent); border-radius: 2px;
}
.cmp3d-tag.off { display: none; }
.cmp3d-tag.mech { color: var(--ink-2); letter-spacing: 0.08em; font-weight: 700; }
.cmp3d-tag.loop { color: var(--muted); font-weight: 400; }
.cmp3d-tag.count { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cmp3d-tag.count b { color: var(--ink); }
.cmp3d-tag.wait { color: var(--muted); font-style: italic; }
.cmp3d-view.narrow .cmp3d-tag.minor { display: none; }
.cmp3d-view.narrow .cmp3d-tags { font-size: 10.5px; }
.cmp3d-prov { position: absolute; top: 10px; left: 10px; }
.cmp3d-empty {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); margin: 0; max-width: min(46ch, 70%);
  padding: 6px 10px; font-size: 13px; color: var(--ink-2); background: var(--sheet); border: 1px dashed var(--axis); text-align: center;
}
.cmp3d-cams { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.cmp3d-cam, .cmp3d-toggle {
  font: 600 12px/1 var(--mono); letter-spacing: 0.04em; padding: 6px 9px; color: var(--ink-2);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px; cursor: pointer;
}
.cmp3d-cam[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); background: var(--grid); }
.cmp3d-toggle { align-self: flex-start; }
.cmp3d-read { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cmp3d-read li { border-top: 2px solid var(--arm); padding-top: 6px; font-size: 13.5px; }
.cmp3d-read p { margin: 0 0 2px; }
.cmp3d-read .r-name { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.cmp3d-read .r-count { font-variant-numeric: tabular-nums; }
.cmp3d-read .r-fs { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cmp3d-read .r-wait { color: var(--muted); font-style: italic; }
.cmp3d-note { margin: 8px 0 0; max-width: 92ch; }
@media (max-width: 720px) { .cmp3d-read { grid-template-columns: minmax(0, 1fr); } }
.film .cmp3d-view { height: min(64vh, 660px); }
.film .cmp3d-tags { font-size: 16px; }
.film .cmp3d-read li { font-size: 17px; }
.film .cmp3d-cams, .film .cmp3d-toggle, .film .cmp3d-note { display: none; }
@media print {
  .cmp.cmp-3d .cmp-box { display: block; }
  .cmp3d, .cmp3d-toggle { display: none; }
}
