/* cooldown.css — the Cool-Down Corner: the hub and its four activities.
   Sits on readflexes.css (tokens, rf-door, rf-btn). Full-bleed: an activity
   fills the viewport under one slim bar. Dark by default; :root.light-mode
   is the site's light theme. */

[hidden] { display: none !important; }

body.cd {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  --cd-surface: #1b1f3d;
  --cd-surface-2: #252a52;
  --cd-edge: rgba(255, 255, 255, 0.14);
  --cd-ink: #f3f5ff;
  --cd-soft: #b6bfdc;
  --cd-accent: #4df0ff;
  --cd-on-accent: #06232b;
}
:root.light-mode body.cd {
  --cd-surface: #ffffff;
  --cd-surface-2: #eef1fb;
  --cd-edge: rgba(13, 13, 43, 0.16);
  --cd-ink: #16163a;
  --cd-soft: #4d5568;
  --cd-accent: #0e7490;
  --cd-on-accent: #ffffff;
}

/* A page where a drag is the input does not scroll under the finger. */
html.cd-locked, html.cd-locked body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.cd-locked body.cd { height: 100dvh; min-height: 0; }

/* ── the top bar ─────────────────────────────────────────────────────────── */
.cd-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px clamp(8px, 1.6vw, 20px);
  background: var(--cd-surface);
  border-bottom: 1px solid var(--cd-edge);
  color: var(--cd-ink);
  position: relative;
  z-index: 20;
}
.cd-title {
  margin: 0;
  font: 800 1.15rem/1.1 var(--font-heading);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 auto;
}
.cd-bar-extra { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; }
.cd-btn {
  flex: 0 0 auto;
  min-width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  padding: 0 10px;
  font: 800 1.1rem/1 var(--font-body);
  color: var(--cd-ink);
  background: var(--cd-surface-2);
  border: 1px solid var(--cd-edge);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.cd-btn:hover { border-color: var(--cd-accent); }
.cd-btn:focus-visible, .cd-tool:focus-visible, .cd-pad:focus-visible { outline: 3px solid var(--cd-accent); outline-offset: 2px; }
.cd-clock {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: center;
  font: 800 1.15rem/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--cd-surface-2);
  border: 1px solid var(--cd-edge);
  color: var(--cd-ink);
}
.cd-clock:empty { display: none; }
.cd-clock.low { border-color: #ff9900; color: #ff9900; }
:root.light-mode .cd-clock.low { color: #b45309; border-color: #b45309; }
.cd-lang { flex: 0 0 auto; position: relative; }
.cd-lang .rf-lang-btn { height: 44px; }
@media (max-width: 620px) {
  .cd-title-text, .cd-lang .rf-lang-name { display: none; }
  .cd-bar { gap: 6px; }
  .cd-btn { padding: 0 6px; }
}
/* A 360px phone has room for every control only if each gives a little: the
   balance chip (Flex Funds) made the bar six controls wide, and the language
   button was the one pushed off the edge. */
@media (max-width: 420px) {
  .cd-bar { gap: 4px; padding-inline: 6px; }
  .cd-btn { min-width: 38px; height: 40px; padding: 0 4px; font-size: 1rem; }
  .cd-clock { min-width: 52px; padding: 10px 6px; font-size: 1rem; }
  .cd-balance { padding-inline: 8px; font-size: 0.95rem; }
  .cd-lang .rf-lang-btn { height: 40px; padding-inline: 8px; }
  .cd-bar-extra { gap: 4px; }
}

/* ── the stage ───────────────────────────────────────────────────────────── */
.cd-stage {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--cd-ink);
}
body.cd-ended .cd-stage, body.cd-gated .cd-stage { pointer-events: none; }
/* A drag on an activity is play, never a text selection. */
body.cd-play { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* ── Time's up ───────────────────────────────────────────────────────────── */
.cd-end {
  position: fixed; inset: 0; z-index: 9500;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(8, 10, 26, 0.78);
}
.cd-end-card {
  width: min(460px, 100%);
  background: var(--cd-surface);
  color: var(--cd-ink);
  border: 1px solid var(--cd-edge);
  border-radius: 22px;
  padding: clamp(20px, 5vw, 36px);
  text-align: center;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.cd-end-emoji { font-size: 3.4rem; line-height: 1; }
.cd-end-card h2 { margin: 0; font: 800 2rem/1.1 var(--font-heading); letter-spacing: 0; color: inherit; text-transform: none; }
.cd-end-card p { margin: 0; font-size: 1.1rem; color: var(--cd-soft); }
.cd-end-extra { font-weight: 800; }
.cd-end-hub { margin-top: 8px; font-size: 1.1rem; }
.cd-end-unlock { margin-top: 8px; font-size: 1.1rem; }

/* ── the gate: unlock with Flex Funds, or a free try ─────────────────────── */
.cd-gate { z-index: 9400; background: rgba(8, 10, 26, 0.62); }
.cd-gate .cd-end-card { gap: 10px; }
.cd-gate .cd-end-card:focus { outline: none; }
.cd-gate-btn { width: 100%; justify-content: center; font-size: 1.08rem; min-height: 48px; cursor: pointer; }
.cd-gate-btn:disabled { opacity: 0.6; cursor: default; }
.cd-gate-funds { font: 800 1.15rem/1.2 var(--font-body); color: var(--cd-ink) !important; }
.cd-gate-note { font-size: 0.98rem !important; min-height: 1.4em; }
.cd-gate-hub { color: var(--cd-soft); font-weight: 700; margin-top: 4px; }
.cd-balance {
  flex: 0 0 auto;
  font: 800 1.05rem/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--cd-surface-2);
  border: 1px solid #c79a00;
  color: var(--cd-ink);
  white-space: nowrap;
}
body.cd-preview .cd-clock { border-color: var(--cd-accent); }
.cd-hub-funds { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 clamp(14px, 2vw, 22px); padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cd-hub-funds strong { font: 800 1.35rem/1.1 var(--font-heading); }
.cd-hub-funds span { color: var(--muted); flex: 1 1 260px; }
.cd-hub-funds .rf-btn { cursor: pointer; }

/* ── the hub ─────────────────────────────────────────────────────────────── */
.cd-hub { padding: clamp(16px, 3vw, 40px) clamp(12px, 3vw, 44px) 96px; color: var(--text); }
.cd-hub-head { margin: 0 0 clamp(16px, 2.4vw, 28px); }
.cd-hub-head h1 { margin: 6px 0 8px; font: 800 clamp(2rem, 5vw, 3.2rem)/1.05 var(--font-heading); letter-spacing: 0; }
.cd-hub-head p { margin: 0; font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.cd-hub-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px clamp(12px, 3vw, 44px); border-bottom: 1px solid var(--line); }
.cd-hub-nav .cd-spacer { flex: 1; }
.cd-hub-nav a.cd-home { color: var(--text); font-weight: 800; text-decoration: none; }
.cd-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
@media (max-width: 1100px) { .cd-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cd-doors { grid-template-columns: 1fr; } }
@media (min-width: 769px) {
  .cd-doors .rf-door-title { font-size: 1.5rem; }
  .cd-doors .rf-door-line { font-size: 1.05rem; }
}

/* ── shared tool buttons ─────────────────────────────────────────────────── */
.cd-tool {
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 10px;
  font: 700 0.95rem/1.1 var(--font-body);
  color: var(--cd-ink);
  background: var(--cd-surface-2);
  border: 1.5px solid var(--cd-edge);
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.cd-tool[aria-pressed="true"], .cd-tool.on { border-color: var(--cd-accent); box-shadow: 0 0 0 2px var(--cd-accent) inset; }
.cd-tool:disabled { opacity: 0.4; cursor: default; }
.cd-tool .cd-ico { font-size: 1.25rem; line-height: 1; }

/* ── Art Studio ──────────────────────────────────────────────────────────── */
.art { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: 268px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.art-tools {
  background: var(--cd-surface);
  border-right: 1px solid var(--cd-edge);
  padding: 8px 10px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 7px;
}
.art-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.art-group .cd-tool { min-width: 0; justify-content: flex-start; }
.art-group .cd-tool .cd-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.art-group--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.art-group--4 .cd-tool { justify-content: center; padding: 6px 2px; }
.art-group--4 .cd-tool .cd-ico { font-size: 1.05rem; white-space: nowrap; }
.art-tools .cd-tool { min-height: 40px; }
.art-group--4 .cd-tool .cd-lbl { display: none; }
.art-g-keep .cd-tool:last-child { grid-column: 1 / -1; }
.art-group--wrap { display: flex; flex-wrap: wrap; }
.art-group-label { grid-column: 1 / -1; flex: 1 0 100%; font: 800 0.75rem/1 var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--cd-soft); margin: 2px 0 0; }
.art-size i { display: block; border-radius: 50%; background: currentColor; }
.art-sw { width: 36px; height: 36px; min-width: 0; min-height: 0; flex: 0 0 36px; padding: 0; border-radius: 50%; border: 2px solid var(--cd-edge); cursor: pointer; }
.art-sw[aria-pressed="true"] { border-color: var(--cd-ink); box-shadow: 0 0 0 3px var(--cd-accent); }
.art-wheel { width: 44px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; }
.art-stage { position: relative; min-width: 0; min-height: 0; background: var(--cd-surface-2); display: grid; place-items: center; overflow: hidden; }
.art-paper { position: relative; background: #fff; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35); touch-action: none; }
.art-paper canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#art-canvas, #art-pixel { touch-action: none; cursor: crosshair; }
#art-lines { pointer-events: none; }
#art-pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.art-paper.pixel {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.09) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 0, 0, 0.09) 1px, transparent 1px);
  background-size: calc(100% / var(--n, 32)) calc(100% / var(--n, 32));
}
.art-panel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  max-height: 62%;
  background: var(--cd-surface);
  border-top: 1px solid var(--cd-edge);
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
}
.art-panel-head { display: flex; align-items: center; gap: 10px; }
.art-panel-head h2 { margin: 0; flex: 1; font: 800 1.1rem/1.2 var(--font-heading); letter-spacing: 0; color: inherit; text-transform: none; }
.art-panel p { margin: 0; color: var(--cd-soft); font-size: 0.92rem; }
.art-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.art-thumb { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.art-thumb > button.art-pic { width: 112px; height: 84px; padding: 0; border-radius: 10px; border: 2px solid var(--cd-edge); background: #fff center/contain no-repeat; cursor: pointer; }
.art-thumb > button.art-pic.small { width: 76px; height: 76px; }
.art-thumb > button.art-pic:hover { border-color: var(--cd-accent); }
.art-thumb-row { display: flex; gap: 4px; }
.art-thumb-row .cd-tool { flex: 1; min-width: 0; min-height: 36px; padding: 4px; }
.art-toast {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6;
  background: var(--cd-surface); color: var(--cd-ink);
  border: 1px solid var(--cd-edge); border-radius: 999px; padding: 8px 16px; font-weight: 800;
  pointer-events: none;
}
.art-confirm { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(8, 10, 26, 0.6); }
.art-confirm > div { background: var(--cd-surface); border: 1px solid var(--cd-edge); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: 90%; }
.art-confirm p { margin: 0; font: 800 1.15rem/1.3 var(--font-body); }
.art-confirm .art-group { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .art { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  /* Four rows under the paper: mode + size, the brushes, symmetry + the
     picture's buttons, the colours. Each row scrolls sideways on its own. */
  .art-tools { order: 2; border-right: 0; border-top: 1px solid var(--cd-edge); padding: 6px 8px; gap: 6px 14px; max-height: 44dvh; flex-direction: row; flex-wrap: wrap; }
  .art-g-mode, .art-g-size, .art-g-sym { flex: 0 0 auto; max-width: 100%; }
  .art-g-mode { order: 1; } .art-g-size { order: 1; }
  .art-g-tools { order: 2; flex: 1 0 100%; }
  .art-g-sym { order: 3; }
  .art-g-pic { order: 3; flex: 0 0 auto; max-width: 100%; }
  .art-g-keep { order: 3; flex: 1 1 0; min-width: 0; }
  .art-g-colour { order: 4; flex: 1 0 100%; }
  .art-group, .art-group--4, .art-group--wrap { display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .art-group::-webkit-scrollbar { display: none; }
  .art-group .cd-tool { flex: 0 0 auto; min-width: 44px; min-height: 44px; }
  .art-group-label { display: none; }
  .cd-tool .cd-lbl { display: none; }
}

/* ── Bubble Wrap ─────────────────────────────────────────────────────────── */
.bubbles { flex: 1 1 0; min-height: 0; position: relative; background: #cfe9f7; }
:root:not(.light-mode) .bubbles { background: #16284a; }
#bubble-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; }
.cd-count { font-variant-numeric: tabular-nums; }

/* ── Fidget Board ────────────────────────────────────────────────────────── */
.fidget { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 16px); padding: clamp(8px, 1.2vw, 16px); }
.toy {
  min-width: 0; min-height: 0;
  background: var(--cd-surface);
  border: 1px solid var(--cd-edge);
  border-radius: 18px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.toy h2, .toy-foot { flex: 0 0 auto; }
.toy h2 { margin: 0; padding: 10px 14px 0; font: 800 1.05rem/1.2 var(--font-heading); letter-spacing: 0; color: var(--cd-soft); text-transform: none; }
.toy-body { flex: 1 1 0; min-height: 0; position: relative; display: grid; place-items: center; padding: 8px; }
.toy-body canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.toy-surface { touch-action: none; }
.spinner { width: min(72%, 240px); aspect-ratio: 1; touch-action: none; cursor: grab; will-change: transform; }
.spinner svg { width: 100%; height: 100%; display: block; }
.switches { display: grid; grid-template-columns: repeat(3, auto); gap: clamp(10px, 2vw, 22px) clamp(14px, 3vw, 30px); place-items: center; }
.fsw { width: 76px; height: 42px; border-radius: 999px; border: 2px solid var(--cd-edge); background: var(--cd-surface-2); position: relative; cursor: pointer; padding: 0; transition: background 0.12s; }
.fsw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 32px; height: 32px; border-radius: 50%; background: var(--cd-ink); transition: transform 0.12s; }
.fsw[aria-pressed="true"] { background: #2fbf71; }
.fsw[aria-pressed="true"]::after { transform: translateX(34px); }
.fbtn { width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; background: var(--b, #ff4d6d); box-shadow: 0 7px 0 rgba(0, 0, 0, 0.35); transition: transform 0.05s, box-shadow 0.05s; }
.fbtn:active, .fbtn.down { transform: translateY(6px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.sliders { width: 86%; display: flex; flex-direction: column; gap: clamp(14px, 3vh, 28px); }
.sliders input[type="range"] { width: 100%; height: 44px; margin: 0; accent-color: var(--cd-accent); touch-action: none; cursor: pointer; }
.clickpen { position: absolute; top: 8%; bottom: 10%; left: 50%; transform: translateX(-50%); max-height: 300px; margin: auto 0; aspect-ratio: 60 / 220; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
.clickpen svg { height: 100%; width: 100%; display: block; overflow: visible; }
.clickpen .nib { transition: transform 0.07s; }
.clickpen .cap { transition: transform 0.07s; }
.clickpen[aria-pressed="true"] .nib { transform: translateY(16px); }
.clickpen[aria-pressed="true"] .cap { transform: translateY(8px); }
.toy-foot { padding: 0 14px 10px; display: flex; gap: 8px; align-items: center; justify-content: space-between; color: var(--cd-soft); font-weight: 700; font-size: 0.92rem; min-height: 30px; }
.toy-foot .cd-tool { min-height: 34px; padding: 4px 10px; }
.fidget-nav { display: none; }
@media (max-width: 860px) {
  .fidget { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 10px; overscroll-behavior: contain; scrollbar-width: none; }
  .fidget::-webkit-scrollbar { display: none; }
  .toy { flex: 0 0 86%; scroll-snap-align: center; }
  .fidget-nav { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 12px; padding: 6px 10px 12px; }
  .fidget-dots { display: flex; gap: 7px; }
  .fidget-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--cd-edge); }
  .fidget-dots i.on { background: var(--cd-accent); }
}
@media (prefers-reduced-motion: reduce) {
  .fsw, .fsw::after, .fbtn, .clickpen .nib, .clickpen .cap { transition: none; }
  .fidget { scroll-behavior: auto; }
}

/* ── Sound Effects ───────────────────────────────────────────────────────── */
.sounds { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: clamp(8px, 1.2vw, 16px); overflow-y: auto; }
.sound-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sound-bar .sound-status { font-weight: 800; color: var(--cd-soft); min-height: 1.2em; }
.pads { flex: 1 1 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: minmax(84px, 1fr); gap: clamp(6px, 1vw, 14px); }
@media (max-width: 900px) { .pads { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pads { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(92px, 1fr); } }
.cd-pad {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 4px;
  border: 0; border-radius: 18px;
  background: hsl(var(--h, 200) 62% 42%);
  color: #fff;
  font: 800 clamp(0.85rem, 1.5vw, 1.1rem)/1.15 var(--font-body);
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 0 hsl(var(--h, 200) 62% 26%);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.cd-pad .pad-emoji { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1; }
.cd-pad .pad-key { position: absolute; top: 6px; right: 8px; font: 800 0.75rem/1 var(--font-body); opacity: 0.85; text-transform: uppercase; background: rgba(0, 0, 0, 0.28); border-radius: 6px; padding: 3px 6px; }
.cd-pad.hit { transform: translateY(5px); box-shadow: 0 1px 0 hsl(var(--h, 200) 62% 26%); filter: brightness(1.2); }
@media (hover: none) { .cd-pad .pad-key { display: none; } }

/* ── the Zen Garden and the Marble Run (2026-11-17) ───────────────────────── */
/* One shape for both: a wrapping row of tools, a one-line hint, the canvas. */
.toy-page { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.toy-bar {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px clamp(8px, 1.2vw, 16px);
  background: var(--cd-surface);
  border-bottom: 1px solid var(--cd-edge);
}
.toy-bar .cd-tool { min-height: 40px; }
.toy-hint { flex: 0 0 auto; margin: 0; padding: 4px clamp(8px, 1.2vw, 16px); font: 600 0.9rem/1.3 var(--font-body); color: var(--cd-soft); background: var(--cd-surface); }
.toy-page canvas { flex: 1 1 0; min-height: 0; width: 100%; display: block; touch-action: none; cursor: crosshair; }
.zen-count { margin-left: auto; font: 800 1rem/1 var(--font-body); color: var(--cd-ink); padding: 0 6px; }
@media (max-width: 768px) {
  /* on a phone the labels go and the icons stay, so the row fits in two lines */
  .toy-bar .cd-tool .cd-lbl { display: none; }
  .toy-bar .cd-tool { min-width: 44px; padding: 6px; }
  .toy-hint { font-size: 0.82rem; }
}

/* Warm workshop materials; decorative layers never receive pointer input. */
body.cd { --cd-surface: #272c35; --cd-surface-2: #343b46; --cd-accent: #f0c582; --cd-on-accent: #302316; }
:root.light-mode body.cd { --cd-surface: #fffaf1; --cd-surface-2: #f1e8d9; --cd-accent: #85602d; --cd-on-accent: #fff; }
.toy, .sounds, .bubbles { background-image: var(--cd-grain); }
.toy { box-shadow: inset 0 1px 0 #ffffff20, 0 4px 12px #00000012; }
.art-paper:not(.pixel)::after { content: ''; position: absolute; inset: 0; background: var(--cd-grain); opacity: .55; mix-blend-mode: multiply; pointer-events: none; }
.fsw { box-shadow: inset 0 3px 5px #0006, 0 1px 0 #fff3; }
.fsw::after { background: linear-gradient(145deg, #fff5e1, #b5a899); box-shadow: inset 0 1px 2px #fff, 1px 3px 4px #0007; }
.fbtn { background-image: radial-gradient(ellipse at 30% 18%, #ffffff77, transparent 65%); border: 1px solid #ffffff44; }
.sliders input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 8px; background: linear-gradient(#0007,#ffffff20); box-shadow: inset 0 2px 3px #0008; }
.sliders input[type=range]::-webkit-slider-thumb { margin-top: -3px; }
.spinner { position: relative; filter: drop-shadow(3px 7px 3px #0004); }
.spinner svg { position: relative; z-index: 1; }
.spinner::before, .spinner::after { content: ''; position: absolute; inset: 0; background: conic-gradient(from 15deg, transparent, #dae6e988, transparent 18%, #dae6e988 32%, transparent 48%, #dae6e988 65%, transparent 82%); border-radius: 50%; opacity: var(--spin-blur,0); pointer-events: none; }
.spinner::after { transform: rotate(14deg); }
.cd-pad { overflow: hidden; background-image: radial-gradient(ellipse at 20% 0, #ffffff55, transparent 65%); border: 1px solid #ffffff38; box-shadow: inset 0 2px 0 #ffffff50, inset 0 -3px 8px #0003, 0 6px 0 hsl(var(--h,200) 45% 23%), 0 10px 12px #0002; }
.cd-pad::after { content: ''; pointer-events: none; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px; border: 2px solid #fff9; border-radius: 50%; opacity: 0; }
.cd-pad.hit { box-shadow: inset 0 0 24px #ffffff88, 0 1px 0 hsl(var(--h,200) 45% 23%); }
.cd-pad.hit::after { animation: pad-ripple .42s ease-out; }
@keyframes pad-ripple { from { transform: scale(.2); opacity: .9; } to { transform: scale(8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cd-pad.hit { transform: none; }
  .cd-pad.hit::after { animation: none; }
  .spinner::before, .spinner::after { display: none; }
}
.zen { position: relative; overflow: hidden; }
.zen-petal { position: absolute; top: 0; width: 10px; height: 6px; border-radius: 85% 15% 80% 20%; background: #d9a298; box-shadow: inset 1px 1px 0 #ffe4d0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .zen-petal { display: none; } }
.cd-puffs { position: fixed; overflow: hidden; pointer-events: none; z-index: 2; }
.cd-puffs i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #edc78b; box-shadow: inset 1px 1px 0 #fff9; }
@media (prefers-reduced-motion: reduce) { .cd-puffs { display: none; } }
.sliders input[type=range] { appearance: none; background: transparent; }
.sliders input[type=range]::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; margin-top: -7px; border: 1px solid #817567; border-radius: 50%; background: linear-gradient(140deg,#fff6e1,#b9a98e); box-shadow: inset 1px 2px 2px #fff9, 1px 3px 3px #0005; }
.sliders input[type=range]::-moz-range-track { height: 10px; border-radius: 8px; background: linear-gradient(#0007,#ffffff20); box-shadow: inset 0 2px 3px #0008; }
.sliders input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: 1px solid #817567; border-radius: 50%; background: linear-gradient(140deg,#fff6e1,#b9a98e); box-shadow: 1px 3px 3px #0005; }
