@import url("../tokens/fonts.css");

/* ==========================================================================
   Chalk — a slate chalkboard you can touch.
   Blackboard (dark, first theme): coloured chalk on deep green.
   Whiteboard (light): marker pens on a white board.
   Colours, spacing, radii and shadows come from tokens.css; motion lives here.
   Rules: things that MOVE animate transform/opacity; strokes DRAW on
   stroke-dashoffset (pathLength=100), once, on one element at a time.
   Entrance animations fill BACKWARDS only. No blur, no backdrop-filter.
   ========================================================================== */

:root, [data-theme="dark"] {
  /* easings */
  --ck-hand: cubic-bezier(.62, .04, .28, 1);      /* a hand drawing a stroke: hesitates, sweeps, settles */
  --ck-settle: cubic-bezier(.2, .8, .2, 1);       /* things arriving and settling on the board */
  --ck-pin: cubic-bezier(.3, 1.55, .5, 1);        /* a sticky note pressed on, a knob landing: small overshoot */
  --ck-wipe: cubic-bezier(.66, 0, .34, 1);        /* the eraser: accelerates in, brakes out */
  --ck-out: cubic-bezier(.4, 0, 1, 1);            /* leaving */
  /* durations */
  --ck-t-press: 90ms;
  --ck-t-hover: 160ms;
  --ck-t-tick: 300ms;
  --ck-t-draw: 460ms;
  --ck-t-pin: 420ms;
  --ck-t-erase: 620ms;
  --ck-t-smudge: 950ms;
  /* stroke weights */
  --ck-stroke: 2.2px;
  --ck-stroke-bold: 3px;
  /* the overlay behind a modal */
  --ck-scrim: #0b120ecc;
  /* chalk grain: a static noise image used as a MASK on strokes (rasterised once) */
  --ck-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 0 -1.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --ck-grain-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 22 0 0 0 -5.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  /* board texture: chalk specks + broad eraser smears, both static */
  --ck-specks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' seed='8' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .94 0 0 0 0 .9 0 0 0 11 -7.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='.3'/%3E%3C/svg%3E");
  --ck-smears: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='480'%3E%3Cfilter id='s' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0042 .025' numOctaves='3' seed='21' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .94 0 0 0 0 .9 0 0 0 1.6 -.7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)' opacity='.2'/%3E%3C/svg%3E");
  --ck-trail: repeating-linear-gradient(180deg, #f3f0e626 0 2px, transparent 2px 5px, #f3f0e612 5px 6px, transparent 6px 11px);
  color-scheme: dark;
}
[data-theme="light"] {
  --ck-scrim: #1d273159;
  --ck-grain: none;   /* marker ink is smooth */
  --ck-grain-soft: none;
  --ck-specks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='8' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .15 0 0 0 0 .19 0 0 0 11 -7.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='.14'/%3E%3C/svg%3E");
  --ck-smears: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='480'%3E%3Cfilter id='s' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0042 .025' numOctaves='3' seed='21' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .38 0 0 0 0 .45 0 0 0 1.6 -.7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)' opacity='.12'/%3E%3C/svg%3E");
  --ck-trail: repeating-linear-gradient(180deg, #1d27311a 0 2px, transparent 2px 5px, #1d27310d 5px 6px, transparent 6px 11px);
  --ck-stroke: 2.4px;
  color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--board);
  background-image: var(--ck-specks), var(--ck-smears);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
.ck-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ck-card--note .ck-grain, .ck-toast .ck-grain { -webkit-mask-image: none !important; mask-image: none !important; }
.ck-grain { -webkit-mask-image: var(--ck-grain); mask-image: var(--ck-grain); -webkit-mask-size: 120px 120px; mask-size: 120px 120px; }
.ck-grain.is-filled { -webkit-mask-image: var(--ck-grain-soft); mask-image: var(--ck-grain-soft); }
:focus-visible { outline: 2.5px dashed var(--lemon); outline-offset: 4px; border-radius: 4px; }
[data-theme="light"] :focus-visible { outline-color: var(--sky); }

/* ---------- type ---------- */
.ck-display { font: 700 56px/60px var(--font-display); margin: 0; letter-spacing: .005em; }
.ck-title { font: 700 36px/42px var(--font-display); margin: 0; }
.ck-heading { font: 700 24px/30px var(--font-display); margin: 0; }
.ck-body, .ck-p { font: 400 18px/26px var(--font-body); margin: 0; }
.ck-ui { font: 400 17px/22px var(--font-body); }
.ck-small { font: 400 15px/20px var(--font-body); color: var(--chalk-soft); margin: 0; }
.ck-overline { font: 400 13px/16px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-soft); }
.ck-note { font: 600 24px/26px var(--font-note); margin: 0; }
.ck-soft { color: var(--chalk-soft); }
.ck-hl { position: relative; white-space: nowrap; }

/* ---------- layout helpers used by previews ---------- */
.ck-stage { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-6); }
.ck-col { display: flex; flex-direction: column; gap: var(--space-3); }
.ck-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.ck-spacer { flex: 1 1 auto; }

/* ---------- tones ---------- */
.ck-tone-chalk { --ck-tone: var(--chalk); --ck-note: var(--board-raised); --ck-on: var(--board); }
.ck-tone-pink { --ck-tone: var(--pink); --ck-note: var(--note-pink); --ck-on: var(--on-tone); }
.ck-tone-sky { --ck-tone: var(--sky); --ck-note: var(--note-sky); --ck-on: var(--on-tone); }
.ck-tone-lemon { --ck-tone: var(--lemon); --ck-note: var(--note-lemon); --ck-on: var(--on-tone); }
.ck-tone-mint { --ck-tone: var(--mint); --ck-note: var(--note-mint); --ck-on: var(--on-tone); }

