/* ═══════════════════════════════════════════
   PLATFORM · WEAVE: the box the live RRRz is drawn in (js/platform/rrrz-weave.js)

   Loaded by the two pages that show the RRRz study: the home's RRRz row
   and /dream's head. The layout is CSS's: the host sets the room the
   cloth runs in, the mark box sets where the knit lands, so the mark's
   left edge sits on the column's left edge like any line of type. The
   canvas covers the host; the knit picture underneath stands only when
   the script does not run.

   The machine's ground is black in both rooms (the app's glass), so in
   the light room the host carries the ground; in the dark one it is the
   page and there is no box.
   ═══════════════════════════════════════════ */
:root {
    --weave-mark: 62%;            /* the mark's width in its host */
    --weave-ratio: 57 / 45;       /* the knit RRRz's own box (ClothZ.shapes(.rrrz)) */
    --weave-head: 14%;            /* the cloth above the mark */
}

/* :where() so a page's own sizing of its host always wins */
:where([data-weave]) {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    aspect-ratio: 4 / 3;
}
[data-weave] .weave-mark {
    position: absolute;
    left: 0;
    top: var(--weave-head);
    width: var(--weave-mark);
    aspect-ratio: var(--weave-ratio);
    pointer-events: none;
}
[data-weave] .weave-cv { position: absolute; inset: 0; pointer-events: none; }
[data-weave] .weave-still {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 0 50%;
}
[data-weave].live .weave-still { visibility: hidden; }
[data-theme="light"] :where([data-weave]) { background: hsl(var(--ground-000)); }
