/* E9 — Playground as one scattered sheet (Yanzi 2026-11-27, after asano-ishida-otsubo.jp).
   White page, scrolls down. 4 / 3 / 2 columns; each column is cut into 5 slots and a piece takes
   2–5 of them, so the sizes and places differ. Its number (Space Mono, the site's label font) sits on top
   of each piece. Hover: the image goes, a light grey block with the name + year stays. */


.sc {
  --n: 4;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  column-gap: var(--m, 24px); align-items: start;
  padding: 28px var(--m, 24px) 120px;
}
.sc-col { display: flex; flex-direction: column; min-width: 0; }

/* a piece: placed on the column's 5 slots */
.sc-item {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 10px;
  margin-top: calc(56px + var(--gap, 0px));
  opacity: 0; transition: opacity .9s ease;
}
.sc-col > :first-child { margin-top: 0; }
.sc-item.in, .sc-card.in { opacity: 1; }
.sc-hit { grid-column: var(--s) / span var(--w); display: block; width: 100%; text-align: left; cursor: pointer; }

.sc-code {
  display: block; margin: 0 0 4px;
  font: 400 22px/0.92 var(--mono, "Space Mono", ui-monospace, Menlo, monospace); letter-spacing: .02em; color: #000;
}

.sc-img { position: relative; display: block; aspect-ratio: var(--r, 1); background: #fff; }
.sc-img > img, .sc-img > video, .sc-img > .pg-seq { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.sc-img.ok > img, .sc-img.ok > video, .sc-img.ok > .pg-seq { opacity: 1; }
/* loading: a small black square, as on the reference */
.sc-img::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 7px; height: 7px; background: #000;
  transition: opacity .3s;
}
.sc-img.ok::before { opacity: 0; }
/* a tilted piece (`tilt` in playground.js): only the image turns, its number stays straight */
.sc-item.tilt .sc-img { transform: rotate(var(--t)); }
.sc-item.tilt .sc-code { margin-bottom: 18px; }

/* hover: the image goes, a light grey block with the name + year stays */
.sc-hover {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 8px 10px; background: #e6e6e6; color: #000;
  font: 400 13px/1.3 var(--sans); opacity: 0; transition: opacity .15s;
}
.sc-hover span:last-child { font-family: var(--mono, "Space Mono", ui-monospace, Menlo, monospace); }
.sc-hit:hover .sc-hover, .sc-hit:focus-visible .sc-hover { opacity: 1; }
.sc-hit:focus-visible { outline: 1px solid #000; outline-offset: 4px; }

/* the opening card: tilted, pale */
.sc-card {
  width: 78%; aspect-ratio: 0.72; margin: 18px 0 30px 4%; padding: 28px 26px;
  background: #dfeaf7; transform: rotate(-12deg);
  opacity: 0; transition: opacity .9s ease;
}
.sc-card p { margin: 0; }
.sc-card-n { font: 400 18px/0.92 var(--mono, "Space Mono", ui-monospace, Menlo, monospace); }
.sc-card-t { margin-top: 26px !important; font: 400 20px/1.2 var(--sans); }
.sc-card-s { margin-top: 26px !important; font: 400 13px/1.45 var(--sans); }

@media (max-width: 760px) {
  .sc { column-gap: 16px; padding-top: 20px; }
  .sc-item { margin-top: calc(36px + var(--gap, 0px) * .5); column-gap: 6px; }
  .sc-code { font-size: 17px; }
  .sc-card { width: 92%; padding: 18px 16px; }
  .sc-card-t { font-size: 16px; margin-top: 16px !important; }
  .sc-card-s { font-size: 12px; margin-top: 16px !important; }
  .sc-key { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-item, .sc-card { opacity: 1; transition: none; }
}
