/* O ESTÚDIO. One frame, one conveyor: all 23 faces, all the same size,
   crawling slowly clockwise around the center plate where QEVR lives with
   his playground. The chip size is solved from the viewport so a 4K monitor
   just gets bigger faces — never mismatched ones. A hand over the frame
   holds the crawl still; reduced motion turns it off.

   On a phone there are no side strips and the page NEVER scrolls: one strip
   of faces up top, one down below, each swipeable sideways and drifting
   slowly on its own; the playground sits between them. */

:root { --face-name: 20px; --chip-gap: 3px; --band-w: 160px; --band-h: 180px; --chip-w: 110px; --strip-h: 130px; }

.bar { padding-left: var(--gut); }

.studio {
  height: 100svh; padding-top: var(--bar); overflow: hidden;
  max-width: var(--wrap); margin-inline: auto;
}
.frame { position: relative; height: 100%; }

/* ---------- desktop: the conveyor lane and the plate it frames ---------- */

.lane { position: absolute; inset: 0; }
/* opaque backing for each horizontal band: the side columns pass BEHIND it,
   so they never peek through the row gaps — only in the open middle bands */
.lane__cover { position: absolute; left: 0; right: 0; height: var(--band-h); z-index: 1; background: var(--ground); pointer-events: none; }
.lane__cover--top { top: 0; }
.lane__cover--bottom { bottom: 0; }
.strip { display: none; }

.face {
  border: 0; padding: 0; background: var(--ground);
  color: inherit; font: inherit; cursor: pointer;
  display: grid; grid-template-rows: minmax(0, 1fr) var(--face-name);
}
.lane .face { position: absolute; top: 0; left: 0; will-change: transform; }
.face__art { display: grid; place-items: center; min-height: 0; min-width: 0; overflow: hidden; }
.face canvas { display: block; image-rendering: pixelated; }
.face__name {
  display: block; height: var(--face-name); padding: 0 4px; overflow: hidden;
  color: var(--qevr-muted); font-size: 9.5px; line-height: var(--face-name);
  letter-spacing: .1em; text-align: center;
  text-overflow: ellipsis; white-space: nowrap;
}
.face[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: -2px; }
.face[aria-pressed="true"] .face__name { background: var(--brand); color: var(--qevr-ink); font-weight: 700; }
.face:hover, .face:focus-visible { outline: 2px solid var(--qevr-light); outline-offset: -2px; }
.face:hover .face__name, .face:focus-visible .face__name { background: var(--qevr-light); color: var(--qevr-ink); }

/* ---------- the center cell: his playground ---------- */

.plate {
  position: absolute; z-index: 3;
  top: var(--band-h); bottom: var(--band-h);
  left: var(--band-w); right: var(--band-w);
  min-width: 0; min-height: 0; overflow: hidden;
  border: var(--rule) solid var(--qevr-hair); background: var(--qevr-ink);
  display: flex; align-items: center; justify-content: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(12px, 2vh, 24px) clamp(16px, 2.5vw, 40px);
}
.stage__art { display: grid; place-items: center; min-width: 0; min-height: 0; flex: none; }

.plate__panel { display: flex; flex-direction: column; gap: clamp(12px, 2vh, 20px); min-width: 0; width: min(46%, 380px); }
.stage__name {
  color: var(--brand); font-weight: 700;
  font-size: clamp(22px, 2.6vw, 36px); letter-spacing: .04em; line-height: 1.08;
  word-break: break-word;
}

.stage__controls { display: flex; flex-direction: column; gap: clamp(8px, 1.4vh, 14px); }
.ctlset { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ctlset__label {
  overflow: hidden; color: var(--qevr-muted); font-size: 9px;
  letter-spacing: .14em; text-overflow: ellipsis; white-space: nowrap;
}
.lbl-short { display: none; }
.ctlrow { display: flex; width: 100%; }
.stage__controls .ctl { min-width: 0; }

.stage__meta {
  padding-top: 8px; border-top: var(--rule) solid var(--qevr-hair);
  color: var(--qevr-muted); font-size: 9px; line-height: 1.4; letter-spacing: .1em;
}
.stage__meta-title { display: block; color: var(--brand); font-weight: 700; letter-spacing: .2em; margin-bottom: 3px; }

/* ---------- phone: two swipeable strips, the playground between them,
     and the page itself never scrolls ---------- */

@media (max-width: 720px) {
  .studio { height: 100svh; overflow: hidden; }
  .frame { display: flex; flex-direction: column; height: 100%; }
  .lane { display: none; }

  .strip {
    display: flex; gap: var(--chip-gap); flex: none;
    height: var(--strip-h);
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .strip::-webkit-scrollbar { display: none; }
  .strip .face { flex: none; width: var(--chip-w); height: 100%; }

  .plate {
    position: static; flex: 1 1 auto; min-height: 0;
    flex-direction: column; gap: 8px; padding: 10px 16px 12px;
    margin: var(--chip-gap) 0;
  }
  .plate__panel { width: 100%; align-items: center; text-align: center; gap: 8px; }
  .stage__name { font-size: clamp(19px, 6vw, 26px); margin-top: 2px; }
  .stage__controls { flex-direction: row; align-items: flex-end; justify-content: center; gap: 6px; width: 100%; }
  .ctlset { flex: 1 1 0; gap: 4px; }
  .ctlset--glitch { flex-grow: .8; }
  .ctlset__label { font-size: 8px; letter-spacing: .08em; text-align: center; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .stage__controls .ctl { padding: 8px 7px; font-size: 9.5px; }
  .stage__controls .ctl--swatch { gap: 0; }
  .stage__controls .ctl--swatch span { display: none; }
  .stage__controls .ctl--swatch i { width: 13px; height: 13px; }
  .stage__meta { width: 100%; padding-top: 6px; font-size: 7.5px; letter-spacing: .06em; text-align: center; }
}

@media (max-height: 719px) and (min-width: 721px) {
  .plate { padding-block: 8px; }
  .stage__name { font-size: 24px; }
  .stage__controls .ctl { padding-block: 8px; }
}
