/* Color Me Style games lab: shared styles. Same tokens as the website
   (site/src/styles/global.css) so each game can move into the site unchanged. */
:root {
  --canvas: #fbfafc; --canvas-deep: #f3eff7; --panel: #ffffff; --glass: rgba(255,255,255,.64);
  --ink: #16131e; --ink-soft: #625b70; --accent: #8f21bc; --accent-hover: #6d168f; --accent-soft: #f7e9fb;
  --pink: #ed42c4; --purple: #9439ee; --lilac: #d7b6ef; --line: #e4dce9; --line-strong: #cfc3d8;
  --glass-line: rgba(110,76,130,.18); --shadow: 0 22px 58px -28px rgba(50,22,69,.32);
  --good: #0f8a5f; --warn: #b3261e;
  --font-display: 'Syne', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 5vw, 48px);
  color-scheme: light;
}
[data-theme='dark'] {
  --canvas:#0c0912; --canvas-deep:#120d1b; --panel:#181121; --glass:rgba(30,21,42,.72); --ink:#f8f4fc; --ink-soft:#beb3cb;
  --accent:#c342ef; --accent-hover:#ed55d0; --accent-soft:#2a1837; --pink:#ef58ca; --purple:#a466f6; --lilac:#d9c4fa;
  --line:#2c2338; --line-strong:#443352; --glass-line:rgba(220,190,255,.15); --shadow:0 24px 60px -26px rgba(0,0,0,.75);
  --good: #4ade9b; --warn: #ff8a80; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(circle at 88% -10%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 30%), var(--canvas);
  color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--ink-soft); font-size: .92rem; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.kicker::before { content: ''; width: 22px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #FF2E63, #FF9900, #10B981, #06B6D4, #8B5CF6); }

/* Header */
.lab-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--canvas) 80%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--glass-line); }
.lab-bar { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.lab-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.lab-brand img { height: 32px; width: auto; }
.lab-brand em { font-style: normal; color: var(--accent); }
.lab-brand small { font-family: var(--font-body); font-weight: 700; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: 99px; padding: 2px 8px; }
.lab-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lab-nav a { white-space: nowrap; text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--ink-soft); padding: 8px 10px; border-radius: 10px; }
.lab-nav a:hover, .lab-nav a[aria-current] { color: var(--ink); background: var(--accent-soft); }
.theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; flex: none; }
@media (max-width: 1180px) { .lab-nav a:not(.keep) { display: none; } }
@media (max-width: 720px) { .lab-brand small { display: none; } }

main { flex: 1; }
.page-head { padding-block: clamp(28px, 5vw, 56px) clamp(18px, 3vw, 28px); }
.page-head p.lede { margin-top: 12px; max-width: 60ch; color: var(--ink-soft); font-size: clamp(1rem, 1.6vw, 1.15rem); }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background .3s; }
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--purple), var(--pink)); box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--pink) 60%, transparent); }
.btn.ghost { background: var(--panel); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--panel); cursor: pointer; font-size: .88rem; font-weight: 600; transition: border-color .2s, background .2s, color .2s; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed='true'] { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--purple), var(--pink)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }

/* Range sliders */
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }

/* Meters */
.meter { height: 12px; border-radius: 99px; background: var(--canvas-deep); border: 1px solid var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--pink)); transition: width .6s var(--ease-out); }
.stars { font-size: 1.4rem; letter-spacing: 2px; color: var(--line-strong); }
.stars .on { color: #f5a524; }

/* "What the game can't see" and next steps (shared by all games) */
.cant-see { padding: clamp(18px, 4vw, 28px); display: grid; gap: 12px; border: 1px dashed var(--line-strong); border-radius: 22px; background: var(--canvas-deep); }
.cant-see h3 { font-size: 1.1rem; }
.cant-see ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.cant-see li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: .94rem; }
.cant-see li::before { content: '?'; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--purple), var(--pink)); }
.next-steps { padding: clamp(20px, 4vw, 32px); display: grid; gap: 10px; background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--pink) 14%, transparent), transparent 45%), var(--panel); }
.next-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.fine { font-size: .8rem; color: var(--ink-soft); }
.research { font-size: .82rem; color: var(--ink-soft); border-left: 3px solid var(--lilac); padding-left: 12px; }

/* Footer CTA */
.lab-foot { margin-top: clamp(40px, 6vw, 72px); padding-block: 32px; border-top: 1px solid var(--line); background: var(--canvas-deep); }
.lab-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.lab-foot p { color: var(--ink-soft); font-size: .9rem; }

.fade-in { animation: fadeIn .45s var(--ease-out) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