/* ---------- icons ---------- */
.ck-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the drawn line ---------- */
@keyframes ck-draw { from { stroke-dashoffset: 101; } to { stroke-dashoffset: 0; } }
@keyframes ck-fade { from { opacity: 0; } }
@keyframes ck-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes ck-pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes ck-bump { 40% { transform: scale(1.16) rotate(-3deg); } }
@keyframes ck-spin { to { transform: rotate(360deg); } }
.ck-ink { fill: none; stroke: currentColor; stroke-width: var(--ck-stroke); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100 101; }
.is-drawing .ck-ink, .ck-ink.is-drawing { animation: ck-draw var(--ck-dur, var(--ck-t-draw)) var(--ck-hand) backwards; animation-delay: var(--ck-delay, 0ms); }
.ck-enter { animation: ck-rise 560ms var(--ck-settle) backwards; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }

/* rough outlines: one absolutely placed SVG per host */
.ck-outline { position: absolute; pointer-events: none; overflow: visible; z-index: 0; }
.ck-outline path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100 101; }
.ck-outline__base { stroke: var(--ck-edge, var(--chalk-soft)); stroke-width: var(--ck-edge-w, var(--ck-stroke)); }
.ck-outline__trace { stroke: var(--ck-trace, var(--chalk)); stroke-width: var(--ck-stroke-bold); opacity: 0; transition: opacity var(--ck-t-hover) ease; }
.ck-outline.is-filled .ck-outline__base { fill: var(--ck-fill, var(--chalk)); stroke: var(--ck-fill, var(--chalk)); stroke-width: 1.5px; stroke-dasharray: none; }
.ck-outline.is-tracing .ck-outline__trace { animation: ck-draw var(--ck-t-draw) var(--ck-hand) backwards; }
.ck-outline.is-drawing .ck-outline__base { animation: ck-draw var(--ck-t-draw) var(--ck-hand) backwards; }

/* the press smudge: a puff of dust where the finger landed, fading */
.ck-fx { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 0; }
.ck-smudge { position: absolute; width: 74px; height: 46px; margin: -23px 0 0 -37px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--ck-smudge-c, var(--chalk)) 0, transparent 100%);
  opacity: 0; transform: rotate(var(--r, -12deg)) scale(.4);
  animation: ck-smudge var(--ck-t-smudge) var(--ck-settle); }
@keyframes ck-smudge { 0% { opacity: .55; transform: rotate(var(--r)) scale(.35, .5); } 22% { opacity: .42; transform: rotate(var(--r)) scale(1, .85); } 100% { opacity: 0; transform: rotate(var(--r)) scale(1.35, 1); } }

/* ================================================================ Button */
.ck-btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 44px; padding: 0 20px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--chalk);
  font: 400 18px/1 var(--font-body); letter-spacing: .01em; text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform var(--ck-t-press) var(--ck-settle); }
.ck-btn > :not(.ck-outline):not(.ck-fx) { position: relative; z-index: 1; }
.ck-btn .ck-icon { width: 20px; height: 20px; }
.ck-btn:active:not(:disabled) { transform: translateY(1px) scale(.975); }
.ck-btn--sm { height: 36px; padding: 0 14px; font-size: 16px; }
.ck-btn--sm .ck-icon { width: 18px; height: 18px; }
.ck-btn--lg { height: 54px; padding: 0 26px; font-size: 21px; gap: 10px; }
.ck-btn--block { display: flex; width: 100%; }
.ck-btn--primary { --ck-fill: var(--chalk); --ck-trace: var(--chalk); --ck-smudge-c: var(--board); color: var(--board); }
.ck-btn--primary[class*="ck-tone-"] { --ck-fill: var(--ck-tone); --ck-trace: var(--ck-tone); color: var(--ck-on); }
.ck-btn--secondary { --ck-edge: var(--chalk-soft); }
.ck-btn--ghost { padding: 0 12px; }
.ck-btn--ghost .ck-outline__trace { stroke-width: var(--ck-stroke); }
.ck-btn--danger { color: var(--pink); --ck-edge: var(--pink); --ck-trace: var(--pink); --ck-smudge-c: var(--pink); }
@media (hover: hover) { .ck-btn:hover:not(:disabled) .ck-outline__trace, .ck-iconbtn:hover:not(:disabled) .ck-outline__trace { opacity: 1; } }
.ck-btn:focus-visible .ck-outline__trace, .ck-iconbtn:focus-visible .ck-outline__trace { opacity: 1; }
.ck-btn:disabled, .ck-btn[aria-disabled="true"] { opacity: .42; cursor: not-allowed; }
.ck-btn.is-loading { pointer-events: none; }
.ck-btn.is-loading .ck-btn__label { opacity: .65; }
.ck-spinner { width: 20px; height: 20px; animation: ck-spin 900ms linear infinite; }
.ck-spinner path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ================================================================ IconButton */
.ck-iconbtn { position: relative; isolation: isolate; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--chalk); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--ck-t-press) var(--ck-settle); flex: none; }
.ck-iconbtn > .ck-icon { position: relative; z-index: 1; }
.ck-iconbtn--sm { width: 36px; height: 36px; }
.ck-iconbtn--sm > .ck-icon { width: 19px; height: 19px; }
.ck-iconbtn--lg { width: 52px; height: 52px; }
.ck-iconbtn:active:not(:disabled) { transform: scale(.92); }
.ck-iconbtn:disabled { opacity: .42; cursor: not-allowed; }
.ck-iconbtn[class*="ck-tone-"] { color: var(--ck-tone); --ck-edge: var(--ck-tone); --ck-trace: var(--ck-tone); }
.ck-iconbtn--solid, .ck-iconbtn--solid[class*="ck-tone-"] { color: var(--ck-on, var(--board)); --ck-fill: var(--ck-tone, var(--chalk)); --ck-smudge-c: var(--board); }
.ck-iconbtn[aria-pressed="true"] { color: var(--lemon); --ck-edge: var(--lemon); }
.ck-iconbtn__badge { position: absolute; z-index: 2; top: 1px; right: -1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--pink); color: var(--on-tone); font: 400 13px/19px var(--font-body); text-align: center; }
.ck-iconbtn__badge.is-bumping { animation: ck-bump 380ms var(--ck-pin); }

