/* Column: a titled tray whose objects stack top to bottom at its inner width. It grows with what it holds (the drawn
   height is its minimum) and is never opened. While an object is in a column the stack lays it out, so its own canvas
   position and width are set aside; dragged out, it gets them back from where it is let go (section 17). */
.obj.column { display: flex; flex-direction: column; background: var(--tray); border-color: transparent; box-shadow: var(--sunk); }
.obj.column:focus-within:not(:has(> .chead :focus)) { border-color: transparent; box-shadow: var(--sunk); }   /* typing in a card: the halo is the card's */
.chead { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px; box-sizing: border-box; }
.ct { flex: 1; min-width: 0; font: 500 17px/22px var(--f-display); letter-spacing: -.008em; font-optical-sizing: auto; white-space: nowrap; overflow: hidden; }
.ct:not(:focus) { text-overflow: ellipsis; }
.ct[data-ph]:empty::before { color: var(--ink-q); }                 /* on the tray, the placeholder needs the darker ink */
.ccount { flex: none; font: 500 11px/1 var(--f-mono); color: var(--ink-q); font-variant-numeric: tabular-nums; }
.cstack { flex: 1 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 0 8px 8px; }
.cstack > .obj { position: relative; left: auto !important; top: auto !important; width: auto !important; max-height: none !important; flex: none; }
.cstack > .obj.header { translate: none; }
.cstack > .obj.header.cfit { min-height: 0 !important; }               /* too large for the column: shown smaller (section 17) */
.cstack > .obj.header.cfit > .hd { font-size: var(--cfs) !important; }
.cstack > .obj.image {      /* the column's width, but no taller than a picture lands (IMG_MAX, section 15); a narrow one is centred */
  width: min(100%, calc(480px * var(--ar, 1))) !important; height: auto !important; aspect-ratio: var(--ar, auto); align-self: center;
}
/* A place to drop things is framed as a selection is (#selx), by four corner marks, here in pale ink (--dz): an empty
   column's well, an upload tile, a picture waiting for its file. */
:where(.cstack:empty, .obj.upload, .obj.image.lost) { --dz: var(--rule-2); --dz-a: 10px; --dz-t: 1px; }   /* each kind sets its own after */
.cstack:empty, .obj.upload, .obj.image.lost {
  --dz-m: linear-gradient(var(--dz) 0 0);
  background-image:
    var(--dz-m), var(--dz-m), var(--dz-m), var(--dz-m), var(--dz-m), var(--dz-m), var(--dz-m), var(--dz-m);
  background-size:
    var(--dz-a) var(--dz-t), var(--dz-t) var(--dz-a), var(--dz-a) var(--dz-t), var(--dz-t) var(--dz-a),
    var(--dz-a) var(--dz-t), var(--dz-t) var(--dz-a), var(--dz-a) var(--dz-t), var(--dz-t) var(--dz-a);
  background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat; background-origin: border-box;
  transition: background-color 160ms ease-out, --dz 160ms ease-out;
}
@property --dz { syntax: "<color>"; inherits: true; initial-value: transparent; }
.cstack:empty { display: grid; place-items: center; min-height: 64px; margin: 0 8px 8px; padding: 0; border-radius: 3px; }   /* the marks' corners round as #selx's do */
.cstack:empty::before { content: "Drop items here"; font: 500 9.5px/16px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-q); }
/* Objects carried over a column: a line where they would go, or an empty column's well lights up. */
.obj.column.over { border-color: var(--ink-3); }
.obj.column.over > .cstack:empty { --dz: var(--ink-3); background-color: color-mix(in srgb, var(--ink) 4%, transparent); }
.obj.column.over > .cstack:empty::before { color: var(--ink-2); }
/* The line paints above the carried sheets (z-index 1, below): the pointer, and so a sheet, is always right on the slot.
   A halo the colour of paper keeps it clear of the writing it crosses. */
.cline { position: absolute; z-index: 2; left: 8px; right: 8px; top: 0; height: 2px; margin-top: -1px; border-radius: 1px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; transition: top 90ms ease-out; }
.cline::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; box-sizing: border-box; border: 2px solid var(--ink); border-radius: 50%; background: var(--tray); box-shadow: 0 0 0 2px var(--surface); }
/* Objects carried over a board go inside it when let go (section 17b): a card's well lights up and says so, an icon's
   tile grows toward the hand. Both stay lit (.taking) while what went in flies to its place. Going in is going down
   a level, so it is in the depth colour (section 25). */
.obj.board:not([data-view="icon"]) > .binner { transition: background-color 160ms ease-out; }
.obj.board:not([data-view="icon"]):is(.into, .taking) { border-color: var(--z); outline-color: var(--z); outline-offset: 5px; }
.obj.board:not([data-view="icon"]):is(.into, .taking) > .binner { background-color: color-mix(in srgb, var(--z) 7%, var(--canvas)); }
.obj.board:not([data-view="icon"]).into > .binner::after {
  content: "Move inside"; position: absolute; left: 50%; bottom: 10px; translate: -50% 0; padding: 6px 11px; border-radius: 8px;
  font: 500 9.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  color: #fff; background: var(--z); box-shadow: var(--raise-sm); animation: into-say 160ms ease-out;
}
:root[data-look="night"] .obj.board:not([data-view="icon"]).into > .binner::after { color: var(--canvas); }
@keyframes into-say { from { opacity: 0; scale: .9; } }
.obj.board[data-view="icon"]:is(.into, .taking) > .binner { scale: 1.1; box-shadow: var(--raise), var(--edge); outline: 1.5px solid var(--z); outline-offset: 5px; }

