/* Indeling voor de labpagina's en de spellen. Kop, footer en breedte komen uit /site.css. */
:root { --ok: #15803d; }
.lab-main {
  padding-block: clamp(28px, 5vw, 56px) clamp(48px, 7vw, 88px);
  display: flex; flex-direction: column; gap: 28px;
}
.lab-main > * { max-width: 860px; }
.lab-main.game-page > * { max-width: 1032px; }
.lab-main > .stage.is-full { max-width: none; }
h1, h2, h3 { font-weight: 800; margin: 0; letter-spacing: -0.045em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.02; letter-spacing: -0.07em; }
h1 em { font-style: normal; color: var(--primary); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); letter-spacing: -0.05em; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; max-width: 64ch; color: var(--muted); }
.lab-main > header { display: flex; flex-direction: column; gap: 12px; }
.lab-main > header .kicker { margin: 0; }
.lab-main > header > p { font-size: clamp(1rem, 1.5vw, 1.12rem); }
.back { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin-block: -10px -4px; color: var(--primary); font-size: 0.9rem; font-weight: 750; text-decoration: none; }
.back:hover { text-decoration: underline; text-underline-offset: 0.22em; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: clamp(16px, 3vw, 24px); display: flex; flex-direction: column; gap: 12px;
}
.card ul { margin: 0; padding-left: 1.1em; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Meetwaarden */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.stat .label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .value.big { color: var(--primary); }
.stat .hint { font-size: 0.78rem; color: var(--muted); }

/* Instellingen */
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 20px; }
.control { display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; font-weight: 600; }
.control .row { display: flex; justify-content: space-between; gap: 8px; }
.control output { color: var(--muted); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--primary); min-height: 32px; }
input[type="text"], select {
  font: inherit; font-weight: 500; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--ink); min-height: 44px; width: 100%;
}
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; min-height: 44px; }
label.check input { width: 18px; height: 18px; accent-color: var(--primary); }

.stage {
  position: relative; background: var(--court); border-radius: 14px; overflow: hidden;
  aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.stage canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.stage .placeholder[hidden] { display: none; }
.stage .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--court-muted); font-weight: 600; text-align: center; padding: 20px; }

.notice { white-space: pre-line; border-left: 2px solid #f59e0b; padding: 2px 0 2px 12px; color: #78350f; font-size: 0.92rem; }
.notice:empty { display: none; }
.small { font-size: 0.85rem; color: var(--muted); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); font-weight: 600; font-size: 0.88rem;
}
.swatch::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,0.12); }
.swatch[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-50); }

.list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 252px), 1fr)); gap: 14px; }
.list a.card { text-decoration: none; color: inherit; transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s, border-color 0.2s; }
.list a.card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 20px 34px -26px rgb(40 23 71 / 60%); }
.list a.card h3 { font-size: 1.2rem; }
.tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.tag.idea { color: var(--muted); }

.lab-group { display: grid; gap: 12px; }
.disclosure summary { min-height: 44px; margin-block: -6px; padding-block: 9px; color: var(--primary); cursor: pointer; font-weight: 800; }
.disclosure[open] summary { margin-bottom: 12px; }
.disclosure .card + .card { margin-top: 12px; }
.tip { padding: 14px 18px; border-radius: 14px; background: var(--primary-50); color: var(--primary-700); font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