/* ================================================================ Toggle */
.ck-toggle { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; font: 400 17px/22px var(--font-body); color: var(--chalk); -webkit-tap-highlight-color: transparent; }
.ck-toggle__track { position: relative; width: 54px; height: 30px; flex: none; border-radius: 15px; background: var(--board-deep); box-shadow: var(--shadow-tray); }
.ck-toggle__track .ck-outline { z-index: 1; }
.ck-toggle__fillsvg { --ck-fill: var(--mint); opacity: 0; transition: opacity 200ms ease; z-index: 0 !important; }
.ck-toggle__knob { position: absolute; z-index: 2; left: 4px; top: 4px; width: 22px; height: 22px; color: var(--chalk-soft);
  transition: transform var(--ck-t-pin) var(--ck-pin), color 200ms ease; }
.ck-toggle__knob svg { width: 22px; height: 22px; overflow: visible; display: block; }
.ck-toggle__knob .ck-knob-dot { fill: currentColor; stroke: currentColor; stroke-width: 1; }
.ck-toggle__knob .ck-ink { stroke: var(--mint); stroke-width: 2.6; opacity: 0; }
.ck-toggle input:checked + .ck-toggle__track .ck-toggle__fillsvg { opacity: 1; }
.ck-toggle input:checked + .ck-toggle__track .ck-toggle__knob { transform: translateX(24px); color: var(--board); }
.ck-toggle input:checked + .ck-toggle__track .ck-toggle__knob .ck-ink { opacity: 1; }
.ck-toggle input:checked + .ck-toggle__track { --ck-edge: var(--mint); }
.ck-toggle:active .ck-toggle__knob { transform: scale(1.12, .9); }
.ck-toggle:active input:checked + .ck-toggle__track .ck-toggle__knob { transform: translateX(24px) scale(1.12, .9); }
.ck-toggle input:focus-visible + .ck-toggle__track { outline: 2.5px dashed var(--lemon); outline-offset: 5px; }
[data-theme="light"] .ck-toggle input:focus-visible + .ck-toggle__track { outline-color: var(--sky); }
.ck-toggle input:disabled ~ * { opacity: .45; cursor: not-allowed; }
.ck-toggle__text { display: flex; flex-direction: column; }
.ck-toggle__hint { font-size: 15px; line-height: 20px; color: var(--chalk-soft); }

