/* References board (features/ref-board.js): a floating window over an endless board — PureRef's feel, in Flowly's own
   white look (Felix, 2026-11-12: "it's not white like our regular UI"). */
.rb { position: fixed; z-index: 70; display: flex; flex-direction: column; min-width: 320px; min-height: 220px; resize: both; overflow: hidden;
  border-radius: 14px; background: var(--card); border: 1px solid light-dark(rgba(0,0,0,.08), rgba(255, 255, 255, 0.14)); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 18px 48px rgba(15,20,35,.16); color: var(--text);
  animation: rb-in .16s cubic-bezier(.2,.8,.2,1); }
@keyframes rb-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.rb-bar { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px; background: var(--card); border-bottom: 1px solid light-dark(#ececee, #2a2a2e); cursor: grab; user-select: none; flex: none; }
.rb-bar:active { cursor: grabbing; }
.rb-bar > svg { width: 15px; height: 15px; color: light-dark(#8e8e93, #909095); }
.rb-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-spring { flex: 1; }
.rb-zoom { font-size: 11px; font-variant-numeric: tabular-nums; color: light-dark(#8e8e93, #909095); margin-right: 4px; }
.rb-btn, .rb-x { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: light-dark(#6e6e73, #a9a9ad); cursor: pointer; font: inherit; font-size: 13px; transition: background .12s, color .12s; }
.rb-btn:hover { background: light-dark(#f2f2f4, #252528); color: var(--text); }
.rb-btn svg, .rb-x svg { width: 16px; height: 16px; }
.rb-x:hover { background: light-dark(#fdecea, #3b1a16); color: light-dark(#c62828, #df6161); }
.rb-stage { position: relative; flex: 1; overflow: hidden; background: light-dark(#f7f7f8, #212124); background-image: radial-gradient(light-dark(rgba(0,0,0,.09), rgba(255, 255, 255, 0.16)) 1px, transparent 1px); background-size: 24px 24px; cursor: default; outline: none; touch-action: none; }
.rb-stage.panning { cursor: grabbing; }
.rb-stage.drop { box-shadow: inset 0 0 0 2px #0a84ff; background-color: light-dark(#eef5ff, #11223a); }
.rb-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.rb-item { position: absolute; cursor: move; }
.rb-item.rb-image { box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.rb-item img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.rb-item.on { outline: 2px solid #0a84ff; outline-offset: 0; }
.rb-text { min-width: 40px; padding: 4px 6px; line-height: 1.2; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; outline: none; }
.rb-text[contenteditable="true"] { cursor: text; background: var(--card); box-shadow: inset 0 0 0 1px #0a84ff; }
.rb-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 3px; background: #0a84ff; border: 2px solid var(--card); cursor: nwse-resize; display: none; }
.rb-item.on .rb-handle { display: block; }
.rb-hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none; color: light-dark(#8e8e93, #909095); font-size: 13px; text-align: center; padding: 20px; }
.rb-hint b { color: var(--text); font-size: 15px; }
.rb-hint[hidden] { display: none; }
.rb-toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: 90%; padding: 8px 12px; border-radius: 8px; background: #1d1d1f; color: #fff; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .rb { animation: none; } }
/* move and resize a note (or a picture) straight away, no selecting first (Felix, 2026-11-12): the corner shows on
   hover, and dragging a note moves it instead of selecting its letters; double-click edits the words */
.rb-item:hover .rb-handle { display: block; }
.rb-item:hover:not(.on) { outline: 1px solid rgba(10,132,255,.45); }
.rb-text:not([contenteditable="true"]) { user-select: none; -webkit-user-select: none; }
.rb-item.rb-text-note { cursor: move; }
