/* Affinity board (widgets/affinity/affinity.js). Note colours are the board's own paper colours in both themes,
   with dark ink; in dark mode they're dimmed a little. Handwriting: Caveat (Google Fonts, linked in the page). */
.af { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 12px 22px; font-size: 12.5px; line-height: 1.35; color: var(--ink); text-align: left; }
.af__top { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.af__head { display: flex; align-items: baseline; gap: 8px; }
.af__eyebrow { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.af__head strong { font-size: 15px; font-weight: 600; }
.af__muted { color: var(--muted); font-size: 11.5px; }
.af__modes { display: flex; gap: 4px; }
.af__modes button { padding: 4px 10px; border: 0; border-radius: 100px; background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font: inherit; }
.af__modes button[aria-pressed=true] { background: var(--ink); color: var(--bg); box-shadow: none; }

.af__board { position: relative; flex: 1; min-height: 0; }
.af__board.is-stacked { overflow-x: hidden; overflow-y: auto; }
.af__sizer { width: 1px; pointer-events: none; }
.af__board.is-stacked .af__heading { height: 24px; }
.af__board.is-stacked .af__heading-label { -webkit-line-clamp: 1; }
.af__note {
  position: absolute; top: 0; left: 0; z-index: 1; width: var(--s, 60px); height: var(--s, 60px);
  display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--s, 60px) * .1);
  background: var(--c); color: #1d1d1f; box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 4px 10px -6px rgba(0,0,0,.35);
  font-family: 'Caveat', 'Comic Sans MS', cursive; font-weight: 600; font-size: max(10px, calc(var(--s, 60px) * .19)); line-height: 1.02;
  overflow: hidden; overflow-wrap: break-word; hyphens: auto; cursor: grab; user-select: none; -webkit-user-select: none;
  transition: translate .9s cubic-bezier(.2,.7,.2,1) var(--d), rotate .9s cubic-bezier(.2,.7,.2,1) var(--d), scale .25s ease, opacity .25s ease, box-shadow .25s ease;
}
.af__note--long { font-size: max(9px, calc(var(--s, 60px) * .15)); }
.af__v { align-self: flex-end; font-size: .9em; opacity: .7; }
.af__note:hover, .af__note.is-drag { z-index: 30; scale: 2.1; box-shadow: 0 10px 28px -8px rgba(0,0,0,.45); transition-delay: 0s; }
.af__note.is-drag { cursor: grabbing; transition: scale .2s ease, box-shadow .2s ease; scale: 1.15; }
.af__note.is-dim { opacity: .2; }
.af--still .af__note { transition: none; }
html[data-theme=dark] .af__note { filter: brightness(.86) saturate(.9); }

.af__heading { position: absolute; top: 0; height: 42px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0; border: 0; background: none; text-align: left; color: var(--ink-2); font: inherit; font-size: 11.5px; line-height: 1.15; }
.af__heading[hidden] { display: none; }
.af__heading-label { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; hyphens: auto; -webkit-box-orient: vertical; }
.af__heading-n { color: var(--muted); font-size: 10.5px; }
.af__heading.is-on, .af__chip.is-on { color: var(--ink); font-weight: 600; }

.af__legend { display: flex; flex-wrap: wrap; gap: 4px 12px; min-height: 18px; transition: opacity .3s ease; }
.af--sorted .af__legend { opacity: 0; pointer-events: none; }
.af__chip { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; }
.af__chip i { width: 10px; height: 10px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) { .af__note { transition: opacity .2s ease; } }