/* ================================================================ Checkbox + Radio */
.ck-check, .ck-radio { position: relative; display: inline-grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; align-items: start; cursor: pointer; font: 400 18px/26px var(--font-body); color: var(--chalk); -webkit-tap-highlight-color: transparent; }
.ck-check__box, .ck-radio__ring { width: 26px; height: 26px; overflow: visible; display: block; transition: transform var(--ck-t-press) var(--ck-settle); }
.ck-check:active .ck-check__box, .ck-radio:active .ck-radio__ring { transform: scale(.9) rotate(-4deg); }
.ck-check__sq, .ck-radio__o { fill: none; stroke: var(--chalk-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 160ms ease; }
.ck-check__tick { stroke: var(--mint); stroke-width: 2.8; opacity: 0; transition: opacity 140ms ease; }
.ck-check__dash { stroke: var(--sky); stroke-width: 2.8; opacity: 0; }
.ck-check input:checked ~ .ck-check__box .ck-check__tick { opacity: 1; }
.ck-check input:checked ~ .ck-check__box .ck-check__sq { stroke: var(--chalk); }
.ck-check input:indeterminate ~ .ck-check__box .ck-check__dash { opacity: 1; }
.ck-check.is-anim input:checked ~ .ck-check__box .ck-check__tick { animation: ck-draw var(--ck-t-tick) var(--ck-hand) backwards; }
.ck-check input:focus-visible ~ .ck-check__box, .ck-radio input:focus-visible ~ .ck-radio__ring { outline: 2.5px dashed var(--lemon); outline-offset: 3px; border-radius: 6px; }
[data-theme="light"] .ck-check input:focus-visible ~ .ck-check__box, [data-theme="light"] .ck-radio input:focus-visible ~ .ck-radio__ring { outline-color: var(--sky); }
.ck-check__label { position: relative; justify-self: start; transition: color 240ms ease; }
.ck-check__strike { position: absolute; left: -3px; right: -3px; top: 50%; height: 2.4px; border-radius: 2px; background: var(--chalk); opacity: .9;
  transform: scaleX(0) rotate(-1.2deg); transform-origin: 0 50%; transition: transform 340ms var(--ck-hand); }
.ck-check input:checked ~ .ck-check__label.has-strike { color: var(--chalk-soft); }
.ck-check input:checked ~ .ck-check__label .ck-check__strike { transform: scaleX(1) rotate(-1.2deg); }
.ck-check__hint, .ck-radio__hint { grid-column: 2; font-size: 15px; line-height: 20px; color: var(--chalk-soft); }
.ck-check.is-error .ck-check__sq { stroke: var(--pink); }
.ck-check.is-error .ck-check__hint { color: var(--pink); }
.ck-check input:disabled ~ *, .ck-radio input:disabled ~ * { opacity: .45; cursor: not-allowed; }
.ck-radio__dot { stroke: var(--sky); stroke-width: 2.4; opacity: 0; }
.ck-radio input:checked ~ .ck-radio__ring .ck-radio__dot { opacity: 1; }
.ck-radio input:checked ~ .ck-radio__ring .ck-radio__o { stroke: var(--chalk); }
.ck-radio.is-anim input:checked ~ .ck-radio__ring .ck-radio__dot { animation: ck-draw 380ms var(--ck-hand) backwards; }
.ck-radios { display: flex; flex-direction: column; gap: var(--space-3); border: 0; margin: 0; padding: 0; min-width: 0; }
.ck-radios--inline { flex-direction: row; flex-wrap: wrap; gap: var(--space-3) var(--space-5); }
.ck-radios__legend { padding: 0; margin-bottom: var(--space-2); font: 400 17px/22px var(--font-body); color: var(--chalk); }
.ck-radio.is-right .ck-radio__o { stroke: var(--mint); }
.ck-radio.is-wrong .ck-radio__o { stroke: var(--pink); }
.ck-radio.is-wrong .ck-radio__dot { stroke: var(--pink); }

/* ================================================================ TextField */
.ck-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ck-field__label { font: 400 17px/22px var(--font-body); color: var(--chalk); }
.ck-field__box { position: relative; display: flex; align-items: center; gap: var(--space-2); min-height: 46px; padding: 0 14px; border-radius: var(--radius-sm); background: var(--board-deep); box-shadow: var(--shadow-tray); --ck-trace: var(--sky); }
.ck-field__box .ck-outline__trace { stroke-width: 2.6px; }
.ck-field__box:focus-within .ck-outline__trace { opacity: 1; }
.ck-field__icon { color: var(--chalk-soft); width: 20px; height: 20px; position: relative; z-index: 1; }
.ck-field__input { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; width: 100%; height: 44px; padding: 0; border: 0; background: transparent; color: var(--chalk); font: 400 18px/26px var(--font-body); outline: none; }
textarea.ck-field__input { height: auto; padding: 10px 0; resize: vertical; min-height: 88px; }
.ck-field__box:has(textarea) { align-items: flex-start; }
.ck-field__input::placeholder { color: var(--chalk-soft); opacity: 1; }
.ck-field__hint { display: flex; align-items: center; gap: 6px; min-height: 20px; font: 400 15px/20px var(--font-body); color: var(--chalk-soft); }
.ck-field__hint:empty { display: none; }
.ck-field__hint .ck-icon { width: 17px; height: 17px; }
.ck-field.is-error .ck-field__box { --ck-edge: var(--pink); --ck-trace: var(--pink); }
.ck-field.is-error .ck-field__hint { color: var(--pink); }
.ck-field.is-error .ck-field__hint .ck-err { font: 600 20px/20px var(--font-note); }
.ck-field.is-shaking .ck-field__box { animation: ck-shake 360ms var(--ck-settle); }
@keyframes ck-shake { 20% { transform: translateX(-5px) rotate(-.6deg); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }
.ck-field__count { margin-left: auto; font: 600 18px/1 var(--font-note); color: var(--chalk-soft); }
.ck-field.is-disabled { opacity: .45; }

/* ================================================================ Select + Menu */
.ck-select { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.ck-select__btn { position: relative; isolation: isolate; display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 46px; padding: 0 12px 0 14px; border: 0; border-radius: var(--radius-sm);
  background: var(--board-deep); box-shadow: var(--shadow-tray); color: var(--chalk); font: 400 18px/24px var(--font-body); text-align: left; cursor: pointer; }
.ck-select__btn > :not(.ck-outline) { position: relative; z-index: 1; }
.ck-select__value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-select__value.is-placeholder { color: var(--chalk-soft); }
.ck-select__chev { width: 20px; height: 20px; color: var(--chalk-soft); transition: transform 220ms var(--ck-pin); }
.ck-select.is-open .ck-select__chev { transform: rotate(180deg); }
@media (hover: hover) { .ck-select__btn:hover .ck-outline__trace { opacity: 1; } }
.ck-select.is-open .ck-outline__trace { opacity: 1; }
.ck-menu { position: fixed; z-index: 60; min-width: 180px; max-height: 320px; overflow: auto; margin: 0; padding: 6px; list-style: none; border-radius: var(--radius-md);
  background: var(--board-raised); box-shadow: var(--shadow-modal); color: var(--chalk); animation: ck-pop 180ms var(--ck-settle) backwards; outline: none; }
.ck-menu > .ck-outline { --ck-edge: var(--chalk-soft); }
.ck-menu__item { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px 6px 34px; border-radius: 8px; font: 400 18px/22px var(--font-body); cursor: pointer; user-select: none; }
.ck-menu__item .ck-icon { width: 19px; height: 19px; position: absolute; left: 9px; color: var(--chalk-soft); }
.ck-menu__item.is-active { background: var(--dust); }
.ck-menu__item[aria-selected="true"] { color: var(--chalk); }
.ck-menu__tick { position: absolute; left: 7px; top: 50%; width: 22px; height: 22px; margin-top: -11px; overflow: visible; color: var(--mint); }
.ck-menu__item--danger { color: var(--pink); }
.ck-menu__item--danger .ck-icon { color: var(--pink); }
.ck-menu__sep { height: 0; margin: 6px 8px; border-top: 1.5px dashed var(--line); }

/* ================================================================ Tabs */
.ck-tabs { min-width: 0; }
.ck-tabs__list { position: relative; display: flex; gap: var(--space-1); overflow-x: auto; overflow-y: hidden; padding: 0 2px 14px; scrollbar-width: none; }
.ck-tabs__list::-webkit-scrollbar { display: none; }
.ck-tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent;
  color: var(--chalk-soft); font: 400 19px/1 var(--font-body); cursor: pointer; transition: color var(--ck-t-hover) ease, transform var(--ck-t-press) var(--ck-settle); -webkit-tap-highlight-color: transparent; }
.ck-tab .ck-icon { width: 19px; height: 19px; }
@media (hover: hover) { .ck-tab:hover { color: var(--chalk); } }
.ck-tab:active { transform: translateY(1px); }
.ck-tab[aria-selected="true"] { color: var(--chalk); }
.ck-tab__count { font: 600 19px/1 var(--font-note); color: var(--lemon); }
.ck-tabs__line { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; color: var(--lemon); }
.ck-tabs__line .ck-ink { stroke-width: 2.8px; }
.ck-tabs__panel { padding-top: var(--space-4); }
.ck-tabs__panel:focus-visible { outline-offset: 2px; }

/* ================================================================ SegmentedControl */
.ck-seg { position: relative; display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--radius-md); background: var(--board-deep); box-shadow: var(--shadow-tray); max-width: 100%; }
.ck-seg > .ck-outline { --ck-edge: var(--line); }
.ck-seg__opt { position: relative; z-index: 1; flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 38px; padding: 0 16px; border: 0; border-radius: 8px;
  background: transparent; color: var(--chalk-soft); font: 400 18px/1 var(--font-body); cursor: pointer; white-space: nowrap; transition: color var(--ck-t-hover) ease; -webkit-tap-highlight-color: transparent; }
.ck-seg__opt .ck-icon { width: 19px; height: 19px; }
.ck-seg__opt[aria-checked="true"] { color: var(--chalk); }
@media (hover: hover) { .ck-seg__opt:hover { color: var(--chalk); } }
.ck-seg__ring { --ck-edge: var(--lemon); --ck-edge-w: 2.6px; opacity: 0; transition: opacity 120ms ease; }
.ck-seg__opt[aria-checked="true"] .ck-seg__ring { opacity: 1; }
.ck-seg--sm .ck-seg__opt { height: 32px; padding: 0 12px; font-size: 16px; }

/* ================================================================ Slider */
.ck-slider { display: flex; flex-direction: column; gap: 4px; min-width: 0; --v: 0; }
.ck-slider__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); font: 400 17px/22px var(--font-body); }
.ck-slider__val { font: 600 24px/1 var(--font-note); color: var(--sky); }
.ck-slider__track { position: relative; height: 40px; }
.ck-slider__svg { position: absolute; left: 0; top: 0; width: 100%; height: 40px; overflow: visible; pointer-events: none; }
.ck-slider__base { fill: none; stroke: var(--chalk-soft); stroke-width: 2.4; stroke-linecap: round; opacity: .75; }
.ck-slider__fill { fill: none; stroke: var(--sky); stroke-width: 5; stroke-linecap: round; }
.ck-slider__tick { fill: none; stroke: var(--chalk-soft); stroke-width: 1.8; stroke-linecap: round; }
.ck-slider__thumb { position: absolute; top: 9px; left: calc(var(--v) * (100% - 24px)); width: 24px; height: 24px; pointer-events: none; color: var(--chalk); }
.ck-slider__thumb svg { width: 24px; height: 24px; overflow: visible; display: block; transition: transform 160ms var(--ck-pin); }
.ck-slider__thumb .ck-knob-dot { fill: var(--board-raised); stroke: currentColor; stroke-width: 2.4; }
.ck-slider__bubble { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(6px) scale(.9); opacity: 0; padding: 0 8px; border-radius: 6px; background: var(--chalk); color: var(--board); font: 600 20px/26px var(--font-note); white-space: nowrap; transition: opacity 140ms ease, transform 200ms var(--ck-pin); }
.ck-slider.is-active .ck-slider__bubble { opacity: 1; transform: translateX(-50%); }
.ck-slider.is-active .ck-slider__thumb svg { transform: scale(1.18); }
.ck-slider__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ck-slider__input:focus-visible ~ .ck-slider__thumb svg { outline: 2.5px dashed var(--lemon); outline-offset: 4px; border-radius: 50%; }
[data-theme="light"] .ck-slider__input:focus-visible ~ .ck-slider__thumb svg { outline-color: var(--sky); }
.ck-slider__ends { display: flex; justify-content: space-between; font: 400 15px/18px var(--font-body); color: var(--chalk-soft); }

