/* Shared by the learningphysics.ch apps (canonical copy in shared/, copied by sync.sh with dnd.js):
   ranking and matching by drag and drop, cards in a pool dragged into boxes. The colours are those
   of ui.css; load it after ui.css and before the app's style.css. */
.dnd-note { margin: 0 0 8px; }
.zone { border: 1.5px dashed var(--line); border-radius: 8px; background: var(--bg); padding: 6px; min-height: 48px; transition: border-color 0.12s, background 0.12s; }
.zone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.zone.over, .dnd.placing .zone:not(.pool):hover { border-color: var(--accent); background: var(--card); }
.dnd.placing .zone:not(.pool) { border-color: var(--accent); cursor: pointer; }
.zone .drop { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; align-items: flex-start; }
.zone.pool { border-style: solid; background: transparent; margin-bottom: 10px; }
.zone.pool .drop:empty::after { content: "✓"; color: var(--muted); padding: 6px; }
.chip {
  display: inline-block; max-width: 100%; text-align: left;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; line-height: 1.35;
}
.chip:hover:not(:disabled) { border-color: var(--accent); }
.chip.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.chip.dragging { opacity: 0.35; }
.chip.ghost { position: fixed; z-index: 1000; pointer-events: none; cursor: grabbing; opacity: 0.95; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); margin: 0; }
.chip:disabled { cursor: default; opacity: 1; color: inherit; }
.chip.ok { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 0 0 1px var(--ok); }
.chip.bad { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 0 0 1px var(--bad); }

/* ranking: boxes one below the other, between the two ends */
.buckets { display: grid; gap: 6px; }
.end { margin: 4px 0; color: var(--muted); font-size: 0.85rem; }

/* matching: a box per answer, under its head; pairs: a box per pair */
.targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.targets.pics { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.target-head { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; font-weight: 600; }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.zone-label { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }
