/* ---------- 17d. Unsorted, at the right edge (app/js/unsorted.js) ----------
   The open level's Unsorted column is a panel docked at the screen's right edge, as Milanote's is (Axio 2026-10-13):
   flush with the edge, from under the bar to the bottom of the screen (--us-h), a shade lighter than the canvas, with a
   hairline where it meets it. An animation that stays on it (usPin) holds it there at one size whatever the zoom. Its
   head stays at its top while its cards scroll under it (another, on its stack: usScroll). The head folds it away to a
   small tab at the edge (--us-tab wide, USP.TAB), its arrow pointing back in, with what it holds; a press on the tab
   opens it again. Anywhere else (a miniature, the zoom layer, a closed board) it is not drawn: it is no place on a
   canvas. A level with no Unsorted column shows the stand-in, #usv, looking the same. */
.obj.column.us { display: none; }
#objs > .obj.column.us, #usv {
  --us-bg: color-mix(in srgb, var(--surface) 30%, var(--canvas)); --us-tab: 30px;
  display: flex; left: 0 !important; top: 0 !important; height: auto !important; min-height: var(--us-h, 0px) !important; z-index: 1;
  transform-origin: 0 0;
  border: 0; border-radius: 6px 0 0 0; background: color-mix(in srgb, var(--us-bg) 94%, transparent);
  box-shadow: inset 1px 1px 0 var(--rule), -18px 0 32px -26px rgba(22, 27, 29, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  clip-path: inset(0 0 0 -60px);          /* scrolled: what passes above its head is not drawn */
  transition: opacity 200ms ease-out, visibility 0s;
}
/* In Safari's engine a backdrop is a layer of its own, and the canvas with it, drawn blurred when zoomed in (objects.css,
   html.wk): there the column on the canvas is its shade, not seen through (#usv, off the canvas, keeps it). Not on a
   phone, whose column is a sheet drawn inside it, with no backdrop (pocket.css). */
html.wk:not(.pocket) #objs > .obj.column.us, #usv.us-away { background: var(--us-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
/* Carried out of it, its cards show wherever the hand takes them on the screen (--us-cl/ct/cr/cb: its edges): while a
   move is on, only what is scrolled above its head is not drawn (inside its width, above its top). */
body.moving #objs[data-us="on"] > .obj.column.us {
  clip-path: polygon(var(--us-cl, -4000px) var(--us-ct, -4000px), 0 var(--us-ct, -4000px), 0 0, 100% 0, 100% var(--us-ct, -4000px),
                     var(--us-cr, 4000px) var(--us-ct, -4000px), var(--us-cr, 4000px) var(--us-cb, 4000px), var(--us-cl, -4000px) var(--us-cb, 4000px));
}
#usv { position: fixed; left: 0; top: 0; width: 264px; flex-direction: column; box-sizing: border-box; transform-origin: 0 0; user-select: none; -webkit-user-select: none; }
#usv[hidden], body.dv #usv { display: none; }
/* (dv: the side view is up, on the column itself, dvUi: a rule on body.dv looked over the whole canvas at each toggle) */
#objs > .obj.column.us.dv { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 140ms ease-out, visibility 0s 140ms; }
#objs > .obj.column.us.sel { outline-color: transparent; }
/* Its head: the rail's small caps, what it holds, and an arrow pointing out at the edge. It stays where it is while the
   cards scroll, over them. */
#objs > .obj.column.us > .chead, #usv > .chead {
  position: relative; z-index: 2; height: 44px; padding: 0 14px 0 16px;    /* (44: USP.HEAD) */ cursor: pointer; user-select: none; -webkit-user-select: none;
  border-radius: 6px 0 0 0; background: var(--us-bg); box-shadow: inset 1px 1px 0 var(--rule);
}
#objs > .obj.column.us .ct, #usv .ct { pointer-events: none; font: 500 9.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
#objs > .obj.column.us .ccount, #usv .ccount { font-size: 10px; color: var(--ink-3); }
#objs > .obj.column.us > .chead::after, #usv > .chead::after {
  content: ""; flex: none; width: 6px; height: 6px; margin-right: 2px; border: solid var(--ink-3); border-width: 0 1.3px 1.3px 0; rotate: -45deg;
  transition: rotate 200ms cubic-bezier(.2, .8, .2, 1), margin 200ms cubic-bezier(.2, .8, .2, 1);
}
@media (hover: hover) { #objs > .obj.column.us > .chead:hover::after, #usv > .chead:hover::after { border-color: var(--ink); } }
/* Folded: the tab, at the same height, its arrow pointing back in and what it holds under it. */
#objs[data-us="min"] > .obj.column.us, #usv.min {
  width: var(--us-tab) !important; min-width: 0 !important; min-height: 0 !important; border-radius: 5px 0 0 5px; clip-path: none;
  box-shadow: inset 1px 1px 0 var(--rule), var(--raise-sm);
}
#objs[data-us="min"] > .obj.column.us > .chead, #usv.min > .chead {
  height: auto; min-height: 44px; padding: 12px 0; flex-direction: column; justify-content: center; gap: 7px; border-radius: 5px 0 0 5px;
}
#objs[data-us="min"] > .obj.column.us > .chead::after, #usv.min > .chead::after { order: -1; rotate: 135deg; margin: 0 0 0 3px; }
/* On a phone (html.phone, where it is drawn at usK) it is as tall as what it holds, and the tab a finger's size. */
:where(html.phone) #objs > .obj.column.us, :where(html.phone) #usv { --us-tab: 36px; min-height: 0 !important; border-radius: 6px 0 0 6px; }
:where(html.phone) #objs[data-us="min"] > .obj.column.us > .chead, :where(html.phone) #usv.min > .chead { min-height: 58px; }
#objs[data-us="min"] > .obj.column.us .ct, #usv.min .ct, #usv.min .ccount:empty { display: none; }
#objs[data-us="min"] > .obj.column.us > .cstack, #usv.min > .cstack { display: none; }
@media (hover: hover) { #objs[data-us="min"] > .obj.column.us > .chead:hover, #usv.min > .chead:hover { background: color-mix(in srgb, var(--ink) 4%, var(--us-bg)); } }
/* Something carried over the stand-in: its well lights as an empty column's does. */
#usv.over > .cstack:empty { --dz: var(--ink-3); background-color: color-mix(in srgb, var(--ink) 4%, transparent); }
#usv.over > .cstack:empty::before { color: var(--ink-2); }
#usv.min.over > .chead { background: color-mix(in srgb, var(--ink) 6%, var(--us-bg)); }