/* ================================================================ Card + sticky note */
.ck-card { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-5); border-radius: var(--radius-md);
  background: var(--board-raised); color: var(--chalk); text-align: left; font: inherit; border: 0; text-decoration: none; }
.ck-card > :not(.ck-outline):not(.ck-fx):not(.ck-pin):not(.ck-tape) { position: relative; z-index: 1; }
.ck-card > .ck-outline { --ck-edge: var(--line); --ck-edge-w: 1.8px; }
.ck-card--plain { background: transparent; padding: 0; }
.ck-card--board { background: var(--board); }
.ck-card__head { display: flex; align-items: flex-start; gap: var(--space-3); }
.ck-card__titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ck-card__foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin-top: auto; padding-top: var(--space-1); }
.ck-card.is-interactive { cursor: pointer; transition: transform 240ms var(--ck-settle), box-shadow 240ms var(--ck-settle); }
.ck-card.is-interactive::after { content: ""; position: absolute; z-index: -1; left: 0; top: 0; right: -6px; bottom: -8px; }
@media (hover: hover) { .ck-card--slate.is-interactive:hover { transform: translateY(-3px); } .ck-card--slate.is-interactive:hover > .ck-outline { --ck-edge: var(--chalk-soft); } }
.ck-card.is-interactive:active { transform: translateY(0) scale(.99); }

.ck-card--note { --ck-tilt: 0deg; padding: var(--space-5) var(--space-4) var(--space-4); border-radius: var(--radius-note); background: var(--ck-note, var(--note-lemon)); color: var(--ink);
  box-shadow: var(--shadow-note); transform: rotate(var(--ck-tilt)); --ck-smudge-c: var(--ink); }
