/* ---------- 📖 Character Stories (js/charstory.js) ----------
   A new character's story in Write it!'s Ink Pop look: the character's box on the left (above, on a phone or an
   iPad held upright), what's being taught beside it, and Pao Pao's caption along the bottom with replay and pause.
   The box size comes from the script (--box, and --k = box / 480 for everything that grows with it). */
.cs {
  --ink: #1d2233; --violet: #7a5cff; --violet-deep: #5134d0; --violet-soft: #efe9ff; --yellow: #ffc22e; --seal: #e0362c;
  --f-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --f-body: "Nunito", -apple-system, "PingFang SC", "Segoe UI", system-ui, sans-serif;
  --f-kai: "Kaiti SC", "STKaiti", "KaiTi", "PingFang SC", serif;
  --box: 480px; --k: 1;
  height: 100%; display: flex; flex-direction: column; min-height: 0;
  font-family: var(--f-body); font-weight: 800; color: var(--ink);
  -webkit-user-select: none; user-select: none;
}
.cs button { font-family: inherit; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cs .cs-zh { font-family: var(--f-kai); font-weight: 400; }

/* ---- top: Home, "1 of 6", the six parts, Skip ---- */
.cs-top {
  display: flex; align-items: center; gap: 16px; flex: none;
  padding: max(14px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 4px max(24px, env(safe-area-inset-left));
}
.cs-round {
  width: 56px; height: 56px; flex: none; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: #fff; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); transition: transform .08s, box-shadow .08s;
}
.cs-round svg { width: 28px; height: 28px; }
.cs-round:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.cs-round.cs-big { width: 80px; height: 80px; background: var(--violet); color: #fff; box-shadow: 0 6px 0 var(--ink); }
.cs-round.cs-big svg { width: 36px; height: 36px; color: #fff; }
.cs-count {
  flex: none; font-family: var(--f-display); font-size: 21px; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 7px 16px; box-shadow: 0 4px 0 var(--ink);
}
.cs-segs { flex: 1; min-width: 0; display: flex; gap: 8px; padding: 0 6px; }
.cs-seg { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; background: none; border: 0; padding: 8px 0 4px; margin: 0; min-height: 48px; }
.cs-seg-t { display: block; height: 14px; border-radius: 8px; background: #fff; border: 2.5px solid var(--ink); overflow: hidden; }
.cs-seg-f { display: block; height: 100%; width: 0; background: var(--violet); transition: width 1.2s ease-out; }
.cs-seg.done .cs-seg-f { width: 100% !important; }
.cs-seg-l { display: block; font-size: 13px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: #6b7083; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-seg.on .cs-seg-l { color: #3a22a8; }
.cs-skip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px 0 20px;
  font-family: var(--f-display) !important; font-size: 21px; background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink); transition: transform .08s, box-shadow .08s;
}
.cs-skip svg { width: 22px; height: 22px; }
.cs-skip:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }

/* ---- the stage: the box and what's being taught ---- */
.cs-stage {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: calc(52px * var(--k));
  padding: 14px max(32px, env(safe-area-inset-right)) 14px max(32px, env(safe-area-inset-left));
}
.cs-box {
  position: relative; flex: none; width: var(--box); height: var(--box); overflow: hidden;
  background-color: #fffdf8; border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 9px 0 var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cg stroke='%23e0573e' stroke-opacity='.32' stroke-width='.5' stroke-dasharray='2.2 1.6' vector-effect='non-scaling-stroke' fill='none'%3E%3Cpath d='M50 0V100M0 50H100'/%3E%3Cpath d='M0 0L100 100M100 0L0 100' stroke-opacity='.18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100% 100%;
}
.cs-box::after { content: ""; position: absolute; inset: 7px; border: 2px solid rgba(224, 87, 62, .28); border-radius: 18px; pointer-events: none; }
.cs-art, .cs-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cs-q { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: calc(var(--box) * .62); line-height: 1; color: #e6dccd; animation: cs-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.cs-nodata { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--box) * .7); line-height: 1; }
.cs-loading .cs-art { opacity: .35; }
.cs-loading .cs-box::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; z-index: 2; border-radius: 50%;
  border: 6px solid var(--violet-soft); border-top-color: var(--violet); animation: cs-spin .8s linear infinite;
}

/* overflow is hidden for long text, so the padding leaves room for the cards' hard shadows (6px down) and their pop */
.cs-panel { width: min(500px, 46%); max-height: var(--box); box-sizing: border-box; padding: 6px 8px 14px 4px; display: flex; flex-direction: column; align-items: flex-start; gap: calc(14px * var(--k)); overflow: hidden; }
.cs-panel:empty { display: none; }
.cs-tag {
  display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 15px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; border: 2.5px solid var(--ink); background: var(--violet-soft); color: #3a22a8;
}
.cs-tag svg { width: 16px; height: 16px; }
.cs-tag.hist { background: #e3efff; color: #1864ab; }
.cs-tag.trick { background: var(--yellow); color: var(--ink); }

/* Meet: the reading big, what it means, and the word it's in */
.cs-py { font-family: var(--f-display); font-size: calc(150px * var(--k)); line-height: 1; color: var(--violet); animation: cs-pop .55s cubic-bezier(.3, 1.6, .5, 1) .5s both; transform-origin: left center; }
.cs-py.long { font-size: calc(104px * var(--k)); }
.cs-mean { font-family: var(--f-display); font-size: calc(64px * var(--k)); line-height: 1.02; animation: cs-up .5s ease-out 1.1s both; overflow-wrap: anywhere; }
.cs-mean.long { font-size: calc(44px * var(--k)); }
.cs-word {
  display: flex; align-items: center; gap: 16px; max-width: 100%; margin-top: calc(14px * var(--k)); padding: 12px 20px 12px 14px; text-align: left;
  background: #fff; border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); animation: cs-up .5s ease-out 1.9s both;
}
.cs-word:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.cs-spk { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); display: grid; place-items: center; }
.cs-spk svg { width: 24px; height: 24px; }
.cs-word .cs-zh { font-size: 40px; line-height: 1; white-space: nowrap; }
.cs-wt { font-size: 22px; font-weight: 800; min-width: 0; }
.cs-wt b { color: var(--violet-deep); font-weight: 900; }

/* Parts: a card per part, each in its color, and which one gives the meaning and which the sound */
.cs-parts { display: flex; align-items: center; gap: calc(16px * var(--k)); width: 100%; }
/* the cards share the panel's width: three or four parts shrink to fit instead of running off the screen (Eva's idea #87) */
.cs-pc {
  width: calc(200px * var(--k)); height: calc(262px * var(--k)); flex: 0 1 auto; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #fff; border: 3px solid var(--c, var(--ink)); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); padding: 8px;
  animation: cs-pop .55s cubic-bezier(.3, 1.6, .5, 1) both;
}
.cs-pc svg { width: calc(132px * var(--k)); height: auto; max-width: 100%; aspect-ratio: 1; }
.cs-pc .cs-pglyph { font-size: calc(110px * var(--k)); line-height: 1.2; color: var(--c); }
.cs-pc b { font-family: var(--f-display); font-weight: 400; font-size: calc(28px * var(--k)); line-height: 1.1; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.cs-pc em { font-style: normal; font-size: 14px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: #fff; border-radius: 999px; padding: 4px 12px; background: var(--c, var(--ink)); }
.cs-parts.many .cs-pc { width: calc(150px * var(--k)); height: calc(210px * var(--k)); }
.cs-parts.many .cs-pc svg { width: calc(96px * var(--k)); }
.cs-parts.many .cs-pc b { font-size: calc(22px * var(--k)); }
.cs-parts.many .cs-pc em { font-size: 12px; letter-spacing: .4px; padding: 3px 8px; max-width: 100%; box-sizing: border-box; }
.cs-plus { font-family: var(--f-display); font-style: normal; font-size: calc(44px * var(--k)); flex: none; }

/* the parts slide apart and back together (or glow, when they don't sit side by side) */
.cs-part { transform-box: view-box; }
.cs-go-l { animation: cs-sl 1.8s ease-in-out .3s both; }
.cs-go-r { animation: cs-sr 1.8s ease-in-out .3s both; }
.cs-go-t { animation: cs-st 1.8s ease-in-out .3s both; }
.cs-go-b { animation: cs-sb 1.8s ease-in-out .3s both; }
.cs-glow { animation: cs-glow 1.1s ease-in-out .3s 2 both; }

/* History: the oldest forms, then today's */
.cs-forms { display: flex; flex-wrap: wrap; align-items: flex-start; gap: calc(10px * var(--k)); max-width: 100%; }
.cs-forms figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cs-forms figcaption { font-size: 13px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase; color: #6b5a3a; white-space: nowrap; }
.cs-old, .cs-now { width: calc(96px * var(--k)); height: calc(96px * var(--k)); border-radius: 16px; display: grid; place-items: center; overflow: hidden; }
.cs-old { background: #f4ecdc; border: 2.5px solid #d8ccb4; }
.cs-old img { width: 82%; height: 82%; object-fit: contain; }
.cs-now { background: #fff; border: 3px solid var(--ink); }
.cs-now svg { width: 84%; height: 84%; }
.cs-now .cs-zh { font-size: calc(70px * var(--k)); }
.cs-arr { align-self: center; margin-top: -18px; font-family: var(--f-display); font-size: calc(30px * var(--k)); animation: cs-up .5s ease-out both; }
.cs-forms.many .cs-old, .cs-forms.many .cs-now { width: calc(84px * var(--k)); height: calc(84px * var(--k)); }
.cs-src { font-size: 13px; color: #6b7083; }

/* Trick: always labeled one */
.cs-trickhead { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.cs-trickhead small { font-size: 16px; font-weight: 800; color: #4b5163; }
.cs-trick { font-size: calc(34px * var(--k)); font-weight: 900; line-height: 1.3; text-wrap: balance; animation: cs-up .5s ease-out .3s both; }
.cs-trick.long { font-size: calc(27px * var(--k)); }
.cs-trick .cs-zh { font-size: 1.3em; line-height: 1; }
.cs-trick b { color: var(--violet-deep); }

/* Strokes: how many, and each stroke's name lighting up as it's drawn */
.cs-n { font-family: var(--f-display); font-size: calc(64px * var(--k)); line-height: 1; }
.cs-chips { display: flex; flex-wrap: wrap; gap: calc(10px * var(--k)); max-width: 100%; }
.cs-chips > span {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff;
  font-size: calc(18px * var(--k)); font-weight: 900; transition: background .2s, color .2s, transform .2s;
}
.cs-chips > span .cs-zh { font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif; font-weight: 600; font-size: calc(23px * var(--k)); }
.cs-chips > span.now { background: var(--seal); color: #fff; transform: translateY(-5px); }
.cs-chips > span.done { background: #ffe8e5; }
.cs-chips.many { gap: 6px; }
.cs-chips.many > span { padding: 4px 8px; font-size: calc(15px * var(--k)); }
.cs-chips.many > span .cs-zh { font-size: calc(18px * var(--k)); }
.cs-tip { display: flex; gap: 8px; align-items: flex-start; font-size: calc(19px * var(--k)); line-height: 1.35; color: #4b5163; }

/* Check: which one is it? */
.cs-ask { font-size: calc(30px * var(--k)); font-weight: 900; line-height: 1.25; }
.cs-ask b { color: var(--violet-deep); }
.cs-opts { display: grid; grid-template-columns: repeat(2, auto); gap: calc(16px * var(--k)); }
.cs-opt {
  width: calc(172px * var(--k)); height: calc(150px * var(--k)); padding: 0; display: grid; place-items: center;
  background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink);
  animation: cs-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; transition: transform .08s, box-shadow .08s;
}
.cs-opt:nth-child(2) { animation-delay: .1s; } .cs-opt:nth-child(3) { animation-delay: .2s; } .cs-opt:nth-child(4) { animation-delay: .3s; }
.cs-opt .cs-zh { font-size: calc(96px * var(--k)); line-height: 1; }
.cs-opt:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.cs-opt.right { background: #d3f9e3; border-color: #1f7a4c; box-shadow: 0 6px 0 #1f7a4c; }
.cs-opt.wrong { background: #ffe3e3; border-color: #c92a2a; box-shadow: 0 6px 0 #c92a2a; animation: cs-shake .45s; }
.cs-opt:disabled:not(.right):not(.wrong) { opacity: .45; }

/* the character itself, popping in */
.cs-pop { animation: cs-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; }

/* ---- bottom: Pao Pao reads it, with replay and pause (or the button on to the next one) ---- */
.cs-bar {
  flex: none; display: flex; align-items: center; gap: 18px; min-height: 104px;
  margin: 0 max(24px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  padding: 10px 16px 10px 18px; background: #fff; border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink);
}
.cs-pao { width: 62px; height: 68px; flex: none; animation: cs-bob 2.6s ease-in-out infinite; }
.cs-cap { flex: 1; min-width: 0; font-size: 25px; line-height: 1.3; }
.cs-cap.long { font-size: 21px; }
.cs-cap .cs-zh { font-size: 1.2em; line-height: 1; }
.cs-cap b { color: var(--violet-deep); font-weight: 900; }
.cs-cap.cs-in { animation: cs-in .35s ease-out; }
.cs-ctl { display: flex; align-items: center; gap: 14px; flex: none; }
.cs-ctl[hidden], .cs-go[hidden] { display: none; }
.cs-go {
  flex: none; display: inline-flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 28px;
  font-family: var(--f-display) !important; font-size: 26px; color: #fff !important; background: var(--violet);
  border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); animation: cs-pop .45s cubic-bezier(.3, 1.6, .5, 1) both;
}
.cs-go svg { width: 28px; height: 28px; }
.cs-go .cs-zh { font-size: 1.15em; }
.cs-go:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.cs-go.cs-nudge { animation: cs-nudge 1.6s ease-in-out infinite; }
.cs-ctl [hidden] { display: none; }

/* the memory trick: the part being named lights up, in the character and in the words */
.cs-art path[data-g] { transition: opacity .35s; }
.cs-art.cs-hl path:not(.lit) { opacity: .16; }
.cs-trick .cs-zh { display: inline-block; margin: 0 .1em; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.cs-trick .cs-zh.lit { transform: scale(1.35); }

/* paused: everything holds still */
.cs-paused .cs-stage *, .cs-paused .cs-pao { animation-play-state: paused !important; }

/* ---- upright: the box on top, what's taught under it ---- */
.cs-tall .cs-stage { flex-direction: column; justify-content: flex-start; gap: calc(18px * var(--k)); padding-top: 10px; padding-bottom: 8px; }
.cs-tall .cs-panel { width: 100%; max-width: 620px; max-height: none; flex: 1; min-height: 0; align-items: center; text-align: center; }
.cs-tall .cs-py { font-size: calc(96px * var(--k)); transform-origin: center; }
.cs-tall .cs-py.long { font-size: calc(72px * var(--k)); }
.cs-tall .cs-mean { font-size: calc(48px * var(--k)); }
.cs-tall .cs-mean.long { font-size: calc(36px * var(--k)); }
.cs-tall .cs-word { margin-top: 0; }
.cs-tall .cs-forms, .cs-tall .cs-chips, .cs-tall .cs-parts, .cs-tall .cs-trickhead { justify-content: center; }
.cs-tall .cs-tip { text-align: left; }

/* phones */
@media (max-width: 700px), (max-height: 560px) {
  .cs-top { gap: 10px; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .cs-round { width: 48px; height: 48px; }
  .cs-round svg { width: 24px; height: 24px; }
  .cs-round.cs-big { width: 60px; height: 60px; }
  .cs-round.cs-big svg { width: 28px; height: 28px; }
  .cs-count { display: none; }
  .cs-segs { gap: 5px; padding: 0; }
  .cs-seg-l { font-size: 10px; letter-spacing: .3px; }
  .cs-skip { min-height: 46px; padding: 0 12px 0 14px; font-size: 18px; }
  .cs-stage { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .cs-bar { gap: 10px; min-height: 0; padding: 10px 12px; margin-left: max(12px, env(safe-area-inset-left)); margin-right: max(12px, env(safe-area-inset-right)); border-radius: 20px; }
  .cs-pao { width: 44px; height: 48px; }
  .cs-cap { font-size: 18px; }
  .cs-cap.long { font-size: 16px; }
  .cs-ctl { gap: 8px; }
  .cs-go { min-height: 52px; padding: 0 16px; font-size: 20px; gap: 8px; }
  .cs-word { padding: 8px 14px 8px 10px; gap: 10px; }
  .cs-word .cs-zh { font-size: 30px; }
  .cs-wt { font-size: 17px; }
  .cs-spk { width: 40px; height: 40px; }
  .cs-tag { font-size: 13px; padding: 4px 11px; }
  .cs-trickhead small { font-size: 14px; }
}
@media (max-width: 420px) {
  .cs-seg-l { display: none; }
  .cs-seg { min-height: 30px; }
}

/* a phone held sideways sees the iPad layout at about half size (81px here = 44pt, 28px = 15pt):
   bigger words and buttons, clear of the notch (108px) and the home bar */
html.phone-side .cs-top { gap: 18px; padding: 10px max(108px, env(safe-area-inset-right)) 4px max(108px, env(safe-area-inset-left)); }
html.phone-side .cs-round { width: 81px; height: 81px; }
html.phone-side .cs-round svg { width: 38px; height: 38px; }
html.phone-side .cs-round.cs-big { width: 96px; height: 96px; }
html.phone-side .cs-round.cs-big svg { width: 44px; height: 44px; }
html.phone-side .cs-count { font-size: 30px; padding: 12px 22px; }
html.phone-side .cs-segs { gap: 10px; }
html.phone-side .cs-seg { gap: 8px; min-height: 81px; justify-content: center; }
html.phone-side .cs-seg-t { height: 18px; }
html.phone-side .cs-seg-l { font-size: 24px; letter-spacing: .4px; }
html.phone-side .cs-skip { min-height: 81px; padding: 0 22px 0 28px; font-size: 32px; }
html.phone-side .cs-skip svg { width: 30px; height: 30px; }
html.phone-side .cs-panel { width: min(780px, 52%); }
html.phone-side .cs-stage { padding-top: 6px; padding-bottom: 6px; padding-left: max(108px, env(safe-area-inset-left)); padding-right: max(108px, env(safe-area-inset-right)); }
html.phone-side .cs-tag { font-size: 26px; padding: 6px 16px; }
html.phone-side .cs-tag svg { width: 26px; height: 26px; }
html.phone-side .cs-wt { font-size: 30px; }
html.phone-side .cs-word .cs-zh { font-size: 52px; }
html.phone-side .cs-spk { width: 72px; height: 72px; }
html.phone-side .cs-spk svg { width: 36px; height: 36px; }
html.phone-side .cs-pc em, html.phone-side .cs-forms figcaption, html.phone-side .cs-src { font-size: 24px; }
html.phone-side .cs-trickhead small { font-size: 26px; }
html.phone-side .cs-pc b { font-size: max(32px, calc(28px * var(--k))); }
html.phone-side .cs-trick { font-size: max(38px, calc(34px * var(--k))); }
html.phone-side .cs-trick.long { font-size: max(32px, calc(27px * var(--k))); }
html.phone-side .cs-tip { font-size: 28px; }
html.phone-side .cs-ask { font-size: max(36px, calc(30px * var(--k))); }
html.phone-side .cs-chips > span { font-size: 26px; }
html.phone-side .cs-chips > span .cs-zh { font-size: 32px; }
html.phone-side .cs-bar {
  gap: 18px; min-height: 0; padding: 10px 14px 10px 22px; border-radius: 28px;
  margin: 0 max(108px, env(safe-area-inset-right)) 39px max(108px, env(safe-area-inset-left));
}
html.phone-side .cs-pao { display: none; }
html.phone-side .cs-cap { font-size: 32px; line-height: 1.25; }
html.phone-side .cs-cap.long { font-size: 28px; }
html.phone-side .cs-ctl { gap: 16px; }
html.phone-side .cs-go { min-height: 81px; padding: 0 30px; font-size: 34px; }
html.phone-side .cs-go svg { width: 34px; height: 34px; }

@keyframes cs-pop { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }
@keyframes cs-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cs-in { from { opacity: .2; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cs-bob { 50% { transform: translateY(-6px); } }
@keyframes cs-spin { to { transform: rotate(360deg); } }
@keyframes cs-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes cs-sl { 0%, 100% { transform: translateX(0); } 35%, 70% { transform: translateX(-90px); } }
@keyframes cs-sr { 0%, 100% { transform: translateX(0); } 35%, 70% { transform: translateX(90px); } }
@keyframes cs-st { 0%, 100% { transform: translateY(0); } 35%, 70% { transform: translateY(-80px); } }
@keyframes cs-sb { 0%, 100% { transform: translateY(0); } 35%, 70% { transform: translateY(80px); } }
@keyframes cs-glow { 50% { opacity: .35; } }
@keyframes cs-nudge { 0%, 55%, 100% { transform: none; } 25% { transform: translateY(-7px) scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  .cs *, .cs-pao { animation-duration: .01s !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
  .cs-loading .cs-box::before { animation: none; }
}
