/* Kwantum Learning support activities: shared look. Calm colours, big targets, light and dark, no motion when asked. */
:root {
  --bg: #F6F4EF; --surface: #FFFFFF; --ink: #15192A; --muted: #4E5468; --line: #DCD8CE; --chip: #ECE8DF;
  --accent: #0F766E; --accent-ink: #FFFFFF; --good: #15803D; --warm: #B45309; --focus: #15192A; --shadow: 0 2px 0 rgba(0,0,0,.06), 0 8px 24px rgba(20,20,40,.06);
  --r: 16px; --font: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F131C; --surface: #171D2A; --ink: #ECEFF5; --muted: #A9B1C3; --line: #2A3346; --chip: #212A3B;
    --accent: #2DD4BF; --accent-ink: #062A26; --good: #4ADE80; --warm: #FBBF24; --focus: #FFFFFF; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F131C; --surface: #171D2A; --ink: #ECEFF5; --muted: #A9B1C3; --line: #2A3346; --chip: #212A3B;
  --accent: #2DD4BF; --accent-ink: #062A26; --good: #4ADE80; --warm: #FBBF24; --focus: #FFFFFF; --shadow: none; color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.5; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 4px solid #FFD400; outline-offset: 2px; box-shadow: 0 0 0 7px #111; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { max-width: 1060px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-left)) 60px; }
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.top h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.top .sub { color: var(--muted); font-size: 15px; }
.top .grow { flex: 1; }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 6px 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 17px; text-decoration: none; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 15px; border-radius: 11px; }
.btn.ghost { background: transparent; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn svg { width: 20px; height: 20px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.tabs button { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; font-size: 16px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.pick { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.pick:hover { border-color: var(--ink); }
.pick b { font-size: 20px; }
.pick small { color: var(--muted); font-size: 15px; line-height: 1.35; }
.pick .ic { width: 54px; height: 54px; }

/* settings sheet (adult settings) */
.set { margin-top: 18px; }
.set summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.set summary::-webkit-details-marker { display: none; }
.set[open] summary { margin-bottom: 12px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: 0; }
.opt .l { font-weight: 600; }
.opt .h { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; background: var(--chip); padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: transparent; min-height: 42px; padding: 0 13px; border-radius: 9px; font-weight: 600; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* full-screen play area (dark on purpose: bright things on black are easiest to see) */
.stage { position: fixed; inset: 0; background: #000; color: #fff; z-index: 50; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.leave { position: absolute; left: 0; top: 0; width: 96px; height: 96px; z-index: 3; }
.leave svg { position: absolute; left: 14px; top: 14px; opacity: .25; }
.leave.on svg { opacity: 1; }
.hud { position: absolute; right: 14px; bottom: 12px; color: rgba(200,200,200,.6); font-size: 14px; z-index: 2; pointer-events: none; }

.note { color: var(--muted); font-size: 15px; line-height: 1.45; }
.tip { background: var(--chip); border-radius: 14px; padding: 12px 16px; font-size: 15px; color: var(--muted); line-height: 1.45; }
.tip b { color: var(--ink); }
.done-msg { font-weight: 700; color: var(--good); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .noprint, .top .who, .set, .tabs { display: none !important; }
  .card { box-shadow: none; border-color: #999; }
}