.ck-card--note::before { content: ""; position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 22px; pointer-events: none; border-radius: 0 0 var(--radius-note) var(--radius-note); background: linear-gradient(180deg, transparent, #1b26200d); }
.ck-card--note .ck-small, .ck-card--note .ck-overline { color: var(--ink-soft); }
.ck-card--note .ck-badge { --ck-tone: var(--ink); }
.ck-card--note .ck-tally, .ck-toast .ck-tally { color: var(--ink); --ck-tone: var(--ink); }
.ck-card--note .ck-tally .ck-tally__slot { stroke: #1b262040; }
.ck-card--note .ck-iconbtn { color: var(--ink); --ck-edge: #1b262066; --ck-trace: var(--ink); --ck-smudge-c: var(--ink); }
.ck-card--note .ck-progress__head { color: var(--ink); }
@media (hover: hover) { .ck-card--note.is-interactive:hover { transform: rotate(calc(var(--ck-tilt) * .4)) translateY(-4px); box-shadow: var(--shadow-lift); } }
.ck-card--note.is-interactive:active { transform: rotate(calc(var(--ck-tilt) * .4)) translateY(-1px) scale(.99); }
.ck-card--note.ck-pinned { animation: ck-note-in var(--ck-t-pin) var(--ck-pin) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes ck-note-in { from { opacity: 0; transform: translateY(-18px) rotate(calc(var(--ck-tilt) - 6deg)) scale(1.05); } }

.ck-pin { position: absolute; z-index: 3; left: 50%; top: -7px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #ffffffcc 0 2px, transparent 3.2px), var(--ck-pin-c, #e0566f); box-shadow: var(--shadow-pin), inset -2px -2px 0 #0000002e; }
.ck-pin.ck-tone-sky { --ck-pin-c: #3d8fd6; } .ck-pin.ck-tone-mint { --ck-pin-c: #2f9e6a; } .ck-pin.ck-tone-lemon { --ck-pin-c: #e3a81e; }
.ck-pinned .ck-pin, .ck-toast .ck-pin { animation: ck-pin-press 360ms var(--ck-pin) backwards; animation-delay: calc(var(--i, 0) * 70ms + 200ms); }
@keyframes ck-pin-press { from { opacity: 0; transform: translateY(-10px) scale(1.7); } }
.ck-tape { position: absolute; z-index: 3; left: 50%; top: -10px; width: 74px; height: 22px; margin-left: -37px; transform: rotate(-3deg); background: #ffffff70;
  clip-path: polygon(0 8%, 4% 0, 9% 10%, 14% 0, 100% 4%, 97% 50%, 100% 96%, 94% 100%, 89% 90%, 84% 100%, 0 94%, 3% 50%); }
[data-theme="light"] .ck-tape { background: #e9e4d2c7; }

/* ================================================================ Badge / Tag */
.ck-badge { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; color: var(--ck-tone, var(--chalk)); font: 400 15px/1 var(--font-body); white-space: nowrap; flex: none; }
.ck-badge > .ck-outline { --ck-edge: var(--ck-tone, var(--chalk)); --ck-edge-w: 1.7px; }
.ck-badge > :not(.ck-outline) { position: relative; z-index: 1; }
.ck-badge .ck-icon { width: 16px; height: 16px; }
.ck-badge--solid { background: var(--ck-note, var(--board-raised)); color: var(--ink); }
.ck-badge--solid.ck-tone-chalk { color: var(--chalk); }
.ck-badge--dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ck-badge--count { height: 22px; padding: 0 7px; border-radius: 11px; background: var(--ck-tone, var(--chalk)); color: var(--ck-on, var(--board)); font-size: 14px; }
.ck-tag__x { display: inline-grid; place-items: center; width: 20px; height: 20px; margin: 0 -5px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.ck-tag__x .ck-icon { width: 14px; height: 14px; stroke-width: 2.4; }
@media (hover: hover) { .ck-tag__x:hover { background: var(--dust); } }

/* ================================================================ Avatar */
.ck-avatar { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--ck-note, var(--note-sky)); color: var(--ink); font: 700 17px/1 var(--font-display); }
.ck-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ck-avatar > .ck-outline { --ck-edge: var(--chalk); --ck-edge-w: 1.8px; }
.ck-avatar--sm { width: 30px; height: 30px; font-size: 13px; }
.ck-avatar--lg { width: 56px; height: 56px; font-size: 23px; }
.ck-avatar--xl { width: 84px; height: 84px; font-size: 34px; }
.ck-avatar__status { position: absolute; z-index: 2; right: -1px; bottom: -1px; width: 30%; height: 30%; min-width: 9px; min-height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2.5px var(--board); }
.ck-avatars { display: inline-flex; align-items: center; }
.ck-avatars > .ck-avatar { box-shadow: 0 0 0 3px var(--ck-ring, var(--board)); }
.ck-avatars > .ck-avatar + .ck-avatar { margin-left: -7px; }
.ck-avatars__more { margin-left: 8px; font: 600 20px/1 var(--font-note); color: var(--chalk-soft); }

/* ================================================================ Tooltip */
.ck-tip { position: fixed; z-index: 80; max-width: 240px; padding: 5px 11px 6px; border-radius: var(--radius-sm); background: var(--chalk); color: var(--board); font: 400 15px/19px var(--font-body); pointer-events: none;
  opacity: 0; transform: translateY(4px) rotate(-1deg) scale(.96); transition: opacity 120ms ease, transform 200ms var(--ck-pin); }
.ck-tip::after { content: ""; position: absolute; left: var(--ax, 50%); top: 100%; width: 10px; height: 10px; margin: -6px 0 0 -5px; background: inherit; transform: rotate(45deg); border-radius: 0 0 2px 0; }
.ck-tip.is-below::after { top: 0; margin-top: -4px; }
.ck-tip.is-below { transform: translateY(-4px) rotate(1deg) scale(.96); }
.ck-tip.is-on { opacity: 1; transform: none; }

/* ================================================================ Toast (a sticky note pinned to the board) */
.ck-toasts { position: fixed; z-index: 90; top: var(--space-5); right: var(--space-5); display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-4); width: min(330px, calc(100vw - 32px)); pointer-events: none; }
.ck-toast { --ck-tilt: -1.5deg; position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; width: 100%; padding: 18px 12px 14px 14px;
  border-radius: var(--radius-note); background: var(--ck-note, var(--note-lemon)); color: var(--ink); box-shadow: var(--shadow-note); transform: rotate(var(--ck-tilt)); pointer-events: auto;
  animation: ck-note-in var(--ck-t-pin) var(--ck-pin) backwards; }
.ck-toast.is-leaving { animation: ck-note-off 260ms var(--ck-out) forwards; }
@keyframes ck-note-off { to { opacity: 0; transform: translate(18px, -26px) rotate(calc(var(--ck-tilt) + 12deg)); } }
.ck-toast .ck-toast__doodle { width: 34px; height: 34px; overflow: visible; color: var(--ink); }
.ck-toast__doodle .ck-ink { stroke-width: 2.4px; }
.ck-toast__title { margin: 0; font: 700 25px/26px var(--font-note); }
.ck-toast__msg { margin: 2px 0 0; font: 400 16px/21px var(--font-body); color: var(--ink); }
.ck-toast__x { display: grid; place-items: center; width: 30px; height: 30px; margin: -6px -4px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.ck-toast__x .ck-icon { width: 17px; height: 17px; }
@media (hover: hover) { .ck-toast__x:hover { background: #1b262014; } }
.ck-toast__x:focus-visible { outline-color: var(--ink); }
.ck-toast__act { grid-column: 2 / 4; display: flex; gap: var(--space-2); margin-top: 4px; }
.ck-toast__act button { padding: 2px 0; border: 0; background: none; color: var(--ink); font: 600 20px/1 var(--font-note); text-decoration: underline wavy; text-underline-offset: 4px; cursor: pointer; }
.ck-toast--inline { animation: none; }
@media (max-width: 520px) { .ck-toasts { top: auto; bottom: var(--space-4); right: var(--space-4); flex-direction: column-reverse; } }

/* ================================================================ Modal */
.ck-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--space-4); background: var(--ck-scrim); animation: ck-fade 200ms ease backwards; }
.ck-modal[hidden] { display: none; }
.ck-modal__panel { position: relative; isolation: isolate; width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: var(--space-6); border-radius: var(--radius-lg);
  background: var(--board-raised); background-image: var(--ck-specks); color: var(--chalk); box-shadow: var(--shadow-modal); animation: ck-slate-in 340ms var(--ck-settle) backwards; outline: none; }
.ck-modal__panel > :not(.ck-outline) { position: relative; z-index: 1; }
.ck-modal__panel > .ck-outline { --ck-edge: var(--chalk-soft); }
@keyframes ck-slate-in { from { opacity: 0; transform: translateY(16px) rotate(-1.2deg) scale(.97); } }
.ck-modal.is-leaving { animation: ck-fade 180ms ease reverse forwards; }
.ck-modal.is-leaving .ck-modal__panel { animation: ck-slate-out 180ms var(--ck-out) forwards; }
@keyframes ck-slate-out { to { opacity: 0; transform: translateY(10px) rotate(.8deg) scale(.98); } }
.ck-modal__head { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-4); }
.ck-modal__title { flex: 1 1 auto; margin: 0; padding-top: 4px; font: 700 32px/38px var(--font-display); }
.ck-modal__title .ck-hl { white-space: normal; }
.ck-modal__body { display: flex; flex-direction: column; gap: var(--space-4); font: 400 18px/26px var(--font-body); }
.ck-modal__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }
@media (max-width: 520px) { .ck-modal__panel { padding: var(--space-5); } .ck-modal__title { font-size: 27px; line-height: 32px; } .ck-modal__foot > * { flex: 1 1 auto; } }

/* ================================================================ Progress: chalk tally marks */
.ck-progress { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ck-progress__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); font: 400 17px/22px var(--font-body); }
.ck-progress__val { font: 600 24px/1 var(--font-note); color: var(--ck-tone, var(--lemon)); }
.ck-tally { display: block; overflow: visible; color: var(--chalk); max-width: 100%; }
.ck-tally .ck-tally__m { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 100 101; opacity: 0; transition: opacity 220ms ease; }
.ck-tally .ck-tally__m.is-strike { stroke: var(--ck-tone, var(--lemon)); stroke-width: 2.8; }
.ck-tally .ck-tally__slot { fill: none; stroke: var(--line); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1.5 5; }
.ck-tally .ck-tally__m.on { opacity: 1; }
.ck-tally .ck-tally__m.on.is-new { animation: ck-draw 240ms var(--ck-hand) backwards; animation-delay: var(--d, 0ms); }
.ck-tally .ck-tally__m.is-erased { opacity: 0; transform: translate(6px, -2px); transition: opacity 260ms ease, transform 260ms var(--ck-out); }
.ck-progress--line .ck-progress__svg { display: block; width: 100%; height: 18px; overflow: visible; }
.ck-progress__base { fill: none; stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.ck-progress__fill { fill: none; stroke: var(--ck-tone, var(--mint)); stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray 600ms var(--ck-hand); }

/* ================================================================ Doodle (annotation layer) */
.ck-doodle { display: inline-block; overflow: visible; color: var(--ck-tone, var(--lemon)); vertical-align: middle; pointer-events: none; }
.ck-doodle .ck-ink { stroke-width: var(--ck-doodle-w, 2.6px); }
.ck-doodle--fill .ck-ink.is-fill { fill: currentColor; }
.ck-annot { position: absolute; z-index: 2; line-height: 0; pointer-events: none; overflow: visible; color: var(--ck-tone, var(--lemon)); }
.ck-annot__label { position: absolute; z-index: 2; font: 700 24px/24px var(--font-note); color: var(--ck-tone, var(--lemon)); white-space: nowrap; pointer-events: none; animation: ck-scrawl 420ms var(--ck-settle) backwards; animation-delay: var(--ck-ldelay, 300ms); }
@keyframes ck-scrawl { from { opacity: 0; transform: translateY(4px) rotate(-6deg) scale(.92); } }

/* ================================================================ TallyCounter */
.ck-counter__num { font: 700 48px/1 var(--font-display); display: inline-block; }
.is-bumping { animation: ck-bump 420ms var(--ck-pin); }
.ck-counter__row { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.ck-counter__marks { flex: 1 1 160px; min-width: 0; min-height: 40px; display: flex; align-items: center; }
.ck-counter__goal { font: 600 22px/1 var(--font-note); color: var(--chalk-soft); }
.ck-counter.is-done .ck-counter__goal { color: var(--mint); }

/* ================================================================ Eraser */
.ck-erase { position: absolute; inset: 0; z-index: 20; overflow: hidden; border-radius: inherit; pointer-events: none; }
.ck-erase__cover { position: absolute; inset: 0 -64px 0 0; background: var(--ck-specks) 0 0 / 240px 240px, linear-gradient(90deg, var(--ck-erase-bg, var(--board)) calc(100% - 64px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); transform: translateX(-100%);
  animation: ck-sweep var(--ck-t-erase) var(--ck-wipe) forwards; }
.ck-erase__cover::after { content: ""; position: absolute; top: 0; bottom: 0; right: 40px; width: 110px; background: var(--ck-trail); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%, transparent); mask-image: linear-gradient(90deg, transparent, #000 60%, transparent); }
@keyframes ck-sweep { to { transform: translateX(0); } }
.ck-erase.is-lifting { transition: opacity 260ms ease; opacity: 0; }
.ck-eraser { position: absolute; z-index: 21; top: 0; left: 0; width: 34px; height: 62px; pointer-events: none; transform: translateX(-60px); animation: ck-eraser-x var(--ck-t-erase) var(--ck-wipe) forwards; }
.ck-eraser__body { display: block; width: 34px; height: 62px; animation: ck-eraser-y calc(var(--ck-t-erase) / 3) ease-in-out 3 alternate; transform-origin: 50% 50%; }
@keyframes ck-eraser-x { to { transform: translateX(var(--ck-ex, 300px)); } }
@keyframes ck-eraser-y { from { transform: translateY(0) rotate(-8deg); } to { transform: translateY(var(--ck-ey, 0px)) rotate(6deg); } }
.ck-eraser-sprite .wood { fill: var(--note-sky); } .ck-eraser-sprite .felt { fill: var(--ink); } .ck-eraser-sprite .edge { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.ck-eraser-sprite .shine { fill: #ffffff80; }
.ck-dustfall { position: absolute; z-index: 19; left: 0; right: 0; bottom: 0; height: 10px; pointer-events: none; background: var(--ck-trail); opacity: 0; animation: ck-dust 900ms ease; }
@keyframes ck-dust { 20% { opacity: .9; } 100% { opacity: 0; transform: translateY(4px); } }

/* overlay layers must stay absolute even inside hosts that lift their children */
.ck-erase, .ck-eraser, .ck-dustfall, .ck-annot { position: absolute !important; }
.ck-erase { z-index: 20 !important; } .ck-eraser { z-index: 21 !important; } .ck-dustfall { z-index: 19 !important; } .ck-annot { z-index: 4 !important; }

/* ================================================================ Widgets */
.ck-stat__num { font: 700 44px/1 var(--font-display); }
.ck-stat__row { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.ck-stat__delta { display: inline-flex; align-items: center; gap: 2px; font: 600 22px/1 var(--font-note); padding-bottom: 4px; }
.ck-stat__delta .ck-doodle { color: currentColor; }
.ck-stat__delta.is-up { color: var(--mint); } .ck-stat__delta.is-down { color: var(--pink); }
.ck-stat__spark { display: block; width: 100%; height: 54px; overflow: visible; color: var(--ck-tone, var(--sky)); }
.ck-stat__spark .ck-ink { stroke-width: 2.6px; }
.ck-stat__spark .ck-stat__dot { fill: currentColor; stroke: none; }

.ck-list { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.ck-list > li { position: relative; }
.ck-checklist__add { display: flex; gap: var(--space-2); align-items: flex-end; }
.ck-checklist__add .ck-field { flex: 1 1 auto; }

.ck-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ck-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 4px; border: 0; border-radius: 8px; background: transparent; color: var(--chalk-soft); font: 400 15px/18px var(--font-body); cursor: default; -webkit-tap-highlight-color: transparent; }
.ck-day__mark { width: 34px; height: 34px; overflow: visible; color: var(--chalk); }
.ck-day__mark .ck-ink { stroke-width: 2.6px; }
.ck-day__mark .ck-day__slot { fill: none; stroke: var(--line); stroke-width: 1.8; stroke-dasharray: 2 4; stroke-linecap: round; }
.ck-day.is-done { color: var(--chalk); }
.ck-day.is-done .ck-day__mark { color: var(--mint); }
.ck-day.is-today { color: var(--lemon); cursor: pointer; }
.ck-day.is-today .ck-day__slot { stroke: var(--lemon); stroke-dasharray: none; stroke-width: 2.2; }
.ck-day.is-today.is-done .ck-day__slot { stroke: var(--line); }
.ck-day.is-today:active { transform: scale(.94); }

/* ---------- reduced motion: movement off, states stay ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .ck-spinner { animation: none !important; }
}
