/* Shader showcase: full-width shader stage, intro card and controls panel. */
.playground { position: relative; overflow: hidden; background: #120F0C; border-bottom: 1px solid var(--border-soft); }
.playground__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.playground__inner {
  position: relative; max-width: var(--max); margin: 0 auto; padding: 56px 32px;
  min-height: max(620px, 72vh); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 40px;
}
.playground__intro {
  flex: 0 1 360px; display: flex; flex-direction: column; gap: 10px;
  background: rgba(23, 19, 15, 0.82); border: 1px solid var(--border); border-radius: 14px; padding: 22px;
}
.playground__intro h2 { margin-top: 0; font-size: 34px; }
.playground__intro p { margin: 0 0 6px; }
.picker { display: flex; flex-direction: column; gap: 8px; }
.playground .graph { flex: 0 1 340px; align-self: flex-end; }
.playground__intro.is-editing { flex-basis: 620px; }
.playground__editor { margin-top: 8px; }
#edit-code-button { align-self: flex-start; margin-top: 4px; }

/* Controls panel (graph nodes) */
.graph {
  flex: 0 1 340px; background: rgba(23, 19, 15, 0.86); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; font-size: 13px;
}
.node {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
}
.node label, .control__label { font-size: 12px; color: var(--muted); }
.control { display: flex; flex-direction: column; gap: 2px; }
.control__top { display: flex; justify-content: space-between; align-items: baseline; }
.node__title { display: flex; justify-content: space-between; font-weight: 600; }
.node--out { flex-direction: row; justify-content: space-between; align-items: center; background: #2A211A; border-color: var(--accent); padding: 10px 14px; font-weight: 600; }
.wire { width: 2px; height: 18px; background: var(--accent); margin-left: 24px; }
.graph input[type=range] { accent-color: var(--accent); width: 100%; height: 28px; margin: 0; cursor: pointer; }
.swatches { display: flex; gap: 8px; margin-top: 4px; }
.swatch { width: 44px; height: 44px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.swatch[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }

@media (max-width: 640px) {
  .playground__inner { padding-left: 20px; padding-right: 20px; }
}
