/* The frame (comp A): a centred three-column working area. Below 1280 px the right column moves under the other
   two; below 900 px everything stacks. Tokens only. */

.frame {
  display: grid;
  grid-template-columns: var(--col-left) var(--col-mid) var(--col-right);
  gap: var(--s4);
  max-width: var(--frame-max);
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--s4);
  align-items: stretch;
}
.col { min-height: calc(100vh - 2 * var(--s4)); }
.col-right { display: flex; flex-direction: column; }
.col-right > .panel { flex: 1; }

/* shared skeleton shapes (loading states of every area) */
.sk-line { display: block; height: 10px; width: 100%; border-radius: 1px; }
.sk-short { width: 42%; }
.sk-tiny { width: 18%; }
.sk-num { display: block; width: 72px; height: 30px; }
.sk-field { display: block; height: 34px; margin-top: var(--s3); }
.sk-bar { display: block; height: 4px; }
.setup-fallback { display: grid; gap: var(--s2); padding: var(--s4); }

/* three columns: the inspect column stays in the viewport and scrolls inside, so a long tooltip under the
   alternatives doesn't stretch the page past the doll (about 900 px tall) */
@media (min-width: 1280px) {
  .col-right { position: sticky; top: var(--s4); align-self: start; height: calc(100vh - 2 * var(--s4)); }
  .col-right > .panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}

@media (max-width: 1279px) {
  .frame { grid-template-columns: minmax(260px, 1fr) minmax(520px, 2.1fr); }
  .col-right { grid-column: 1 / -1; }
  /* natural heights, so the alternatives sit right under the doll instead of below a full-viewport row */
  .col, .col-right > .panel { min-height: 0; }
}

@media (max-width: 899px) {
  .frame { grid-template-columns: minmax(0, 1fr); gap: var(--s3); padding: var(--s3); }
  .col { min-height: 0; }
}
