/* E6 — Playground cloud (the E2–E5 homepage archive, now with the experiments).
   Fills the screen between the label row and the contact strip; images drift in 3D, black and
   white at rest, colour under the mouse; a black dot is the cursor. */

.pg [hidden] { display: none !important; }

/* label row: hint (cloud) or filters (grid) on the left · count · Cloud / Grid on the right */
.pg-hint { color: #8a8a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-viewsw { display: flex; gap: 6px; color: #8a8a8a; }
.pg-viewsw button { font: inherit; color: #8a8a8a; padding: 0; transition: color .2s; }
.pg-viewsw button:hover { color: #000; }
.pg-viewsw button[aria-pressed="true"] { color: #000; font-weight: 500; }
@media (max-width: 700px) { .pg-count { display: none; } .pg-viewsw { margin-left: auto; } }

/* the scene: the screen minus nav bar (96 + 1), label row (48 + 1) and contact strip (44 + 1) */
.cl {
  position: relative; height: calc(100svh - 191px); min-height: 420px; overflow: hidden;
  display: grid; place-items: center;
  perspective: 1500px; perspective-origin: 50% 50%;
  cursor: none; touch-action: pan-y; user-select: none;
  /* images fade out near the lines instead of being cut by them */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
}
@media (max-width: 700px) { .cl { height: calc(100svh - 163px); } }
.cl-track { position: relative; width: 0; height: 0; transform-style: preserve-3d; --w: 17vw; }
@media (max-width: 900px) { .cl-track { --w: 40vw; } }
.cl-track .img {
  position: absolute; left: 0; top: 0; display: block; padding: 0; border: 0;
  /* same area for every shape: wide frames get wider, tall frames taller (--sq = √ratio) */
  width: calc(var(--w) * var(--sq, 1)); height: calc(var(--w) / var(--sq, 1));
  margin-left: calc(var(--w) * var(--sq, 1) / -2); margin-top: calc(var(--w) / var(--sq, 1) / -2);
  background: hsl(0 0% var(--tone, 86%));
  filter: grayscale(1); transition: filter .35s ease;
  transform-style: preserve-3d; will-change: transform; overflow: hidden; cursor: none;
}
.cl-track .img > img, .cl-track .img > video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cl-track .img.kin { filter: grayscale(.5); }
.cl-track .img.hot { filter: none; }
.cl-track .img.is-empty { cursor: default; }
.cl-track .img:focus-visible { outline: 4px solid #000; outline-offset: 4px; filter: none; }

/* name by the cursor */
.cl-tip {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  font: 500 14px/1 var(--sans); white-space: nowrap; color: #000;
  opacity: 0; transition: opacity .2s;
}
.cl-tip.on { opacity: 1; }
.cl-tip .tip-y { color: #888; }
/* black dot cursor (mouse only) */
.cl-cursor {
  position: fixed; left: 0; top: 0; z-index: 41; pointer-events: none;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #000; opacity: 0; transition: opacity .2s, width .25s, height .25s, margin .25s;
}
.cl:hover .cl-cursor { opacity: 1; }
.cl-cursor.big { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
@media (hover: none) { .cl, .cl-track .img { cursor: auto; } .cl-cursor { display: none; } }

/* Yanzi (2026-11-08): the pieces are in colour all the time (no black-and-white at rest) */
.cl-track .img, .cl-track .img.kin, .cl-track .img.hot { filter: none; }
.cl-track .img.is-empty { filter: none; }

/* a piece with several images: they sit on top of each other and cross-fade every 3 s (cloud.js) */
.cl-seq { position: absolute; inset: 0; display: block; }
.cl-seq > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.cl-seq > img.on { opacity: 1; }

/* Yanzi 2026-11-13: the whole cloud a little bigger */
.cl-track { --w: 21vw; }
@media (max-width: 900px) { .cl-track { --w: 46vw; } }
/* E9 (Yanzi 2026-11-28): Sheet / Cloud switch always on the right; in Cloud the hint takes the left */
.pg-label .pg-hint:not([hidden]) { margin-right: auto; }
.pg-label .pg-viewsw { gap: 6px; }
