/* SLOP CENTER — the CASE tab (web/js/work/cases.js). Lives in a 720×396 box inside the 3D monitor, under the
   desk's 54 px top bar. Phone-legible: nothing you must read is under 18 px, every target is ≥ 48 px.
   Colours come from the desk's --sd-* tokens when mounted in .sd-root (fallbacks for the lab). Prefix: cs-.
   No backdrop-filter (unreliable inside CSS3D). Transient WAAPI animations never use fill. */

.cs-root {
  --cs-ink: var(--sd-ink, #f8f5ff);
  --cs-ink2: var(--sd-ink2, #ddd4f7);
  --cs-ink3: var(--sd-ink3, #b1a6d8);
  --cs-line: var(--sd-line, rgba(226, 214, 255, .15));
  --cs-glass: var(--sd-glass, linear-gradient(180deg, rgba(255, 255, 255, .095), rgba(255, 255, 255, .05)));
  --cs-grad: var(--sd-grad, linear-gradient(100deg, #7c5cff 0%, #c04af2 52%, #ff5c9a 100%));
  --cs-flag: var(--sd-flag, #ff4f74);
  --cs-ok: var(--sd-ok, #3ddc97);
  --cs-warn: var(--sd-warn, #ffc24b);
  --cs-font: var(--sd-font, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  --cs-mono: var(--sd-mono, ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace);
  --cs-amber: #ffcf7a;
  --cs-paper: #fff8e4;
  --cs-yarn: #e8364f;
  position: absolute; inset: 0;
  overflow: hidden;
  color: var(--cs-ink);
  font: 400 20px/1.35 var(--cs-font);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}
.cs-root *, .cs-root *::before, .cs-root *::after { box-sizing: border-box; }
.cs-root [hidden] { display: none !important; }
.cs-root [role="button"] { cursor: pointer; }
.cs-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 0% 0%, rgba(124, 92, 255, .30) 0%, transparent 60%),
    radial-gradient(55% 70% at 100% 100%, rgba(255, 170, 80, .13) 0%, transparent 62%),
    linear-gradient(160deg, #1a1336 0%, #140e29 58%, #1b1030 100%);
}
.cs-grow { flex: 1; }
.cs-kicker {
  font: 800 18px/1.15 var(--cs-mono); letter-spacing: .02em;
  color: var(--cs-amber); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ───────── buttons */
.cs-btn, .cs-hbtn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 14px; font-weight: 800; white-space: nowrap;
  transition: transform .1s, background-color .15s, border-color .15s;
}
.cs-btn { height: 52px; padding: 0 18px; font-size: 20px; }
.cs-hbtn {
  flex: none; height: 48px; min-width: 48px; padding: 0 12px; font-size: 19px;
  background: var(--cs-glass); border: 1px solid var(--cs-line);
}
.cs-hbtn.on { background: rgba(255, 255, 255, .2); border-color: #c4b5fd; }
.cs-primary { background: var(--cs-grad); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(124, 58, 237, .38), inset 0 1px 0 rgba(255, 255, 255, .3); }
.cs-ghost { background: rgba(10, 6, 26, .55); border: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.cs-btn:active, .cs-hbtn:active, .cs-opt:active, .cs-choice:active, .cs-tabf:active, .cs-fc:active { transform: scale(.96); }

/* ───────── the Z post */
.cs-zp {
  width: 100%;
  padding: 10px 12px 9px;
  border-radius: 16px;
  background: #0d0a1a;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.cs-zp-h { display: flex; align-items: center; gap: 9px; }
.cs-face {
  flex: none; display: grid; place-items: center; overflow: hidden;
  border-radius: 50%; line-height: 1;
  background: linear-gradient(135deg, #3b2b6b, #5a2c70);
}
.cs-face img { width: 100%; height: 100%; display: block; }
.cs-zp-av { width: 42px; height: 42px; font-size: 24px; }
.cs-zp-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.cs-zp-id b { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-zp-id span { font-size: 18px; color: var(--cs-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-ver { color: #7dd3fc; font-weight: 900; }
.cs-zp-z { font-size: 26px; font-weight: 900; color: #fff; opacity: .85; }
.cs-zp-text { font-size: 19px; line-height: 1.28; margin: 5px 0 7px; }
.cs-shot {
  border-radius: 12px; overflow: hidden;
  background: #f4f1ff; color: #241b3d;
  border: 1px solid #cfc6f0;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
  transform: rotate(-.6deg);
  padding-bottom: 6px;
}
.cs-shot-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 10px; margin-bottom: 4px;
  background: #e2dbfa; font-size: 18px; font-weight: 800; color: #5b3fd6;
}
.cs-shot-ss { font-weight: 600; color: #8a7fb0; font-style: italic; }
.cs-sbub { font-size: 18px; line-height: 1.22; margin: 4px 8px; padding: 4px 10px; border-radius: 12px; background: #e7e2fb; }
.cs-sbub-user { margin-left: 22%; background: #dcd6ee; }
.cs-sbub-infi { margin-right: 10%; background: #ece4ff; border: 1px solid #c9b8ff; }
.cs-zp-ctr { display: flex; gap: 16px; margin-top: 7px; font-size: 18px; color: var(--cs-ink2); }
.cs-zp-ctr b { font-variant-numeric: tabular-nums; }
.cs-heart { color: #ff8fb8; }
.cs-zp-trend { margin-top: 3px; font-size: 18px; font-weight: 800; color: #ff8fb8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── COVER */
.cs-cover { position: absolute; inset: 0; display: flex; gap: 14px; padding: 8px 14px 10px; }
.cs-cover-l { width: 424px; flex: none; display: flex; flex-direction: column; justify-content: center; gap: 6px; animation: csRise .5s cubic-bezier(.2, .9, .3, 1.1) both; }
.cs-cover-l .cs-zp { max-height: 376px; overflow: hidden; padding-top: 8px; }
.cs-cover-l .cs-zp-av { width: 36px; height: 36px; font-size: 21px; }
.cs-cover-l .cs-zp-text { margin: 3px 0 6px; }
.cs-cover-l .cs-shot-bar { padding: 1px 10px; margin-bottom: 2px; }
.cs-cover-l .cs-sbub { margin: 3px 8px; }
.cs-ribbon {
  flex: none; display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 18px; font-weight: 800; color: #ffb3cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-ribbon span { flex: none; display: inline-block; animation: csPulse 1.4s ease-in-out infinite; }
@keyframes csPulse { 50% { transform: scale(1.25); } }
.cs-cover-r { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; padding-top: 2px; }
.cs-cover-t { margin: 0; font-size: 27px; font-weight: 900; line-height: 1.08; letter-spacing: -.01em; }
.cs-note {
  position: relative;
  padding: 9px 12px 11px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff6a8, #ffe97a);
  color: #3a2c00;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .35);
  transform: rotate(.9deg);
  animation: csNote .55s .15s cubic-bezier(.2, .9, .3, 1.2) both;
}
.cs-note::before {   /* tape */
  content: ''; position: absolute; top: -9px; left: 50%; width: 70px; height: 18px; margin-left: -35px;
  background: rgba(255, 255, 255, .55); transform: rotate(-3deg);
}
.cs-note-h { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.cs-note-h b { font-size: 18px; }
.cs-note-av { width: 34px; height: 34px; font-size: 20px; }
.cs-note-t { font: 600 18px/1.28 "Chalkboard SE", "Marker Felt", "Comic Sans MS", var(--cs-font); }
.cs-note.is-robot { background: #eef0f3; color: #12141a; border-radius: 2px; transform: rotate(-.5deg); }
.cs-note.is-robot .cs-note-t { font: 700 18px/1.25 var(--cs-mono); }
.cs-go { margin-top: auto; height: 56px; font-size: 21px; }

/* ───────── EVIDENCE */
.cs-ev { position: absolute; inset: 0; display: flex; flex-direction: column; }
.cs-head {
  height: 58px; flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px;
  background: rgba(8, 5, 20, .45);
  border-bottom: 1px solid var(--cs-line);
}
.cs-post-btn { gap: 5px; padding: 0 10px; font-size: 22px; }
.cs-post-btn span { font-size: 18px; }
.cs-head-t { flex: 1; min-width: 0; line-height: 1.15; }
.cs-head-title { font-size: 20px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-board-btn { gap: 8px; font-variant-numeric: tabular-nums; }
.cs-board-btn.is-full { border-color: var(--cs-warn); color: #ffe2a3; }
.cs-tack-i {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9aa8 0%, #e8364f 45%, #8c1027 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .45);
}
.cs-solve-btn { padding: 0 16px; }

.cs-main { position: relative; flex: 1; min-height: 0; display: flex; }
.cs-rail {
  width: 148px; flex: none;
  display: flex; flex-direction: column; gap: 5px;
  padding: 7px 6px 7px 8px;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  border-right: 1px solid var(--cs-line);
  background: rgba(8, 5, 20, .25);
}
.cs-rail::-webkit-scrollbar { display: none; }
.cs-tabf {
  position: relative; flex: none;
  height: 50px; display: flex; align-items: center; gap: 8px;
  padding: 0 8px 0 10px;
  border-radius: 12px;
  background: var(--cs-glass); border: 1px solid var(--cs-line);
  font-size: 18px; font-weight: 800; color: var(--cs-ink2);
}
.cs-tabf-i { font-size: 21px; width: 26px; text-align: center; flex: none; }
.cs-tabf-l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-tabf.on {
  background: linear-gradient(180deg, #f6e3b0, #e9cd8a); border-color: #f6e3b0; color: #3b2a10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
.cs-tabf.is-new::after {
  content: ''; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--cs-amber); box-shadow: 0 0 8px var(--cs-amber);
}
.cs-tabf-n {
  position: absolute; top: -5px; right: -3px;
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px;
  display: grid; place-items: center;
  font: 800 18px/1 var(--cs-font); font-style: normal; color: #fff;
  background: var(--cs-yarn); box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}

.cs-doc { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-doc-h {
  height: 44px; flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--cs-line);
  background: rgba(255, 255, 255, .03);
}
.cs-doc-h b { font-size: 19px; white-space: nowrap; }
.cs-doc-i { font-size: 20px; }
.cs-doc-sub { flex: 1; min-width: 0; font-size: 18px; color: var(--cs-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-doc-s {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 10px 12px 64px;
  touch-action: pan-y; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.cs-doc-s::-webkit-scrollbar { width: 6px; }
.cs-doc-s::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 3px; }
.cs-doc-end { margin-top: 6px; text-align: center; font-size: 18px; color: var(--cs-ink3); opacity: .7; }

/* one pinnable line */
.cs-ln {
  position: relative;
  min-height: 50px;
  margin: 0 0 7px;
  padding: 7px 46px 7px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background-color .15s, border-color .15s;
}
.cs-ln:hover { background: rgba(255, 255, 255, .045); }
.cs-ln.is-pinned { background: rgba(255, 79, 116, .14); border-color: rgba(255, 79, 116, .6); }
.cs-pin-ic {                         /* a ghost pin on every line; a real red tack once pinned */
  position: absolute; right: 12px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .25);
  transition: transform .2s, opacity .2s;
}
.cs-ln.is-pinned .cs-pin-ic {
  border: 0;
  background: radial-gradient(circle at 35% 30%, #ff9aa8 0%, #e8364f 45%, #8c1027 100%);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .45);
}
.cs-ln.is-pop .cs-pin-ic { animation: csPinPop .38s cubic-bezier(.3, 1.6, .5, 1); }
.cs-ln.is-flash { animation: csFlash .9s ease-out; }
.cs-t { font-size: 19px; line-height: 1.3; }
.cs-aside { font-size: 18px; color: var(--cs-ink3); margin-top: 2px; }

/* chat + post bubbles */
.cs-ln-chat, .cs-ln-post, .cs-ln-pp { display: flex; }
.cs-ln-chat.is-infi, .cs-ln-post.is-infi, .cs-ln-pp.is-r { justify-content: flex-end; }
.cs-bub { max-width: 92%; padding: 5px 12px 7px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.cs-bub-infi { background: rgba(124, 92, 255, .26); border: 1px solid rgba(167, 139, 250, .35); border-bottom-right-radius: 4px; }
.cs-bub-user { border-bottom-left-radius: 4px; }
.cs-who { display: block; font-size: 18px; font-weight: 800; color: var(--cs-ink3); line-height: 1.2; }
.cs-bub-infi .cs-who { color: #d8ccff; }
.cs-sys {
  flex: 1; text-align: center; font-size: 18px; font-style: italic; color: var(--cs-amber);
  padding: 4px 8px; border: 1px dashed rgba(255, 207, 122, .45); border-radius: 10px;
}
.cs-ln-pp .cs-bub-pp { border-bottom-left-radius: 4px; background: rgba(56, 132, 255, .2); border: 1px solid rgba(96, 165, 250, .3); }
.cs-ln-pp.is-r .cs-bub-pp { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; background: rgba(255, 255, 255, .09); border-color: var(--cs-line); }
.cs-ln-pp .cs-who { color: #a8cbff; }
/* inside the light screenshot */
.cs-shot .cs-ln { margin: 3px 6px; min-height: 48px; padding: 4px 42px 4px 4px; }
.cs-shot .cs-ln:hover { background: rgba(0, 0, 0, .04); }
.cs-shot .cs-ln.is-pinned { background: rgba(255, 79, 116, .16); }
.cs-shot .cs-bub { background: #dcd6ee; color: #241b3d; }
.cs-shot .cs-bub-infi { background: #ece4ff; border-color: #c9b8ff; }
.cs-shot .cs-who { color: #6d5fa6; }
.cs-shot .cs-t { font-size: 18px; }
.cs-shot .cs-pin-ic { border-color: rgba(60, 40, 120, .3); }
.cs-zp.is-pinnable { margin-bottom: 4px; }

/* Z posts */
.cs-zl { display: flex; gap: 10px; }
.cs-zl-av { width: 40px; height: 40px; font-size: 19px; font-weight: 900; color: #fff; }
.cs-zl-b { flex: 1; min-width: 0; }
.cs-zl-h { display: flex; align-items: baseline; gap: 6px; line-height: 1.2; }
.cs-zl-h b { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.cs-zl-hd { font-size: 18px; color: var(--cs-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* training data */
.cs-ln-data { background: rgba(255, 207, 122, .05); border-left: 3px solid rgba(255, 207, 122, .4); }
.cs-src { display: flex; justify-content: space-between; gap: 10px; font: 700 18px/1.25 var(--cs-mono); color: var(--cs-amber); }
.cs-src > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-src-m { flex: none; color: var(--cs-ink3); font-weight: 600; }

/* config history */
.cs-cfg-top { display: flex; gap: 12px; font: 600 18px/1.25 var(--cs-mono); color: var(--cs-ink3); }
.cs-cfg-by { color: #c4b5fd; }
.cs-cfg-t { font: 800 19px/1.3 var(--cs-mono); color: #fff; word-break: break-word; }
.cs-cfg-m { font: italic 600 18px/1.25 var(--cs-mono); color: #8ee6b4; }

/* system prompt diff */
.cs-ln-diff { border-radius: 8px; }
.cs-ln-diff.is-add { background: rgba(61, 220, 151, .1); box-shadow: inset 4px 0 0 var(--cs-ok); }
.cs-ln-diff.is-del { background: rgba(255, 79, 116, .1); box-shadow: inset 4px 0 0 var(--cs-flag); }
.cs-ln-diff.is-pinned { background: rgba(255, 79, 116, .2); }
.cs-diff { display: flex; gap: 8px; font: 700 19px/1.3 var(--cs-mono); }
.cs-op { flex: none; width: 16px; font-weight: 900; }
.is-add .cs-op { color: var(--cs-ok); }
.is-del .cs-op { color: var(--cs-flag); }
.cs-ln-diff .cs-aside { font-family: var(--cs-mono); padding-left: 24px; }

/* a web page (light), with white-on-white text */
.cs-doc.is-doc .cs-doc-s { background: #f7f5fb; color: #261c3f; }
.cs-doc.is-doc .cs-doc-end { color: #8a7fb0; }
.cs-doc.is-doc .cs-ln:hover { background: rgba(0, 0, 0, .04); }
.cs-doc.is-doc .cs-ln.is-pinned { background: rgba(255, 79, 116, .14); border-color: rgba(255, 79, 116, .6); }
.cs-doc.is-doc .cs-aside { color: #7d73a0; }
.cs-doc.is-doc .cs-pin-ic { border-color: rgba(60, 40, 120, .25); }
.cs-hid { display: flex; flex-direction: column; gap: 2px; }
.cs-hid-blank { display: block; height: 22px; border-radius: 4px; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .025) 0 14px, transparent 14px 20px); }
.cs-hid-l { font-size: 18px; font-style: italic; color: #9a90bd; }
.cs-sel { display: inline; background: #2f6bff; color: #fff; padding: 1px 3px; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cs-ln.is-found { animation: csFlash .9s ease-out; }

.cs-hint {
  position: absolute; left: 160px; right: 12px; bottom: 10px;
  height: 46px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px;
  background: rgba(10, 6, 26, .92); border: 1px solid rgba(255, 207, 122, .45);
  font-size: 18px; color: var(--cs-ink2);
  pointer-events: none;
  animation: csBob 2.4s ease-in-out infinite;
}
.cs-hint b { color: #fff; }

/* ───────── BOARD (the corkboard) */
.cs-board {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 6px 12px 12px;
  background-color: #a87a4c;
  background-image:
    radial-gradient(rgba(60, 30, 5, .28) 1px, transparent 1.6px),
    radial-gradient(rgba(255, 235, 200, .14) 1px, transparent 1.6px),
    linear-gradient(160deg, rgba(255, 220, 170, .14), rgba(40, 20, 0, .18));
  background-size: 7px 7px, 11px 11px, 100% 100%;
  background-position: 0 0, 3px 5px, 0 0;
  box-shadow: inset 0 0 0 6px #5f4026, inset 0 0 0 8px #3d2815, inset 0 0 40px rgba(0, 0, 0, .35);
  animation: csFade .2s ease-out;
}
.cs-board-h {
  height: 52px; flex: none;
  display: flex; align-items: center; gap: 14px;
  font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.cs-board-h b { font: 900 18px/1 var(--cs-mono); letter-spacing: .12em; color: #ffe8b8; }
.cs-board-th { color: #fff6c7; }
.cs-cork {
  position: relative; flex: 1; min-height: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
  gap: 12px 14px;
  padding: 2px 4px 0;
}
.cs-card {
  --tilt: 0deg;
  position: relative; min-width: 0;
  padding: 15px 10px 8px;
  border-radius: 2px;
  background: var(--cs-paper); color: #2a2140;
  box-shadow: 0 7px 14px rgba(30, 12, 0, .45), 0 1px 0 rgba(255, 255, 255, .6) inset;
  transform: rotate(var(--tilt));
  animation: csCardIn .35s cubic-bezier(.3, 1.4, .5, 1) both;
}
.cs-card-h { font-size: 18px; font-weight: 900; color: #8a5a12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 26px; line-height: 1.2; }
.cs-card-t {
  font-size: 18px; line-height: 1.22; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-card-x { position: absolute; top: -2px; right: -4px; width: 48px; height: 48px; display: grid; place-items: center; z-index: 4; }
.cs-card-x span {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #2a2140; color: #fff; font: 800 20px/1 var(--cs-font);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}
.cs-card.is-empty {
  background: transparent; box-shadow: none; transform: none; animation: none;
  border: 2px dashed rgba(255, 245, 225, .45);
  display: grid; place-items: center; text-align: center;
  color: rgba(255, 248, 230, .92); text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.cs-card.is-empty .cs-card-t { font-weight: 700; padding: 0 8px; }
.cs-tack {
  position: absolute; top: -8px; left: 50%; width: 22px; height: 22px; margin-left: -11px; z-index: 5;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9aa8 0%, #e8364f 45%, #8c1027 100%);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .5);
}
.cs-tack.is-ghost { background: rgba(255, 248, 230, .25); box-shadow: none; border: 2px dashed rgba(255, 248, 230, .6); }
.cs-yarn { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 3; }
.cs-yarn-p {
  fill: none; stroke: var(--cs-yarn); stroke-width: 3.2; stroke-linecap: round;
  filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .45));
  stroke-dasharray: 900; stroke-dashoffset: 0;
  animation: csYarn .7s ease-out both;
}
.cs-yarn-k { fill: #ff8a9b; stroke: #8c1027; stroke-width: 1.5; }

/* ───────── SOLVE + REVIEW */
.cs-solve, .cs-review { position: absolute; inset: 0; display: flex; flex-direction: column; animation: csFade .2s ease-out; }
.cs-solve-h {
  height: 58px; flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 8px;
  background: rgba(8, 5, 20, .45);
  border-bottom: 1px solid var(--cs-line);
}
.cs-steps { display: flex; gap: 6px; margin-left: 4px; }
.cs-step {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 900; color: var(--cs-ink2);
  background: var(--cs-glass); border: 2px solid var(--cs-line);
}
.cs-step.done { border-color: var(--cs-ok); color: #c9ffe8; }
.cs-step.on { background: var(--cs-grad); border-color: transparent; color: #fff; }
.cs-solve-pins { font-size: 18px; font-weight: 800; color: var(--cs-ink2); white-space: nowrap; }
.cs-q { flex: none; padding: 8px 18px 2px; }
.cs-q h3 { margin: 2px 0 0; font-size: 26px; font-weight: 900; line-height: 1.12; letter-spacing: -.01em; }
.cs-opts {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 18px 14px;
  touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.cs-opt {
  flex: none; min-height: 56px;
  display: flex; align-items: center; gap: 12px;
  padding: 7px 14px 7px 10px;
  border-radius: 14px;
  background: var(--cs-glass); border: 1px solid var(--cs-line);
  font-size: 19px; font-weight: 650; line-height: 1.25;
  animation: csRise .3s cubic-bezier(.2, .9, .3, 1.1) both;
}
.cs-opt:nth-child(2) { animation-delay: .04s; }
.cs-opt:nth-child(3) { animation-delay: .08s; }
.cs-opt:nth-child(4) { animation-delay: .12s; }
.cs-opt:nth-child(5) { animation-delay: .16s; }
.cs-opt-l {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 900; background: rgba(255, 255, 255, .12);
}
.cs-opt.on { border-color: #ff8fd0; background: rgba(192, 74, 242, .26); box-shadow: 0 0 0 2px rgba(255, 143, 208, .35); }
.cs-opt.on .cs-opt-l { background: var(--cs-grad); color: #fff; }
.cs-locked {
  flex: none; min-height: 52px;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  border-radius: 14px; border: 2px dashed rgba(255, 255, 255, .22);
  font-size: 18px; font-weight: 700; color: var(--cs-ink3);
}
.cs-rev-k { font-size: 18px; }
.cs-rev-rows { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 6px; }
.cs-rev-row {
  position: relative; flex: none; min-height: 64px;
  padding: 7px 48px 8px 14px;
  border-radius: 14px; background: var(--cs-glass); border: 1px solid var(--cs-line);
}
.cs-rev-q { font-size: 18px; font-weight: 800; color: var(--cs-ink3); }
.cs-rev-a { font-size: 19px; font-weight: 750; line-height: 1.25; }
.cs-rev-a.is-empty { font-style: italic; color: var(--cs-warn); }
.cs-rev-ed { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--cs-ink3); }
.cs-stamp-btn {
  flex: none; margin: 4px 16px 12px; height: 60px; gap: 10px;
  font-size: 22px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #fff;
  background: linear-gradient(180deg, #ff4f74, #c81e3a);
  box-shadow: 0 6px 18px rgba(200, 30, 58, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.cs-stamp-btn.is-off { opacity: .45; }
.cs-stamp-i { font-size: 24px; }

/* ───────── THE TWIST (hustle) */
.cs-twist {
  position: absolute; inset: 0; display: flex; gap: 14px; padding: 12px 14px;
  background: radial-gradient(70% 90% at 20% 30%, rgba(255, 40, 80, .28), transparent 65%), #0c0716;
  animation: csFade .25s ease-out;
}
.cs-twist-l { width: 336px; flex: none; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.cs-twist-k { font-size: 54px; font-weight: 950; line-height: .95; color: var(--cs-flag); letter-spacing: .02em; text-shadow: 0 0 24px rgba(255, 79, 116, .5); animation: csSlam .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.cs-twist-sub { font-size: 18px; color: var(--cs-ink2); line-height: 1.25; }
.cs-pp { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; border-radius: 16px; background: #0f1426; border: 1px solid rgba(120, 160, 255, .25); }
.cs-pp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cs-pp-h b { font-size: 18px; }
.cs-pp-h span { font-size: 18px; color: var(--cs-ink3); }
.cs-pp-av { width: 34px; height: 34px; font-size: 18px; }
.cs-pp-b {
  width: fit-content; max-width: 100%;
  margin: 5px 0; padding: 5px 12px 6px;
  border-radius: 16px 16px 16px 4px;
  background: #2f6bff; color: #fff;
  font-size: 18px; line-height: 1.25;
  animation: csBubble .35s cubic-bezier(.2, 1.3, .4, 1) both;
}
.cs-twist-r { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.cs-choice {
  flex: none; min-height: 86px;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--cs-glass); border: 1px solid var(--cs-line);
  animation: csRise .35s cubic-bezier(.2, .9, .3, 1.1) both;
}
.cs-choice:nth-child(3) { animation-delay: .06s; }
.cs-choice:nth-child(4) { animation-delay: .12s; }
.cs-choice-i { font-size: 34px; flex: none; width: 44px; text-align: center; }
.cs-choice-b { display: flex; flex-direction: column; min-width: 0; line-height: 1.22; }
.cs-choice-b b { font-size: 21px; }
.cs-choice-b span { font-size: 18px; color: var(--cs-ink2); }
.cs-choice-own-up { border-color: rgba(61, 220, 151, .45); }
.cs-choice-quiet-fix { border-color: rgba(148, 163, 184, .5); }
.cs-choice-blame-brokbot { border-color: rgba(251, 146, 60, .55); }
.cs-micro { position: absolute; inset: 0; background: #07050f; }

/* ───────── REVEAL */
.cs-reveal {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: 10px 16px 10px;
  background: radial-gradient(80% 70% at 50% 0%, rgba(232, 54, 79, .22), transparent 60%), #08050f;
}
.cs-rv-h { flex: none; display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cs-rv-k { color: #ff6b85; letter-spacing: .3em; }
.cs-rv-t { margin: 0; font-size: 30px; font-weight: 950; line-height: 1.05; letter-spacing: -.01em; animation: csSlam .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.cs-rv-next { flex: none; }
.cs-tl { position: relative; flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0; }
.cs-tl::before {  /* the red yarn running through the timeline */
  content: ''; position: absolute; left: 131px; top: 18px; bottom: 18px; width: 3px; border-radius: 2px;
  background: var(--cs-yarn); opacity: .75; box-shadow: 0 0 10px rgba(232, 54, 79, .5);
}
.cs-beat {
  position: relative;
  display: grid; grid-template-columns: 108px 42px 1fr; gap: 0 12px; align-items: start;
  padding: 5px 0;
  animation: csBeat .5s cubic-bezier(.2, .9, .3, 1.1) both;
}
.cs-beat-w { font: 800 18px/1.25 var(--cs-mono); color: var(--cs-amber); text-align: right; padding-top: 9px; }
.cs-beat-i {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 21px;
  background: #241739; border: 3px solid var(--cs-yarn);
  box-shadow: 0 0 12px rgba(232, 54, 79, .4);
}
.cs-beat-t { font-size: 19px; line-height: 1.3; padding-top: 6px; }
.cs-tl.is-done .cs-beat { animation: none; }

/* ───────── VERDICT */
.cs-verdict {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 240px; grid-template-rows: 1fr auto; gap: 0 14px;
  padding: 10px 14px 0;
  background: radial-gradient(70% 60% at 100% 0%, rgba(124, 92, 255, .2), transparent 60%), #0b0716;
  animation: csFade .25s ease-out;
}
.cs-vd-l { min-height: 0; overflow-y: auto; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.cs-vd-punch {
  font-size: 20px; font-weight: 800; font-style: italic; line-height: 1.25;
  padding-left: 12px; border-left: 4px solid var(--cs-yarn); margin-bottom: 9px;
}
.cs-vd-rows { display: flex; flex-direction: column; gap: 7px; }
.cs-vd-row { display: flex; gap: 10px; align-items: flex-start; }
.cs-vd-ic { flex: none; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 900; color: #0b0716; }
.cs-vd-row.ok .cs-vd-ic { background: var(--cs-ok); }
.cs-vd-row.no .cs-vd-ic { background: var(--cs-flag); color: #fff; }
.cs-vd-b { flex: 1; min-width: 0; line-height: 1.22; }
.cs-vd-q { font-size: 18px; font-weight: 800; color: var(--cs-ink3); }
.cs-vd-a { font-size: 19px; font-weight: 650; }
.cs-vd-row.no .cs-vd-q { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-vd-mine { font-weight: 600; color: var(--cs-ink3); text-decoration-color: rgba(255, 79, 116, .8); }
.cs-vd-truth { font-size: 19px; color: #9ff0c9; font-weight: 700; }
.cs-vd-r { min-height: 0; display: flex; flex-direction: column; gap: 7px; padding-bottom: 10px; }
.cs-vd-stamp {
  align-self: center; margin-top: 2px;
  padding: 2px 12px;
  border: 4px solid currentColor; border-radius: 8px;
  font: 950 21px/1.15 var(--cs-font); letter-spacing: .03em; text-align: center; white-space: nowrap;
  transform: rotate(-6deg);
  animation: csStamp .5s cubic-bezier(.2, 1.5, .4, 1) both;
}
.cs-vd-stamp.is-good { color: var(--cs-ok); }
.cs-vd-stamp.is-ok { color: var(--cs-warn); }
.cs-vd-stamp.is-bad { color: var(--cs-flag); }
.cs-vd-stars { display: flex; justify-content: center; gap: 3px; font-size: 30px; line-height: 1; }
.cs-vd-stars span { color: rgba(255, 255, 255, .16); }
.cs-vd-stars span.on { color: #ffd166; text-shadow: 0 0 12px rgba(255, 209, 102, .5); animation: csStar .4s cubic-bezier(.3, 1.8, .5, 1) both; }
.cs-vd-chips { display: flex; justify-content: center; gap: 6px; }
.cs-chip { font-size: 18px; font-weight: 800; padding: 1px 10px; border-radius: 999px; }
.cs-chip-q { background: rgba(61, 220, 151, .16); color: #c9ffe8; }
.cs-chip-l { background: rgba(255, 79, 116, .18); color: #ffc1cd; }
.cs-vd-choice { flex: 0 1 auto; min-height: 0; overflow-y: auto; font-size: 18px; line-height: 1.25; padding: 5px 9px; border-radius: 10px; background: rgba(255, 194, 75, .12); color: #ffe7b0; }
.cs-vd-boss { flex: 0 1 auto; min-height: 0; overflow-y: auto; font-size: 18px; font-style: italic; line-height: 1.25; color: var(--cs-ink2); }
.cs-vd-close { flex: none; margin-top: auto; }
.cs-chyron {
  grid-column: 1 / -1;
  height: 42px; margin: 0 -14px;
  display: flex; align-items: center;
  background: #c81e3a; color: #fff; overflow: hidden;
}
.cs-chyron b { flex: none; height: 100%; display: flex; align-items: center; padding: 0 12px; background: #fff; color: #c81e3a; font-size: 18px; font-weight: 950; letter-spacing: .04em; }
.cs-chyron-t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 19px; font-weight: 800; }
.cs-chyron-t span { display: inline-block; padding-left: 14px; animation: csMarquee 16s 1.2s linear infinite; }
.cs-chyron-t i { font-style: normal; padding-right: 44px; }
.cs-chyron-t i + i::before { content: '✦'; margin-right: 44px; opacity: .7; }

/* ───────── FILES (no open case) */
.cs-files { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 12px 16px 10px; }
.cs-files-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }
.cs-files-t { font-size: 26px; font-weight: 900; line-height: 1.1; }
.cs-files-sub { max-width: 270px; font-size: 18px; line-height: 1.22; color: var(--cs-ink3); text-align: right; }
.cs-cabinet { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 26px 0 8px; }
.cs-fc {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 10px 10px;
  border-radius: 0 12px 12px 12px;
  background: linear-gradient(180deg, #f4e0ad, #e3c47e);
  color: #3b2a10;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.cs-fc-tab {
  position: absolute; left: 0; top: -24px; height: 26px; padding: 0 12px;
  border-radius: 10px 10px 0 0; background: #f4e0ad;
  font: 900 18px/26px var(--cs-mono); color: #6b4a12;
}
.cs-fc-code { font: 900 18px/1.2 var(--cs-mono); color: #8a5a12; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-fc-title { font-size: 19px; font-weight: 850; line-height: 1.15; }
.cs-fc-stars { margin-top: auto; font-size: 20px; color: #c27c0e; letter-spacing: -.02em; }
.cs-fc-when { margin-top: auto; font-size: 18px; font-weight: 700; color: #7a6136; line-height: 1.2; }
.cs-fc-open { margin-top: auto; align-self: flex-start; padding: 1px 8px; border-radius: 6px; background: var(--cs-flag); color: #fff; font-size: 18px; font-weight: 900; }
.cs-fc.is-future { filter: saturate(.25) brightness(.55); }
.cs-fc.is-closed::after {
  content: 'CLOSED'; position: absolute; right: 6px; top: 48%; transform: rotate(-14deg);
  font: 950 18px/1 var(--cs-font); letter-spacing: .08em; color: rgba(200, 30, 58, .55);
  border: 3px solid rgba(200, 30, 58, .5); border-radius: 6px; padding: 2px 6px;
}
.cs-files-foot { flex: none; text-align: center; font-size: 18px; color: var(--cs-ink3); }

/* ───────── toast + the flying card */
.cs-toast {
  position: absolute; left: 50%; bottom: 14px; z-index: 50;
  max-width: 660px; padding: 10px 18px;
  border-radius: 999px;
  background: rgba(12, 8, 28, .96); border: 1px solid rgba(255, 207, 122, .55);
  font-size: 18px; font-weight: 750; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: translate(-50%, 24px); opacity: 0;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), opacity .2s;
  pointer-events: none;
}
.cs-toast.on { transform: translate(-50%, 0); opacity: 1; }
.cs-fly { position: absolute; z-index: 60; pointer-events: none; border-radius: 3px; background: var(--cs-paper); box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }

/* ───────── motion */
@keyframes csRise { from { transform: translateY(14px); opacity: 0; } }
@keyframes csFade { from { opacity: 0; } }
@keyframes csNote { from { transform: rotate(-6deg) translateY(-24px) scale(.9); opacity: 0; } }
@keyframes csPinPop { 0% { transform: translateY(-16px) scale(1.7); } 60% { transform: translateY(2px) scale(.9); } 100% { transform: none; } }
@keyframes csFlash { 0%, 35% { background-color: rgba(255, 207, 122, .4); } }
@keyframes csBob { 50% { transform: translateY(-3px); } }
@keyframes csCardIn { from { transform: rotate(var(--tilt)) translateY(-18px) scale(.9); opacity: 0; } }
@keyframes csYarn { from { stroke-dashoffset: 900; } }
@keyframes csSlam { from { transform: scale(1.8); opacity: 0; } }
@keyframes csBubble { from { transform: translateY(10px) scale(.9); opacity: 0; } }
@keyframes csBeat { from { transform: translateX(-22px); opacity: 0; } }
@keyframes csStamp { 0% { transform: rotate(-6deg) scale(2.6); opacity: 0; } 70% { transform: rotate(-6deg) scale(.92); opacity: 1; } 100% { transform: rotate(-6deg) scale(1); } }
@keyframes csStar { from { transform: scale(0) rotate(-40deg); } }
@keyframes csMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.cs-calm *, .cs-calm *::before, .cs-calm *::after { animation: none !important; transition: none !important; }
.cs-calm .cs-chyron { height: auto; min-height: 42px; }
.cs-calm .cs-chyron-t { white-space: normal; padding: 4px 8px; }
.cs-calm .cs-chyron-t span { padding-left: 0; }
.cs-calm .cs-chyron-t i + i { display: none; }
