/* placeholder */

/* ==== BEGIN pl-story / pl-q / pl-write (story.js, questions.js, storywrite.js) ==== */

/* ---------------- questions (quiz + logic) ---------------- */
.pl-q { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 20px; margin: 0 auto; }
.pl-q-prog { display: flex; justify-content: center; gap: 10px; padding-top: 12px; }
.pl-q-pdot {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-size: 20px; font-weight: 800; color: color-mix(in srgb, var(--wc, #6C5CE7) 70%, #000);
  background: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.10); opacity: .7;
}
.pl-q-pdot.cur { opacity: 1; transform: scale(1.15); box-shadow: 0 0 0 4px var(--wc, #6C5CE7), 0 4px 0 rgba(0,0,0,.1); animation: sk-float 1.8s ease-in-out infinite; }
.pl-q-pdot.star { opacity: 1; background: #FFF4CF; font-size: 24px; }
.pl-q-pdot.ok { opacity: 1; background: #DDF8EF; color: var(--mint-d); }
.pl-q-card {
  background: #fff; border-radius: 34px; padding: 20px 20px 22px;
  box-shadow: 0 10px 0 color-mix(in srgb, var(--wc, #6C5CE7) 30%, #fff), 0 22px 40px rgba(0,0,0,.12);
  display: flex; flex-direction: column; gap: 14px; align-items: stretch;
}
.pl-q-card.pl-q-in { animation: sk-rise .45s cubic-bezier(.34,1.56,.64,1); }
.pl-q-visual { display: flex; justify-content: center; }
.pl-q-clock { width: 190px; height: 190px; filter: drop-shadow(0 10px 14px rgba(45,42,69,.22)); animation: sk-pop .5s cubic-bezier(.34,1.56,.64,1); }
.pl-q-img { width: 170px; height: 170px; object-fit: contain; border-radius: 26px; background: #F6F5FF; filter: drop-shadow(0 8px 10px rgba(0,0,0,.15)); }
.pl-q-bigemo {
  font-size: 84px; line-height: 1.15; text-align: center; letter-spacing: 4px; word-break: break-word;
  padding: 8px 18px; border-radius: 28px; background: linear-gradient(170deg, #F6F5FF, #fff);
  filter: drop-shadow(0 6px 4px rgba(0,0,0,.12));
}
.pl-q-bigemo.some { font-size: 60px; }
.pl-q-bigemo.many { font-size: 40px; letter-spacing: 2px; max-width: 640px; }
.pl-q-seq {
  font-size: 58px; font-weight: 800; line-height: 1.25; text-align: center; color: var(--ink);
  padding: 10px 20px; border-radius: 28px; background: linear-gradient(170deg, #F6F5FF, #fff); word-break: break-word;
}
.pl-q-seq .pl-q-ie { font-size: 1em; }
.pl-q-seq.many { font-size: 44px; }
.pl-q-head { display: flex; align-items: center; gap: 12px; justify-content: center; }
.pl-q-text { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.2; text-align: center; color: var(--ink); flex: 1 1 auto; }
.pl-q-text.long { font-size: 24px; }
.pl-q-text.spell { font-size: 60px; letter-spacing: 10px; }
.pl-q-blank { display: inline-block; min-width: .7em; color: var(--pink); animation: sk-float 1.6s ease-in-out infinite; }
.pl-q-ie { font-size: 1.3em; vertical-align: -.08em; }
.pl-q-gap { display: inline-block; animation: sk-wiggle 1.6s ease-in-out infinite; }
.pl-q-hear {
  flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; font-size: 34px;
  background: var(--sky); color: #fff; box-shadow: 0 6px 0 var(--sky-d), 0 10px 16px rgba(0,0,0,.12);
}
.pl-q-hear:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--sky-d); }
.pl-q-choices { display: grid; gap: 14px; grid-template-columns: 1fr; }
.pl-q-choices.n4 { grid-template-columns: 1fr 1fr; }
.pl-q-choices.emo { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.pl-q-choice {
  min-height: 80px; border-radius: 26px; padding: 10px 18px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(170deg, #fff, #F3F1FF); color: var(--ink);
  border: 4px solid color-mix(in srgb, var(--wc, #6C5CE7) 30%, #fff);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--wc, #6C5CE7) 45%, #fff), 0 12px 20px rgba(0,0,0,.08);
  font-size: 28px; font-weight: 800; line-height: 1.1;
  animation: sk-rise .45s both cubic-bezier(.34,1.56,.64,1);
  transition: transform .12s, opacity .2s;
}
.pl-q-choice:active { transform: translateY(7px); box-shadow: 0 1px 0 color-mix(in srgb, var(--wc, #6C5CE7) 45%, #fff); }
.pl-q-choices.emo .pl-q-choice { min-height: 130px; }
.pl-q-choices.emo.multi, .pl-q-choices.emo.multi4 { grid-template-columns: 1fr; }
.pl-q-choices.emo.multi .pl-q-choice, .pl-q-choices.emo.multi4 .pl-q-choice { min-height: 96px; }
.pl-q-choices.emo.multi .pl-q-ce { font-size: 56px; letter-spacing: 2px; }
.pl-q-choices.emo.multi4 .pl-q-ce { font-size: 40px; letter-spacing: 1px; }
.pl-q-ce { word-break: break-word; text-align: center; }
.pl-q-choices.short { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
.pl-q-choices.short .pl-q-choice { min-height: 110px; }
.pl-q-choices.short .pl-q-ct { font-size: 54px; }
.pl-q-ce { font-size: 84px; line-height: 1; filter: drop-shadow(0 5px 3px rgba(0,0,0,.2)); }
.pl-q-ci { font-size: 50px; line-height: 1; filter: drop-shadow(0 4px 2px rgba(0,0,0,.18)); }
.pl-q-ct.huge { font-size: 46px; }
.pl-q-choice.is-correct {
  background: linear-gradient(170deg, #6FE3C2, var(--mint)); color: #fff; border-color: var(--mint-d);
  box-shadow: 0 8px 0 var(--mint-d), 0 0 0 6px rgba(0,184,148,.25); animation: pl-q-yay .6s cubic-bezier(.34,1.56,.64,1);
}
.pl-q-choice.is-wrong { animation: sk-shake .45s; background: #FFE4DE; border-color: #FFB4A6; opacity: .55; }
.pl-q-choice.is-dim { opacity: .35; }
.pl-q-choice:disabled { cursor: default; }
.pl-q-after { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pl-q-after:empty { display: none; }
.pl-q-note {
  width: 100%; display: flex; gap: 12px; align-items: center; text-align: left;
  background: #E9F8FF; color: #0B5C8F; border: 3px solid #BDE6FB; border-radius: 24px; padding: 12px 18px;
  font-size: 21px; font-weight: 700; line-height: 1.3; animation: sk-pop .4s cubic-bezier(.34,1.56,.64,1);
}
.pl-q-note-e { font-size: 38px; flex: 0 0 auto; }
.pl-q-next {
  width: 140px; height: 84px; border-radius: 28px; font-size: 44px; color: #fff;
  background: var(--pink); box-shadow: 0 8px 0 var(--pink-d), 0 14px 24px rgba(0,0,0,.16);
  animation: sk-pop .4s cubic-bezier(.34,1.56,.64,1), pl-nudge 1.4s 1s ease-in-out infinite;
}
.pl-q-next:active { transform: translateY(7px); box-shadow: 0 1px 0 var(--pink-d); }

/* ---------------- story (read + listen) ---------------- */
.pl-story { --sc: #E17055; width: 100%; max-width: 1100px; margin: 0 auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.pl-story-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pl-story-chip {
  min-height: 48px; padding: 4px 18px; border-radius: 999px; font-size: 19px; font-weight: 800;
  background: #fff; color: color-mix(in srgb, var(--sc) 75%, #000); box-shadow: 0 4px 0 rgba(0,0,0,.1);
  display: inline-flex; align-items: center; gap: 6px;
}
.pl-story-chip.val { background: #FFF4D6; color: #B7791F; }
.pl-story-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.pl-story-book {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  background: #FFFDF7; border-radius: 34px; overflow: hidden;
  box-shadow: 0 10px 0 color-mix(in srgb, var(--sc) 45%, #fff), 0 24px 40px rgba(0,0,0,.14);
  border: 5px solid #fff; touch-action: pan-y;
}
.pl-story-stage { position: relative; flex: 0 0 40%; min-height: 200px; overflow: hidden; perspective: 600px; }
.pl-story-stage.turn-r { animation: pl-story-in-r .5s cubic-bezier(.34,1.56,.64,1); }
.pl-story-stage.turn-l { animation: pl-story-in-l .5s cubic-bezier(.34,1.56,.64,1); }
.pl-story-sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--s1), var(--s2)); }
.pl-story-sun { position: absolute; right: 8%; top: 10%; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #FFF7C2, #FFD55A); box-shadow: 0 0 0 12px rgba(255,213,90,.25); animation: sk-spin 30s linear infinite; }
.pl-story-cloud { position: absolute; width: 110px; height: 34px; border-radius: 999px; background: #fff; opacity: .9; animation: pl-story-drift 26s linear infinite; }
.pl-story-cloud::before { content: ''; position: absolute; left: 22px; top: -18px; width: 50px; height: 44px; border-radius: 50%; background: #fff; }
.pl-story-cloud.c1 { top: 12%; left: -20%; }
.pl-story-cloud.c2 { top: 30%; left: -40%; transform: scale(.7); animation-duration: 34s; animation-delay: -12s; }
.pl-story-hill { position: absolute; bottom: -40%; border-radius: 50%; }
.pl-story-hill.h1 { left: -20%; width: 90%; height: 70%; background: linear-gradient(#9BE38F, #6CCB6A); }
.pl-story-hill.h2 { right: -25%; width: 90%; height: 62%; background: linear-gradient(#B5EFA0, #82D67A); }
.pl-story-spark { position: absolute; font-style: normal; font-size: 22px; animation: pl-story-twinkle 2.4s ease-in-out infinite; }
.pl-story-spark.s1 { left: 12%; top: 16%; }
.pl-story-spark.s2 { left: 70%; top: 48%; animation-delay: -1.2s; }
.pl-story-actor {
  --s: 1; position: absolute; transform: translate(-50%, -50%); line-height: 1;
  font-size: calc(clamp(64px, 11vh, 120px) * var(--s));
  filter: drop-shadow(0 12px 6px rgba(0,0,0,.22));
  animation: pl-story-bob 2.6s ease-in-out infinite; z-index: 2;
}
.pl-story-actor.a-sway { animation-name: pl-story-sway; }
.pl-story-actor.a-hop { animation-name: pl-story-hop; animation-duration: 1.8s; }
.pl-story-actor.a-float { animation-name: pl-story-float; animation-duration: 3.4s; }
.pl-story-stage.talking .pl-story-actor:first-of-type { animation: pl-story-talk .5s ease-in-out infinite; }
.pl-story-textwrap { flex: 1 1 auto; min-height: 0; display: flex; position: relative; }
.pl-story-text {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 22px 16px;
  font-size: clamp(22px, 3.2vh, 32px); font-weight: 700; line-height: 1.45; color: var(--ink);
  display: flex; flex-direction: column; position: relative;
}
.pl-story-text > :first-child { margin-top: auto; }
.pl-story-text > :last-child { margin-bottom: auto; }
.pl-story-text.short { font-size: clamp(26px, 4vh, 40px); }
.pl-story-text.long { font-size: clamp(19px, 2.7vh, 27px); }
.pl-story-text.turn { animation: sk-fade .5s; }
.pl-story-para { margin: 0 0 .4em; }
.pl-story-para:last-child { margin-bottom: 0; }
.pl-story-w { display: inline-block; padding: 0 2px; border-radius: 10px; transition: background .15s, color .15s, transform .15s; cursor: pointer; }
.pl-story-w.done { color: color-mix(in srgb, var(--sc) 60%, var(--ink)); }
.pl-story-w.on { background: #FFE066; color: var(--ink); transform: translateY(-3px) scale(1.08); box-shadow: 0 3px 0 #E0B83C; }
.pl-story-w.tap { animation: pl-story-wtap .5s; }
.pl-story-dots { display: flex; justify-content: center; gap: 7px; align-items: center; min-height: 14px; }
.pl-story-dots i { width: 12px; height: 12px; border-radius: 50%; background: color-mix(in srgb, var(--sc) 25%, #fff); transition: width .2s; }
.pl-story-dots i.seen { background: color-mix(in srgb, var(--sc) 55%, #fff); }
.pl-story-dots i.on { width: 32px; border-radius: 999px; background: var(--sc); }
.pl-story-pn { font-size: 22px; font-weight: 800; color: color-mix(in srgb, var(--sc) 70%, #000); background: #fff; border-radius: 999px; padding: 0 16px; }
.pl-story-ctr { display: flex; justify-content: center; gap: 18px; flex: 0 0 auto; }
.pl-story-btn {
  width: 104px; height: 78px; border-radius: 26px; font-size: 38px; color: #fff;
  background: var(--sc); box-shadow: 0 8px 0 color-mix(in srgb, var(--sc) 65%, #000), 0 14px 22px rgba(0,0,0,.14);
}
.pl-story-btn:active { transform: translateY(7px); box-shadow: 0 1px 0 color-mix(in srgb, var(--sc) 65%, #000); }
.pl-story-btn:disabled { opacity: .3; }
.pl-story-btn.read { background: var(--sky); box-shadow: 0 8px 0 var(--sky-d), 0 14px 22px rgba(0,0,0,.14); }
.pl-story-btn.read.on { background: var(--coral); box-shadow: 0 8px 0 var(--coral-d), 0 14px 22px rgba(0,0,0,.14); }
.pl-story-btn.next.last { background: var(--pink); box-shadow: 0 8px 0 var(--pink-d), 0 14px 22px rgba(0,0,0,.14); animation: pl-nudge 1.4s ease-in-out infinite; }

.pl-story-quiz {
  width: 100%; max-width: 760px; margin: 0 auto; background: #fff; border-radius: 34px; padding: 18px 20px 24px;
  box-shadow: 0 10px 0 color-mix(in srgb, var(--sc) 40%, #fff), 0 22px 40px rgba(0,0,0,.12);
  display: flex; flex-direction: column; gap: 14px; align-items: stretch; animation: sk-rise .45s cubic-bezier(.34,1.56,.64,1);
}
.pl-story-qtop { display: flex; justify-content: center; }
.pl-story-qn { font-size: 22px; font-weight: 800; padding: 4px 18px; border-radius: 999px; background: color-mix(in srgb, var(--sc) 15%, #fff); color: color-mix(in srgb, var(--sc) 75%, #000); }
.pl-story-qhead { display: flex; align-items: center; gap: 12px; }
.pl-story-qq { margin: 0; flex: 1 1 auto; font-size: 30px; line-height: 1.2; font-weight: 800; text-align: center; }
.pl-story-qhear { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; font-size: 34px; background: var(--sky); color: #fff; box-shadow: 0 6px 0 var(--sky-d); }
.pl-story-choices { display: flex; flex-direction: column; gap: 14px; }
.pl-story-choice {
  --cc: var(--grape);
  min-height: 80px; border-radius: 26px; padding: 8px 18px 8px 10px; display: flex; align-items: center; gap: 14px; text-align: left;
  background: #fff; border: 4px solid color-mix(in srgb, var(--cc) 35%, #fff); color: var(--ink);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--cc) 50%, #fff); font-size: 26px; font-weight: 800; line-height: 1.15;
  animation: sk-rise .45s both cubic-bezier(.34,1.56,.64,1);
}
.pl-story-choice:active { transform: translateY(7px); box-shadow: 0 1px 0 color-mix(in srgb, var(--cc) 50%, #fff); }
.pl-story-tag { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--cc); font-size: 28px; }
.pl-story-choice.is-correct { background: linear-gradient(170deg, #6FE3C2, var(--mint)); color: #fff; border-color: var(--mint-d); box-shadow: 0 8px 0 var(--mint-d); animation: pl-q-yay .6s cubic-bezier(.34,1.56,.64,1); }
.pl-story-choice.is-wrong { animation: sk-shake .45s; background: #FFE4DE; opacity: .55; }
.pl-story-choice.is-dim { opacity: .35; }
.pl-story-qnext {
  align-self: center; width: 140px; height: 84px; border-radius: 28px; font-size: 44px; color: #fff;
  background: var(--pink); box-shadow: 0 8px 0 var(--pink-d), 0 14px 24px rgba(0,0,0,.16);
  animation: sk-pop .4s cubic-bezier(.34,1.56,.64,1), pl-nudge 1.4s 1s ease-in-out infinite;
}

.pl-story-end { width: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 4px 4px 16px; }
.pl-story-endhero { align-self: center; font-size: 100px; line-height: 1.1; animation: sk-float 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 6px rgba(0,0,0,.2)); }
.pl-story-endcard {
  display: flex; gap: 14px; align-items: center; text-align: left; border-radius: 28px; padding: 14px 20px;
  font-size: 23px; font-weight: 700; line-height: 1.3; color: var(--ink); border: 4px solid;
  animation: sk-rise .5s both cubic-bezier(.34,1.56,.64,1);
}
.pl-story-endcard small { display: block; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.pl-story-endic { font-size: 46px; flex: 0 0 auto; }
.pl-story-endcard.moral { background: #FFF7DD; border-color: #FFE29A; font-size: 27px; box-shadow: 0 8px 0 #F2CF6E; }
.pl-story-endcard.moral small { color: #B7791F; }
.pl-story-endcard.fact { background: #E9F8FF; border-color: #BDE6FB; animation-delay: .15s; }
.pl-story-endcard.fact small { color: #0B5C8F; }
.pl-story-endcard.try { background: #E6FBF3; border-color: #AEEBD5; animation-delay: .3s; }
.pl-story-endcard.try small { color: #08795F; }
.pl-story-done {
  align-self: center; width: 150px; height: 96px; border-radius: 30px; font-size: 56px;
  background: var(--sun); box-shadow: 0 9px 0 var(--sun-d), 0 16px 26px rgba(0,0,0,.16);
  animation: sk-pop .5s .4s both cubic-bezier(.34,1.56,.64,1), pl-nudge 1.4s 1.2s ease-in-out infinite;
  position: sticky; bottom: 10px; z-index: 3; flex: 0 0 auto;
}
.pl-story-done:active { transform: translateY(8px); box-shadow: 0 1px 0 var(--sun-d); }

/* wide: open book (picture left, words right) */
@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  .pl-story-book { flex-direction: row; }
  .pl-story-stage { flex: 0 0 50%; min-height: 0; }
  .pl-story-text { padding: 20px 34px; font-size: clamp(24px, 2.4vw, 36px); }
  .pl-story-text.long { font-size: clamp(20px, 1.8vw, 28px); }
  .pl-story-text.short { font-size: clamp(30px, 3vw, 44px); }
  .pl-story-actor { font-size: calc(clamp(80px, 15vh, 150px) * var(--s)); }
}

/* ---------------- story_write ---------------- */
.pl-write { width: 100%; max-width: 1060px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding: 2px 4px 24px; }
.pl-write-mission {
  display: flex; align-items: center; gap: 14px; text-align: left; color: #fff; border-radius: 30px; padding: 14px 20px;
  background: linear-gradient(135deg, #FF6B9D, #FF9F43); box-shadow: 0 8px 0 #E2487C, 0 16px 26px rgba(0,0,0,.14);
  font-size: 22px; font-weight: 700; line-height: 1.3; animation: sk-pop .45s cubic-bezier(.34,1.56,.64,1);
}
.pl-write-mission small { display: block; font-size: 16px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; opacity: .85; }
.pl-write-mic { font-size: 48px; flex: 0 0 auto; animation: sk-wiggle 2.4s ease-in-out infinite; }
.pl-write-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.pl-write-main, .pl-write-box, .pl-write-shelf {
  background: #fff; border-radius: 30px; padding: 16px; box-shadow: 0 8px 0 rgba(108,92,231,.18), 0 16px 26px rgba(0,0,0,.08);
}
.pl-write-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pl-write, .pl-write *, .pl-q *, .pl-story * { box-sizing: border-box; }
.pl-write-side { display: flex; flex-direction: column; gap: 14px; }
.pl-write-bookhead { display: flex; gap: 12px; align-items: center; }
.pl-write-bigcover {
  flex: 0 0 auto; width: 84px; height: 96px; border-radius: 10px 22px 22px 10px; display: grid; place-items: center; font-size: 52px;
  background: linear-gradient(135deg, #A29BFE, #6C5CE7); box-shadow: inset 8px 0 0 rgba(0,0,0,.15), 0 6px 0 #5546C9;
}
.pl-write-bigcover.pop { animation: sk-pop .45s cubic-bezier(.34,1.56,.64,1); }
.pl-write-title {
  flex: 1 1 auto; min-width: 0; height: 72px; border-radius: 22px; border: 4px solid #E4E0FF; padding: 0 18px;
  font: 800 26px var(--font); color: var(--ink); background: #FBFAFF; outline: none;
}
.pl-write-title:focus, .pl-write-ta:focus { border-color: var(--grape); }
.pl-write-covers { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-write-cover {
  width: 72px; height: 72px; border-radius: 22px; font-size: 40px; background: #F6F5FF; border: 4px solid transparent;
  transition: transform .15s;
}
.pl-write-cover.on { border-color: var(--grape); background: #ECE9FF; transform: scale(1.1) rotate(-4deg); }
.pl-write-ta {
  width: 100%; min-height: 170px; resize: vertical; border-radius: 24px; border: 4px solid #E4E0FF; padding: 14px 18px;
  font: 700 26px/1.5 var(--font); color: var(--ink); outline: none;
  background: repeating-linear-gradient(#FFFEF8 0 38px, #E8E4FF 38px 39px); background-attachment: local;
}
.pl-write-tools {
  display: flex; gap: 12px; align-items: center;
  position: sticky; bottom: 0; z-index: 2; background: #fff; padding: 8px 0 4px; margin-bottom: -4px;
}
.pl-write-micbtn {
  flex: 0 0 auto; width: 80px; height: 80px; border-radius: 50%; font-size: 40px; background: var(--coral); color: #fff;
  box-shadow: 0 7px 0 var(--coral-d), 0 12px 18px rgba(0,0,0,.14);
}
.pl-write-micbtn.on { animation: pl-write-rec 1s ease-in-out infinite; background: #E84343; }
.pl-write-meter { position: relative; flex: 1 1 auto; height: 44px; border-radius: 999px; background: #F0EEFF; overflow: hidden; }
.pl-write-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #A29BFE, #6C5CE7); transition: width .3s; }
.pl-write-meter.full .pl-write-fill { background: linear-gradient(90deg, #6FE3C2, #00B894); }
.pl-write-count { position: relative; display: block; text-align: center; line-height: 44px; font-size: 22px; color: var(--ink); }
.pl-write-done {
  flex: 0 0 auto; height: 80px; min-width: 120px; border-radius: 26px; font-size: 38px; background: #D9D5F2; color: #fff;
  box-shadow: 0 7px 0 #B9B3E0;
}
.pl-write-done.ready { background: var(--mint); box-shadow: 0 7px 0 var(--mint-d), 0 12px 20px rgba(0,0,0,.14); animation: pl-nudge 1.4s ease-in-out infinite; }
.pl-write-done:active { transform: translateY(6px); }
.pl-write-done.nudge { animation: sk-shake .45s; }
.pl-write-boxh { font-size: 20px; font-weight: 800; color: var(--grape-d); margin: 0 0 8px; }
.pl-write-chip {
  width: 100%; min-height: 72px; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; text-align: left;
  border-radius: 22px; padding: 8px 14px; background: #F6F5FF; border: 3px solid #E4E0FF; color: var(--ink);
  font-size: 19px; font-weight: 700; line-height: 1.2; animation: sk-rise .45s both cubic-bezier(.34,1.56,.64,1);
}
.pl-write-chip span { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--grape); color: #fff; font-size: 24px; font-weight: 900; }
.pl-write-chip.used { background: #E6FBF3; border-color: #AEEBD5; }
.pl-write-chip.used span { background: var(--mint); }
.pl-write-chip:active { transform: scale(.97); }
.pl-write-tipbtn {
  width: 100%; min-height: 72px; border-radius: 22px; font-size: 30px; font-weight: 800; color: var(--ink);
  background: var(--sun); box-shadow: 0 6px 0 var(--sun-d);
}
.pl-write-tipbtn span { font-size: 22px; }
.pl-write-tip { font-size: 20px; font-weight: 700; line-height: 1.3; padding: 8px 4px 0; color: #8A5A00; }
.pl-write-tip:empty { display: none; }
.pl-write-tip.pop { animation: sk-pop .4s cubic-bezier(.34,1.56,.64,1); }
.pl-write-shelfrow { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-write-mybook {
  width: 84px; min-height: 96px; border-radius: 8px 18px 18px 8px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(135deg, #FFD1E2, #FF9EC0); box-shadow: inset 6px 0 0 rgba(0,0,0,.12), 0 5px 0 #E2487C;
}
.pl-write-mybook span { font-size: 40px; line-height: 1.1; }
.pl-write-mybook small { font-size: 12px; font-weight: 800; line-height: 1.1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pl-write.saved .pl-write-bigcover { animation: pl-q-yay .8s cubic-bezier(.34,1.56,.64,1); }

@media (max-width: 760px) {
  .pl-write-grid { grid-template-columns: 1fr; }
  .pl-write-mission { font-size: 19px; padding: 12px 14px; }
  .pl-write-ta { font-size: 22px; min-height: 170px; }
  .pl-write-title { font-size: 21px; }
}
@media (max-width: 600px) {
  .pl-q-card { padding: 16px 12px 18px; border-radius: 28px; }
  .pl-q-text { font-size: 25px; }
  .pl-q-text.long { font-size: 20px; }
  .pl-q-text.spell { font-size: 48px; }
  .pl-q-choice { font-size: 23px; padding: 8px 12px; }
  .pl-q-choices.emo { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .pl-q-choices.emo .pl-q-choice { min-height: 104px; padding: 6px; }
  .pl-q-choices.n4 .pl-q-ct { font-size: 20px; }
  .pl-q-choices.n4 .pl-q-choice { flex-direction: column; gap: 4px; }
  .pl-q-ce { font-size: 62px; }
  .pl-q-ci { font-size: 40px; }
  .pl-q-bigemo { font-size: 70px; }
  .pl-q-bigemo.some { font-size: 48px; }
  .pl-q-bigemo.many { font-size: 32px; }
  .pl-q-seq { font-size: 40px; padding: 8px 10px; }
  .pl-q-seq.many { font-size: 30px; }
  .pl-q-pdot { width: 40px; height: 40px; font-size: 18px; }
  .pl-q-note { font-size: 18px; }
  .pl-story-btn { width: 92px; height: 74px; }
  .pl-story-stage { flex-basis: 34%; min-height: 150px; }
  .pl-story-actor { font-size: calc(clamp(56px, 9vh, 96px) * var(--s)); }
  .pl-story-sun { width: 46px; height: 46px; }
  .pl-story-ctr { gap: 12px; }
  .pl-story-qq { font-size: 24px; }
  .pl-story-choice { font-size: 22px; }
  .pl-story-text { padding: 10px 14px 12px; }
  .pl-story-endcard { font-size: 19px; padding: 12px 14px; }
  .pl-story-endcard.moral { font-size: 22px; }
  .pl-story-endhero { font-size: 76px; }
  .pl-story-chip { font-size: 16px; min-height: 40px; }
}

@keyframes pl-nudge { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.05); } }
@keyframes pl-q-yay { 0% { transform: scale(1); } 40% { transform: scale(1.08) rotate(-1.5deg); } 100% { transform: scale(1); } }
@keyframes pl-story-in-r { from { transform: translateX(40px) rotateY(-14deg); opacity: 0; } }
@keyframes pl-story-in-l { from { transform: translateX(-40px) rotateY(14deg); opacity: 0; } }
@keyframes pl-story-bob { 0%,100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -60%); } }
@keyframes pl-story-sway { 0%,100% { transform: translate(-50%, -50%) rotate(-6deg); } 50% { transform: translate(-50%, -50%) rotate(6deg); } }
@keyframes pl-story-hop { 0%,100% { transform: translate(-50%, -50%) scaleY(1); } 30% { transform: translate(-50%, -50%) scaleY(.9); } 55% { transform: translate(-50%, -78%) scaleY(1.05); } }
@keyframes pl-story-float { 0%,100% { transform: translate(-50%, -50%) rotate(-3deg); } 50% { transform: translate(-46%, -64%) rotate(3deg); } }
@keyframes pl-story-talk { 0%,100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -54%) scale(1.07); } }
@keyframes pl-story-drift { to { transform: translateX(170vw); } }
@keyframes pl-story-twinkle { 0%,100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes pl-story-wtap { 0%,100% { transform: none; } 40% { transform: scale(1.25); background: #DFF3FF; } }
@keyframes pl-write-rec { 0%,100% { box-shadow: 0 7px 0 var(--coral-d), 0 0 0 0 rgba(232,67,67,.5); } 50% { box-shadow: 0 7px 0 var(--coral-d), 0 0 0 16px rgba(232,67,67,0); } }

/* ==== END pl-story / pl-q / pl-write ==== */

/* ======================================================================
   PLAYERS (agent B): matching / flashcard / learn_flip / maze / coloring / tracing
   prefixes: .pl-match- .pl-flash- .pl-flip- .pl-maze- .pl-color- .pl-trace-
   ====================================================================== */

/* ---------------- matching ---------------- */
.pl-match { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.pl-match-top { display: flex; align-items: center; gap: 14px; }
.pl-match-say {
  width: 72px; height: 72px; border-radius: 50%; flex: none; font-size: 34px;
  background: var(--sun); box-shadow: 0 7px 0 var(--sun-d), 0 12px 20px rgba(0,0,0,.14);
  transition: transform .08s, box-shadow .08s;
}
.pl-match-say:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--sun-d); }
.pl-match-prog { flex: 1; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pl-match-dot {
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.8);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.08); transition: transform .3s;
}
.pl-match-dot.on { transform: scale(1.15); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 0 0 3px #fff; animation: sk-bump .5s cubic-bezier(.34,1.56,.64,1); }
.pl-match-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.pl-match-col { display: flex; flex-direction: column; gap: 12px; }
.pl-match-item {
  --tint: var(--grape);
  position: relative; min-height: 84px; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 12px; border-radius: 24px;
  background: #fff; color: var(--ink);
  font-size: clamp(20px, 5.2vw, 30px); font-weight: 800; line-height: 1.1; text-align: center;
  box-shadow: 0 7px 0 #dcd6fa, 0 12px 20px rgba(0,0,0,.08);
  transition: transform .12s, box-shadow .12s, background .2s;
  animation: sk-rise .45s cubic-bezier(.34,1.56,.64,1) backwards;
}
.pl-match-r { background: #FFF8E6; box-shadow: 0 7px 0 #f6dc9c, 0 12px 20px rgba(0,0,0,.08); }
.pl-match-item:active { transform: translateY(5px); box-shadow: 0 2px 0 #dcd6fa; }
.pl-match-pic { width: 64px; height: 64px; flex: none; border-radius: 16px; overflow: hidden; background: #f3f1ff; }
.pl-match-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-match-noimg .pl-match-pic { display: none; }
.pl-match-txt { min-width: 0; overflow-wrap: anywhere; }
.pl-match-tick {
  position: absolute; top: -10px; right: -8px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--tint); color: #fff; font-size: 20px; display: none; place-items: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.pl-match-sel { background: #EFEBFF; transform: translateY(-4px) scale(1.04); box-shadow: 0 0 0 5px var(--grape), 0 10px 0 #b9b0f2, 0 16px 26px rgba(108,92,231,.25); }
.pl-match-r.pl-match-sel { background: #FFF1C9; }
.pl-match-ok {
  background: color-mix(in srgb, var(--tint) 18%, #fff) !important; cursor: default;
  box-shadow: 0 0 0 5px var(--tint), 0 7px 0 color-mix(in srgb, var(--tint) 55%, #000) !important;
  animation: pl-match-pop .5s cubic-bezier(.34,1.56,.64,1);
}
.pl-match-ok .pl-match-tick { display: grid; animation: sk-pop .4s cubic-bezier(.34,1.56,.64,1); }
.pl-match-no { animation: sk-shake .45s; background: #FFE3E3 !important; box-shadow: 0 0 0 5px #FF6B6B, 0 7px 0 #e9a5a5 !important; }
.pl-match-done .pl-match-ok { animation: pl-match-dance 1s ease-in-out 2; }
@keyframes pl-match-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes pl-match-dance { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-3deg) translateY(-4px); } 75% { transform: rotate(3deg) translateY(-4px); } }
@media (max-width: 420px) {
  .pl-match-board { gap: 12px 12px; }
  .pl-match-item { padding: 8px; min-height: 80px; flex-direction: column; gap: 4px; }
  .pl-match-pic { width: 56px; height: 56px; }
}

/* ---------------- flashcard ---------------- */
.pl-flash { width: 100%; max-width: 620px; display: flex; flex-direction: column; align-items: center; gap: 18px; padding-bottom: 14px; }
.pl-flash-dots { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pl-flash-dots i { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.75); box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); transition: transform .2s, background .2s; }
.pl-flash-dots i.seen { background: var(--sun); }
.pl-flash-dots i.now { background: #fff; box-shadow: 0 0 0 4px var(--grape); transform: scale(1.2); }
.pl-flash-stage { width: 100%; perspective: 1400px; touch-action: pan-y; }
.pl-flash-stage.pl-flash-in-r { animation: pl-flash-in-r .45s cubic-bezier(.34,1.56,.64,1); }
.pl-flash-stage.pl-flash-in-l { animation: pl-flash-in-l .45s cubic-bezier(.34,1.56,.64,1); }
.pl-flash-card { position: relative; display: block; width: 100%; height: min(52vh, 420px); min-height: 260px; background: none; padding: 0; }
.pl-flash-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.34,1.4,.64,1); }
.pl-flash-flip .pl-flash-inner { transform: rotateY(180deg); }
.pl-flash-face {
  position: absolute; inset: 0; border-radius: 36px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 22px;
  overflow: hidden;
}
.pl-flash-front { color: #fff; box-shadow: 0 12px 0 rgba(0,0,0,.18), 0 24px 40px rgba(0,0,0,.18), inset 0 6px 0 rgba(255,255,255,.25); }
.pl-flash-front::after { content: ''; position: absolute; left: 8%; top: 6%; width: 40%; height: 18%; border-radius: 50%; background: rgba(255,255,255,.18); transform: rotate(-12deg); }
.pl-flash-back {
  --fc: var(--grape);
  transform: rotateY(180deg); background: #fff; color: var(--fc);
  box-shadow: 0 12px 0 color-mix(in srgb, var(--fc) 40%, #fff), 0 24px 40px rgba(0,0,0,.14), inset 0 0 0 8px color-mix(in srgb, var(--fc) 14%, #fff);
}
.pl-flash-ftxt { font-size: clamp(56px, 16vw, 112px); font-weight: 800; line-height: 1.05; text-align: center; text-shadow: 0 5px 0 rgba(0,0,0,.15); overflow-wrap: anywhere; }
.pl-flash-ftxt.pl-flash-small { font-size: clamp(34px, 9vw, 54px); }
.pl-flash-ftxt.pl-flash-long { font-size: clamp(34px, 9vw, 58px); }
.pl-flash-img { width: min(46vw, 210px); aspect-ratio: 1; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.7); }
.pl-flash-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-flash-btxt { font-size: clamp(40px, 11vw, 72px); font-weight: 800; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.pl-flash-btxt.pl-flash-long { font-size: clamp(30px, 8vw, 48px); }
.pl-flash-hint { font-size: clamp(20px, 5vw, 26px); font-weight: 700; color: var(--ink); opacity: .7; text-align: center; max-width: 92%; }
.pl-flash-hand { position: absolute; right: 18px; bottom: 14px; font-size: 52px; pointer-events: none; animation: pl-flash-tap 1.3s ease-in-out infinite; filter: drop-shadow(0 4px 0 rgba(0,0,0,.2)); z-index: 2; }
.pl-flash-nav { display: flex; gap: 18px; justify-content: center; }
.pl-flash-btn { width: 96px; height: 88px; font-size: 40px; border-radius: 28px; display: grid; place-items: center; padding: 0; }
.pl-flash-off { opacity: .35; }
.pl-flash-done { animation: pl-glow 1.4s ease-in-out infinite; }
.pl-flash-end .pl-flash-card { animation: pl-match-dance .8s ease-in-out 2; }
@keyframes pl-flash-in-r { from { transform: translateX(60px) rotate(4deg); opacity: 0; } }
@keyframes pl-flash-in-l { from { transform: translateX(-60px) rotate(-4deg); opacity: 0; } }
@keyframes pl-flash-tap { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-10px) scale(1.08); } }
@keyframes pl-glow { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0,184,148,0)); } 50% { transform: scale(1.07); filter: drop-shadow(0 0 14px rgba(0,184,148,.65)); } }

/* ---------------- learn_flip ---------------- */
.pl-flip { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.pl-flip-learn { display: flex; flex-direction: column; gap: 14px; }
.pl-flip-bar, .pl-flip-pager, .pl-flip-qbar { display: flex; align-items: center; gap: 12px; }
.pl-flip-pager { justify-content: center; }
.pl-flip-round {
  width: 72px; height: 72px; border-radius: 50%; flex: none; font-size: 32px;
  background: #fff; color: var(--grape); font-weight: 800;
  box-shadow: 0 7px 0 #d8d2f7, 0 12px 20px rgba(0,0,0,.1); transition: transform .08s, box-shadow .08s, opacity .2s;
}
.pl-flip-round:active { transform: translateY(6px); box-shadow: 0 1px 0 #d8d2f7; }
.pl-flip-say { background: var(--sun); box-shadow: 0 7px 0 var(--sun-d), 0 12px 20px rgba(0,0,0,.12); }
.pl-flip-prev, .pl-flip-next { width: 84px; height: 76px; border-radius: 26px; background: var(--sky); color: #fff; font-size: 34px; box-shadow: 0 7px 0 var(--sky-d), 0 12px 20px rgba(0,0,0,.12); }
.pl-flip-next { background: var(--pink); box-shadow: 0 7px 0 var(--pink-d), 0 12px 20px rgba(0,0,0,.12); }
.pl-flip-off { opacity: .3; }
.pl-flip-page { min-width: 96px; text-align: center; font-size: 26px; font-weight: 800; color: var(--ink); background: rgba(255,255,255,.8); padding: 6px 16px; border-radius: 999px; }
.pl-flip-page b { color: var(--grape); font-size: 32px; }
.pl-flip-seen { flex: 1; text-align: center; font-size: 26px; font-weight: 800; color: var(--ink); }
.pl-flip-seen b { color: var(--grape); font-size: 32px; }
.pl-flip-pill {
  min-height: 72px; padding: 0 20px; border-radius: 999px; font-size: 28px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--grape); color: #fff; box-shadow: 0 7px 0 var(--grape-d), 0 12px 20px rgba(0,0,0,.12); transition: transform .08s, box-shadow .08s;
}
.pl-flip-pill b { font-size: 24px; }
.pl-flip-pill:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--grape-d); }

.pl-flip-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pl-flip-static .pl-flip-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.pl-flip-number .pl-flip-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.pl-flip-card { position: relative; aspect-ratio: 1; perspective: 900px; background: none; padding: 0; animation: sk-rise .4s cubic-bezier(.34,1.56,.64,1) backwards; }
.pl-flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.34,1.4,.64,1); }
.pl-flip-open .pl-flip-inner { transform: rotateY(180deg); }
.pl-flip-card:active .pl-flip-inner { scale: .96; }
.pl-flip-face {
  position: absolute; inset: 0; border-radius: 24px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px;
}
.pl-flip-front { color: #fff; box-shadow: 0 7px 0 rgba(0,0,0,.18), 0 12px 20px rgba(0,0,0,.12), inset 0 4px 0 rgba(255,255,255,.25); }
.pl-flip-front::after { content: ''; position: absolute; left: 10%; top: 6%; width: 42%; height: 16%; border-radius: 50%; background: rgba(255,255,255,.2); transform: rotate(-12deg); pointer-events: none; }
.pl-flip-white { background: #fff; box-shadow: 0 7px 0 #dcd6fa, 0 12px 20px rgba(0,0,0,.1); }
.pl-flip-white::after { display: none; }
.pl-flip-swatch { box-shadow: 0 7px 0 rgba(0,0,0,.25), 0 12px 20px rgba(0,0,0,.12), inset 0 0 0 4px rgba(255,255,255,.35); }
.pl-flip-ftxt { font-size: clamp(44px, 12vw, 76px); font-weight: 800; line-height: 1; text-shadow: 0 4px 0 rgba(0,0,0,.18); text-align: center; overflow-wrap: anywhere; }
.pl-flip-static .pl-flip-ftxt { font-size: clamp(40px, 10vw, 60px); }
.pl-flip-number .pl-flip-ftxt { font-size: clamp(32px, 8vw, 46px); }
.pl-flip-word .pl-flip-ftxt { font-size: clamp(30px, 8vw, 46px); }
.pl-flip-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pl-flip-photo { object-fit: contain; border-radius: 18px; }
.pl-flip-icon { padding: 10%; filter: drop-shadow(0 6px 4px rgba(0,0,0,.15)); }
.pl-flip-fb { font-size: clamp(44px, 12vw, 72px); line-height: 1; }
.pl-flip-back { transform: rotateY(180deg); background: #fff; box-shadow: 0 7px 0 #ffd9a0, 0 12px 20px rgba(0,0,0,.1), inset 0 0 0 5px #FFF1D6; text-align: center; }
.pl-flip-bpic { width: 58%; height: 52%; display: grid; place-items: center; }
.pl-flip-bpic .pl-flip-fb { font-size: clamp(34px, 9vw, 54px); }
.pl-flip-bemo { font-size: clamp(38px, 10vw, 60px); line-height: 1; }
.pl-flip-bdots { font-size: 13px; line-height: 1.1; display: flex; flex-wrap: wrap; justify-content: center; width: 80%; height: auto; }
.pl-flip-word { font-size: clamp(20px, 5.4vw, 30px); font-weight: 800; color: var(--grape); line-height: 1.05; overflow-wrap: anywhere; }
.pl-flip-word.pl-flip-long { font-size: clamp(16px, 4.2vw, 22px); }
.pl-flip-static .pl-flip-word { font-size: clamp(16px, 4.2vw, 22px); }
.pl-flip-number .pl-flip-word { font-size: clamp(14px, 3.6vw, 18px); }
.pl-flip-quizbtn { align-self: center; margin-top: 6px; min-height: 84px; padding: 0 34px; border-radius: 30px; font-size: 32px; display: inline-flex; align-items: center; gap: 10px; }
.pl-flip-quizbtn span { font-size: 30px; font-weight: 800; }
.pl-flip-glow { animation: pl-glow 1.4s ease-in-out infinite; }

.pl-flip-quiz { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 720px; align-self: center; }
.pl-flip-qbar { justify-content: space-between; }
.pl-flip-qstars { display: flex; gap: 8px; }
.pl-flip-qstars i { font-style: normal; font-size: 30px; filter: grayscale(1) opacity(.35); transition: transform .2s; }
.pl-flip-qstars i.now { transform: scale(1.25); filter: grayscale(1) opacity(.6); }
.pl-flip-qstars i.on { filter: none; animation: sk-bump .5s cubic-bezier(.34,1.56,.64,1); }
.pl-flip-qstars i.half { filter: saturate(.4); }
.pl-flip-ask {
  background: #fff; border-radius: 32px; padding: 14px 18px; text-align: center;
  box-shadow: 0 9px 0 #dcd6fa, 0 18px 30px rgba(0,0,0,.1);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.pl-flip-ask.pl-flip-in { animation: sk-pop .45s cubic-bezier(.34,1.56,.64,1); }
.pl-flip-askshow { display: flex; align-items: center; gap: 12px; justify-content: center; }
.pl-flip-qbig { font-size: clamp(64px, 18vw, 110px); font-weight: 800; line-height: 1; color: var(--grape); text-shadow: 0 5px 0 #e4defd; }
.pl-flip-qtxt { font-size: clamp(48px, 13vw, 80px); }
.pl-flip-qword { font-size: clamp(38px, 10vw, 60px); font-weight: 800; color: var(--pink); line-height: 1.1; }
.pl-flip-asktxt { font-size: clamp(20px, 5vw, 26px); font-weight: 800; color: var(--ink); opacity: .75; }
.pl-flip-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pl-flip-choice {
  aspect-ratio: 1; min-height: 96px; border-radius: 28px; background: #fff; padding: 8px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 9px 0 #dcd6fa, 0 16px 26px rgba(0,0,0,.1);
  transition: transform .12s, box-shadow .12s, opacity .3s;
  animation: sk-rise .45s cubic-bezier(.34,1.56,.64,1) backwards;
}
.pl-flip-choice:active { transform: translateY(6px); box-shadow: 0 2px 0 #dcd6fa; }
.pl-flip-cpic { width: 100%; flex: 1; min-height: 0; display: grid; place-items: center; }
.pl-flip-cphoto img { border-radius: 18px; }
.pl-flip-cw { font-size: clamp(16px, 4vw, 22px); font-weight: 800; color: var(--grape); line-height: 1; }
.pl-flip-ctxt { font-size: clamp(22px, 6vw, 36px); font-weight: 800; color: var(--ink); line-height: 1.05; text-align: center; overflow-wrap: anywhere; }
.pl-flip-cbig { font-size: clamp(44px, 12vw, 72px); color: var(--grape); }
.pl-flip-cswatch { width: 84%; height: 84%; border-radius: 22px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), inset 0 6px 0 rgba(255,255,255,.3); }
.pl-flip-right { box-shadow: 0 0 0 6px var(--mint), 0 9px 0 var(--mint-d) !important; background: #E7F9F3; animation: pl-match-pop .5s cubic-bezier(.34,1.56,.64,1); }
.pl-flip-wrong { animation: sk-shake .45s; opacity: .45; box-shadow: 0 0 0 5px #FF6B6B, 0 7px 0 #e9a5a5 !important; }
.pl-flip-fade { opacity: .3; transform: scale(.92); }
.pl-flip-shake { animation: sk-shake .45s; }
.pl-flip-boing { animation: pl-match-pop .4s cubic-bezier(.34,1.56,.64,1); }

/* vowels */
.pl-flip-vdone { width: 96px; height: 80px; font-size: 40px; border-radius: 28px; padding: 0; display: grid; place-items: center; }
.pl-flip-vpick { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.pl-flip-vbtn {
  --d: #555; width: 84px; height: 84px; border-radius: 26px; color: #fff; font-size: 52px; font-weight: 800; line-height: 1;
  box-shadow: 0 8px 0 var(--d), 0 14px 22px rgba(0,0,0,.15), inset 0 4px 0 rgba(255,255,255,.3);
  opacity: .6; transition: transform .15s, opacity .15s;
}
.pl-flip-vbtn.on { opacity: 1; transform: translateY(-4px) scale(1.1); outline: 5px solid #fff; }
.pl-flip-vbands { display: flex; flex-direction: column; gap: 18px; }
.pl-flip-vhead { display: flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 800; margin-bottom: 10px; flex-wrap: wrap; }
.pl-flip-vhead small { font-size: 20px; opacity: .55; }
.pl-flip-vchip { width: 48px; height: 48px; border-radius: 14px; color: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.pl-flip-vgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pl-flip-vword {
  min-height: 132px; border-radius: 24px; background: #fff; padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 7px 0 #dcd6fa, 0 12px 20px rgba(0,0,0,.08); border: 4px solid transparent;
  animation: sk-rise .4s cubic-bezier(.34,1.56,.64,1) backwards;
}
.pl-flip-vword.heard { border-color: var(--mint); box-shadow: 0 7px 0 #9fe3cf, 0 12px 20px rgba(0,0,0,.08); }
.pl-flip-vemo { font-size: 48px; line-height: 1.05; }
.pl-flip-vw { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.pl-flip-vp { font-size: 17px; font-weight: 700; opacity: .5; }
@media (max-width: 420px) {
  .pl-flip-grid { grid-template-columns: repeat(2, 1fr); }
  .pl-flip-static .pl-flip-grid { grid-template-columns: repeat(3, 1fr); }
  .pl-flip-number .pl-flip-grid { grid-template-columns: repeat(4, 1fr); }
  .pl-flip-vgrid { grid-template-columns: repeat(2, 1fr); }
  .pl-flip-vbtn { width: 60px; height: 72px; font-size: 40px; }
  .pl-flip-vpick { gap: 8px; }
  .pl-flip-seen, .pl-flip-page { font-size: 22px; }
  .pl-flip-pill { padding: 0 16px; font-size: 24px; }
}

/* ---------------- maze ---------------- */
.pl-maze { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding-bottom: 8px; }
.pl-maze.pl-maze-wide { flex-direction: row; gap: 40px; }
.pl-maze-stage { perspective: 1200px; flex: none; }
.pl-maze-board {
  --S: 40px; --T: 8px; --P: 8px;
  position: relative; border-radius: 26px; background: #5cbf3f;
  box-shadow: 0 12px 0 #3d8f2a, 0 22px 34px rgba(0,0,0,.22), inset 0 0 0 4px rgba(255,255,255,.25);
  transform: rotateX(6deg); transform-origin: 50% 100%;
  touch-action: none; cursor: pointer;
  animation: pl-maze-in .6s cubic-bezier(.34,1.56,.64,1) backwards;
}
.pl-maze-floor { position: absolute; inset: var(--P); border-radius: 6px; background: repeating-conic-gradient(#8ee36a 0 25%, #7fd85b 0 50%) 0 0 / calc(var(--S) * 2) calc(var(--S) * 2); }
.pl-maze-trail, .pl-maze-walls { position: absolute; inset: 0; pointer-events: none; }
.pl-maze-wall {
  position: absolute; display: block; border-radius: calc(var(--T) / 2);
  background: linear-gradient(#b07bff, #8a5cf0);
  box-shadow: 0 calc(var(--T) * .45) 0 #5b37b8, 0 calc(var(--T) * .6) calc(var(--T) * .5) rgba(0,0,0,.22), inset 0 2px 0 rgba(255,255,255,.35);
}
.pl-maze-seg {
  position: absolute; display: block; margin: calc(var(--S) * -.14) 0 0 calc(var(--S) * -.14);
  border: calc(var(--S) * .14) solid rgba(255,236,120,.95); border-radius: 999px;
  box-sizing: content-box; box-shadow: 0 0 0 2px rgba(255,190,40,.35);
}
.pl-maze-hero, .pl-maze-goal, .pl-maze-start { position: absolute; width: var(--S); height: var(--S); display: grid; place-items: center; pointer-events: none; }
.pl-maze-hero { z-index: 3; transition: left .16s ease-out, top .16s ease-out; }
.pl-maze-hero span, .pl-maze-goal span { display: block; line-height: 1; font-size: calc(var(--S) * .78); filter: drop-shadow(0 3px 0 rgba(0,0,0,.22)); }
.pl-maze-start span { font-size: calc(var(--S) * .45); opacity: .55; }
.pl-maze-hero::before { content: ''; position: absolute; left: 14%; right: 14%; bottom: 4%; height: 16%; border-radius: 50%; background: rgba(0,0,0,.2); }
.pl-maze-hero.pl-maze-hop span { animation: pl-maze-hop .2s ease-out; }
.pl-maze-hero.pl-maze-bump span { animation: pl-maze-bump .35s ease-in-out; }
.pl-maze-hero.pl-maze-jump span, .pl-maze-goal.pl-maze-got span { animation: pl-maze-jump .5s cubic-bezier(.34,1.56,.64,1) 3; }
.pl-maze-goal span { animation: pl-maze-bob 1.4s ease-in-out infinite; }
.pl-maze-goal::before { content: ''; position: absolute; inset: -10%; border-radius: 50%; background: radial-gradient(circle, rgba(255,240,120,.95), rgba(255,220,80,0) 70%); animation: pl-maze-glow 1.4s ease-in-out infinite; }
.pl-maze-win { animation: pl-maze-win .6s ease-in-out 2; }
.pl-maze-pad { flex: none; display: grid; grid-template-columns: repeat(3, 88px); grid-template-rows: repeat(2, 88px); gap: 12px; }
.pl-maze-say, .pl-maze-reset, .pl-maze-arrow { width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center; font-size: 42px; line-height: 1; transition: transform .08s, box-shadow .08s; touch-action: none; }
.pl-maze-say { grid-column: 1; grid-row: 1; border-radius: 50%; width: 80px; height: 80px; margin: 4px; background: var(--sun); font-size: 36px; box-shadow: 0 7px 0 var(--sun-d), 0 12px 20px rgba(0,0,0,.14); }
.pl-maze-reset { grid-column: 3; grid-row: 1; border-radius: 50%; width: 80px; height: 80px; margin: 4px; background: #fff; color: var(--grape); font-weight: 900; box-shadow: 0 7px 0 #d8d2f7, 0 12px 20px rgba(0,0,0,.12); }
.pl-maze-arrow { --c: var(--sky); --d: var(--sky-d); background: var(--c); box-shadow: 0 9px 0 var(--d), 0 14px 22px rgba(0,0,0,.18), inset 0 4px 0 rgba(255,255,255,.3); }
.pl-maze-tri { display: block; width: 44px; height: 44px; pointer-events: none; filter: drop-shadow(0 4px 0 rgba(0,0,0,.22)); }
.pl-maze-tri::before { content: ""; display: block; width: 100%; height: 100%; background: #fff; clip-path: polygon(50% 4%, 96% 52%, 68% 52%, 68% 96%, 32% 96%, 32% 52%, 4% 52%); }
.pl-maze-up { grid-column: 2; grid-row: 1; --c: var(--pink); --d: var(--pink-d); }
.pl-maze-left { grid-column: 1; grid-row: 2; }
.pl-maze-down { grid-column: 2; grid-row: 2; --c: var(--orange); --d: #d97a1c; }
.pl-maze-right { grid-column: 3; grid-row: 2; --c: var(--grape); --d: var(--grape-d); }
.pl-maze-arrow:active, .pl-maze-arrow.down { transform: translateY(8px); box-shadow: 0 1px 0 var(--d); }
.pl-maze-say:active, .pl-maze-reset:active { transform: translateY(6px); }
@keyframes pl-maze-in { from { transform: rotateX(6deg) translateY(40px) scale(.85); opacity: 0; } }
@keyframes pl-maze-hop { 0% { transform: translateY(0); } 45% { transform: translateY(-16%) scale(.95, 1.08); } 100% { transform: translateY(0); } }
@keyframes pl-maze-bump { 0%,100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(var(--bx,0), var(--by,0)) rotate(-10deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-5deg); } }
@keyframes pl-maze-jump { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-45%) scale(1.3) rotate(-8deg); } }
@keyframes pl-maze-bob { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-8%) rotate(5deg); } }
@keyframes pl-maze-glow { 0%,100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes pl-maze-win { 0%,100% { transform: rotateX(6deg); } 50% { transform: rotateX(6deg) scale(1.03); } }
@media (max-height: 560px) {
  .pl-maze-pad { grid-template-columns: repeat(3, 80px); grid-template-rows: repeat(2, 80px); gap: 8px; }
  .pl-maze-arrow { width: 80px; height: 80px; }
  .pl-maze-say, .pl-maze-reset { width: 72px; height: 72px; }
}

/* ---------------- coloring ---------------- */
.pl-color { width: 100%; max-width: 1180px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 14px; }
.pl-color-head { display: flex; align-items: flex-start; gap: 12px; }
.pl-color-round { width: 72px; height: 72px; border-radius: 50%; flex: none; font-size: 32px; background: var(--sun); box-shadow: 0 7px 0 var(--sun-d), 0 12px 20px rgba(0,0,0,.12); }
.pl-color-round:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--sun-d); }
.pl-color-chips { flex: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.pl-color-chip {
  min-height: 72px; padding: 0 18px 0 12px; border-radius: 999px; background: #fff; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; font-size: 22px;
  box-shadow: 0 6px 0 #dcd6fa, 0 10px 18px rgba(0,0,0,.08); transition: transform .1s, box-shadow .1s;
}
.pl-color-chip span { font-size: 32px; }
.pl-color-chip.on { background: var(--grape); color: #fff; box-shadow: 0 6px 0 var(--grape-d), 0 10px 18px rgba(0,0,0,.12); transform: translateY(-2px); }
.pl-color-chip:active { transform: translateY(5px); }
.pl-color-gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pl-color-thumb {
  aspect-ratio: 1; border-radius: 26px; background: #fff; padding: 8px;
  box-shadow: 0 8px 0 #dcd6fa, 0 14px 24px rgba(0,0,0,.08);
  animation: sk-rise .45s cubic-bezier(.34,1.56,.64,1) backwards; transition: transform .12s;
}
.pl-color-thumb:active { transform: translateY(5px) scale(.98); }
.pl-color-tw { position: relative; width: 100%; height: 100%; display: grid; place-items: center; border-radius: 18px; overflow: hidden; }
.pl-color-tw img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; grid-area: 1 / 1; }
.pl-color-ready .pl-color-tw img { opacity: 1; }
.pl-color-ready .pl-color-wait { display: none; }
.pl-color-wait { font-style: normal; font-size: 40px; opacity: .35; animation: sk-float 1.4s ease-in-out infinite; grid-area: 1 / 1; }
.pl-color-miss .pl-color-wait { animation: none; }

.pl-color-play { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.pl-color-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
.pl-color-tool { width: 76px; height: 72px; padding: 0; border-radius: 24px; font-size: 32px; display: grid; place-items: center; }
.pl-color-tool.grape { --c: var(--grape); --d: var(--grape-d); }
.pl-color-off { opacity: .4; }
.pl-color-done { width: 96px; animation: pl-glow 1.4s ease-in-out infinite; }
.pl-color-appear { animation: sk-pop .5s cubic-bezier(.34,1.56,.64,1), pl-glow 1.4s .5s ease-in-out infinite; }
.pl-color-count { min-height: 56px; padding: 4px 16px; border-radius: 999px; background: rgba(255,255,255,.85); font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.pl-color-count b { color: var(--grape); font-size: 30px; }
.pl-color-body { display: flex; flex-direction: column; gap: 12px; align-items: center; width: 100%; }
.pl-color-canvasbox { position: relative; width: 100%; display: flex; justify-content: center; align-items: flex-start; min-height: 200px; }
.pl-color-paper {
  --sel: var(--grape);
  position: relative; background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 0 0 6px #fff, 0 0 0 10px color-mix(in srgb, var(--sel) 55%, #fff), 0 16px 30px rgba(0,0,0,.14);
  transition: box-shadow .25s;
}
.pl-color-paper.pl-color-in { animation: sk-pop .45s cubic-bezier(.34,1.56,.64,1); }
.pl-color-paper.pl-color-whoosh { animation: sk-wiggle .4s; }
.pl-color-paper.pl-color-proud { animation: pl-match-dance .8s ease-in-out 2; }
.pl-color-canvas { display: block; width: 100%; height: 100%; cursor: pointer; touch-action: none; }
.pl-color-fx { position: absolute; inset: 0; pointer-events: none; }
.pl-color-splash { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 6px solid var(--c); animation: pl-color-splash .55s ease-out forwards; }
.pl-color-loading { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: 64px; animation: sk-float 1.2s ease-in-out infinite; }
.pl-color-pal { display: grid; grid-template-columns: repeat(auto-fill, 56px); gap: 8px; justify-content: center; width: min(100%, 520px); }
.pl-color-blob {
  --c: #f00; width: 56px; height: 56px; border-radius: 50%; background: var(--c);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 65%, #000), 0 8px 14px rgba(0,0,0,.14), inset 0 -6px 0 rgba(0,0,0,.12), inset 0 5px 0 rgba(255,255,255,.35);
  transition: transform .12s;
}
.pl-color-blob.on { transform: translateY(-4px) scale(1.12); outline: 5px solid #fff; box-shadow: 0 0 0 9px var(--c), 0 9px 18px rgba(0,0,0,.2); }
.pl-color-eraser { --c: #fff; font-size: 28px; display: grid; place-items: center; box-shadow: 0 5px 0 #d8d2f7, 0 8px 14px rgba(0,0,0,.12), inset 0 0 0 3px #ece9ff; }
.pl-color-eraser.on { box-shadow: 0 0 0 9px #cfc9f5, 0 9px 18px rgba(0,0,0,.2); }
.pl-color-boing { animation: pl-match-pop .4s cubic-bezier(.34,1.56,.64,1); }
.pl-color-svgpaper { width: min(92vw, 480px); padding: 10px; }
.pl-color-svg { width: 100%; display: block; }
.pl-color-svg .region { cursor: pointer; transition: fill .2s; }
@keyframes pl-color-splash { to { transform: scale(4); opacity: 0; } }
@media (min-width: 900px) {
  .pl-color-body { flex-direction: row; align-items: flex-start; justify-content: center; }
  .pl-color-canvasbox { flex: 1; min-width: 0; }
  .pl-color-pal { grid-template-columns: repeat(2, 64px); gap: 12px; width: auto; flex: none; }
  .pl-color-blob { width: 64px; height: 64px; }
  .pl-color-gallery { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 420px) {
  .pl-color-tools { gap: 8px; }
  .pl-color-tool { width: 72px; height: 72px; border-radius: 22px; font-size: 30px; }
  .pl-color-pal { gap: 8px 4px; }
  .pl-color-chip { min-height: 64px; font-size: 18px; padding: 0 14px 0 10px; }
  .pl-color-chip span { font-size: 28px; }
  .pl-color-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- tracing (css/trace.css ki trace-* classes + ye tweaks) ---------------- */
.pl-trace { max-width: 980px; height: auto; flex: none; }
.pl-trace .trace-word { font-size: clamp(24px, 6vw, 30px); }
/* learn_flip quiz + photo fixes (agent B) */
.pl-flip-zoom .pl-flip-photo { object-fit: cover; }
.pl-flip-qbar .pl-flip-qstars { flex: 1; justify-content: center; min-width: 0; }
.pl-flip-cpic { flex: 1 1 0; min-height: 0; width: 100%; overflow: hidden; }
.pl-flip-cpic .pl-flip-img { max-height: 100%; }
.pl-flip-cphoto .pl-flip-img { object-fit: cover; border-radius: 18px; }
@media (max-width: 600px) {
  .pl-flip-qstars i { font-size: 24px; }
  .pl-flip-qstars { gap: 4px; }
  .pl-flip-choices { grid-template-columns: 1fr; gap: 14px; }
  .pl-flip-choice { aspect-ratio: auto; height: clamp(110px, 17vh, 150px); flex-direction: row; gap: 14px; padding: 10px 16px; }
  .pl-flip-cpic { flex: 0 0 auto; width: clamp(96px, 30vw, 130px); height: 100%; }
  .pl-flip-cw { font-size: 28px; flex: 1; }
  .pl-flip-cswatch { width: 100%; height: 80%; }
}
@media (max-width: 600px) {
  .pl-color-chips { flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .pl-color-chips::-webkit-scrollbar { display: none; }
  .pl-color-chip { flex: none; }
  .pl-trace .trace-emo:not(.trace-many) { font-size: 44px; }
  .pl-trace .trace-word { font-size: 22px; }
  .pl-trace .trace-pic { padding: 8px 12px 8px 10px; gap: 6px; }
}
@media (max-width: 600px) { .pl-flip-ctxt { font-size: 32px; } .pl-flip-cbig { font-size: 56px; } }


/* =====================================================================
   v2 -- premium quiz / logic (questions.js)
   ===================================================================== */
.pl-q { max-width: 1040px; margin: auto; gap: 16px; padding: 6px 6px 18px; }

/* progress = star path */
.pl-q-prog { position: relative; gap: 0; justify-content: space-between; width: min(520px, 92%); margin: 0 auto; padding-top: 8px; }
.pl-q-track {
  position: absolute; left: 24px; right: 24px; top: calc(8px + 22px - 5px); height: 10px; border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.95) 0 14px, rgba(255,255,255,.45) 14px 24px);
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.pl-q-track b {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: linear-gradient(180deg, #FFE98A, #F5B820); box-shadow: 0 0 10px rgba(255,214,90,.8);
  transition: width .5s cubic-bezier(.34,1.56,.64,1);
}
.pl-q-pdot {
  position: relative; z-index: 1; width: 48px; height: 48px; font-size: 21px; opacity: 1;
  color: color-mix(in srgb, var(--wc, #6C5CE7) 55%, #fff);
  background: #fff; border: 3px solid color-mix(in srgb, var(--wc, #6C5CE7) 22%, #fff);
  box-shadow: 0 4px 0 rgba(0,0,0,.08);
}
.pl-q-pdot.cur {
  transform: scale(1.22); color: #fff; border-color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--wc, #6C5CE7) 70%, #fff), var(--wc, #6C5CE7));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--wc, #6C5CE7) 25%, transparent), 0 5px 0 color-mix(in srgb, var(--wc, #6C5CE7) 60%, #000);
}
.pl-q-pdot.star { background: radial-gradient(circle at 40% 35%, #FFF8D6, #FFE07A); border-color: #FFD24A; font-size: 28px; animation: sk-pop .5s cubic-bezier(.34,1.56,.64,1); }
.pl-q-pdot.star img { width: 34px; height: 34px; }
.pl-q-pdot.ok { background: linear-gradient(180deg, #6FE3C2, var(--mint)); border-color: #fff; color: #fff; }

/* the big question card */
.pl-q-card {
  position: relative; padding: 22px 24px 26px; gap: 18px; border-radius: 40px;
  background:
    linear-gradient(180deg, #fff, #FBFAFF);
  border: 5px solid #fff;
  box-shadow: 0 12px 0 color-mix(in srgb, var(--wc, #6C5CE7) 32%, #fff), 0 26px 46px rgba(0,0,0,.14);
}
.pl-q-head:not(:has(.pl-q-text)) { background: none; border: 0; padding: 0; justify-content: center; margin-top: -6px; }
.pl-q-card.is-oops { animation: sk-shake .45s; }
.pl-q-card.is-solved { box-shadow: 0 12px 0 #7FDCC0, 0 0 0 6px rgba(0,184,148,.22), 0 26px 46px rgba(0,0,0,.14); }
.pl-q-head {
  position: relative; gap: 16px; padding: 14px 16px 14px 22px; border-radius: 30px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--wc, #6C5CE7) 14%, #fff), color-mix(in srgb, var(--wc, #6C5CE7) 6%, #fff));
  border: 3px dashed color-mix(in srgb, var(--wc, #6C5CE7) 25%, #fff);
}
.pl-q-text { font-size: clamp(34px, 4vw, 54px); line-height: 1.12; color: color-mix(in srgb, var(--wc, #6C5CE7) 30%, var(--ink)); letter-spacing: .01em; }
.pl-q-text.long { font-size: clamp(26px, 2.8vw, 38px); }
.pl-q-text.spell { font-size: clamp(56px, 6vw, 80px); }
.pl-q-hear {
  width: 80px; height: 80px; font-size: 38px;
  background: linear-gradient(180deg, #4FB3FF, var(--sky)); box-shadow: 0 7px 0 var(--sky-d), 0 12px 18px rgba(0,0,0,.14);
}
.pl-q-hear img.sk-ico3d { width: 64%; height: 64%; }
.pl-q-visual { padding: 4px 0; }
.pl-q-bigemo, .pl-q-seq {
  background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--wc, #6C5CE7) 14%, #fff), #fff 70%);
  border: 3px solid color-mix(in srgb, var(--wc, #6C5CE7) 14%, #fff); border-radius: 32px; filter: none;
  box-shadow: inset 0 -6px 0 color-mix(in srgb, var(--wc, #6C5CE7) 8%, transparent);
}
.pl-q-bigemo { font-size: clamp(70px, 8vw, 104px); }
.pl-q-bigemo.some { font-size: clamp(54px, 6vw, 76px); }
.pl-q-bigemo.many { font-size: clamp(38px, 4vw, 52px); }
.pl-q-seq { font-size: clamp(48px, 5.4vw, 72px); }
.pl-q-seq.many { font-size: clamp(36px, 4vw, 52px); }
.pl-q-e1 { display: inline-block; }
.pl-q-e1 img.sk-fx, .pl-q-ie img.sk-fx { filter: drop-shadow(0 5px 4px rgba(0,0,0,.2)); }
.pl-q-visual .pl-q-e1, .pl-q-seq .pl-q-ie { animation: pl-q-bounce 2.4s ease-in-out infinite; }
.pl-q-visual .pl-q-e1:nth-child(2n), .pl-q-seq .pl-q-ie:nth-child(2n) { animation-delay: -.6s; }
.pl-q-visual .pl-q-e1:nth-child(3n), .pl-q-seq .pl-q-ie:nth-child(3n) { animation-delay: -1.2s; }

/* candy answer buttons -- each a different colour */
.pl-q-choices { gap: 18px; }
.pl-q-choices.short { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pl-q-choices.mid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pl-q-choices.n4:not(.short):not(.mid):not(.emo) { grid-template-columns: 1fr 1fr; }
.pl-q-choice {
  --cc: #FF6B9D;
  position: relative; overflow: hidden; min-height: 96px; border-radius: 30px; padding: 12px 20px;
  color: #fff; border: 0; font-size: clamp(24px, 2.4vw, 32px);
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
  background:
    linear-gradient(170deg, color-mix(in srgb, var(--cc) 72%, #fff), var(--cc) 55%, color-mix(in srgb, var(--cc) 85%, #000));
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.10), inset 0 3px 0 rgba(255,255,255,.3),
    0 9px 0 color-mix(in srgb, var(--cc) 60%, #000), 0 16px 24px rgba(0,0,0,.14);
  animation: pl-q-in .55s both cubic-bezier(.34,1.56,.64,1);
}
.pl-q-choice::after {
  content: ''; position: absolute; left: 14px; right: 14px; top: 6px; height: 30%; border-radius: 999px;
  background: linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,0)); pointer-events: none;
}
.pl-q-choice:nth-child(5n+1) { --cc: #FF6B9D; }
.pl-q-choice:nth-child(5n+2) { --cc: #0984E3; }
.pl-q-choice:nth-child(5n+3) { --cc: #FF9F43; }
.pl-q-choice:nth-child(5n+4) { --cc: #00B894; }
.pl-q-choice:nth-child(5n+5) { --cc: #6C5CE7; }
.pl-q-choice:hover:not(:disabled) { transform: translateY(-4px) scale(1.02); }
.pl-q-choice:active:not(:disabled) { transform: translateY(8px); box-shadow: inset 0 -3px 0 rgba(0,0,0,.1), 0 1px 0 color-mix(in srgb, var(--cc) 60%, #000); }
.pl-q-choices.short .pl-q-choice { min-height: 136px; }
.pl-q-choices.short .pl-q-ct, .pl-q-ct.huge { font-size: clamp(54px, 6vw, 76px); }
.pl-q-choices.mid .pl-q-choice { min-height: 112px; }
.pl-q-choices.mid .pl-q-ct { font-size: clamp(28px, 3vw, 40px); }
.pl-q-choices.emo { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pl-q-choices.emo .pl-q-choice { min-height: 156px; }
.pl-q-ce { font-size: clamp(76px, 8vw, 100px); filter: none; }
.pl-q-ce .pl-q-e1 img.sk-fx { filter: drop-shadow(0 6px 5px rgba(0,0,0,.25)); }
.pl-q-choice .pl-q-ce, .pl-q-choice .pl-q-ci {
  display: grid; place-items: center; border-radius: 999px; line-height: 1;
}
.pl-q-choices.emo:not(.multi):not(.multi4) .pl-q-ce {
  width: 1.45em; height: 1.45em; background: radial-gradient(circle at 35% 28%, #fff 0 20%, rgba(255,255,255,.88) 50%, rgba(255,255,255,.55));
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.08), 0 6px 12px rgba(0,0,0,.15);
}
.pl-q-choices.emo.multi .pl-q-ce, .pl-q-choices.emo.multi4 .pl-q-ce { display: block; }
.pl-q-choices.emo.multi, .pl-q-choices.emo.multi4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pl-q-choices.emo.multi .pl-q-choice, .pl-q-choices.emo.multi4 .pl-q-choice { min-height: 120px; }
.pl-q-choices.emo.multi .pl-q-ce { font-size: 58px; }
.pl-q-choices.emo.multi4 .pl-q-ce { font-size: 40px; }
.pl-q-ci {
  width: 1.5em; height: 1.5em; font-size: 50px; flex: 0 0 auto;
  background: radial-gradient(circle at 35% 28%, #fff, rgba(255,255,255,.65)); filter: none;
}
.pl-q-choice.is-correct {
  --cc: #00B894; color: #fff; border: 0;
  background: linear-gradient(170deg, #6FE3C2, #00B894 60%, #00916f);
  box-shadow: 0 9px 0 var(--mint-d), 0 0 0 7px rgba(0,184,148,.28), 0 18px 30px rgba(0,184,148,.35);
  animation: pl-q-win .7s cubic-bezier(.34,1.56,.64,1);
  z-index: 2;
}
.pl-q-choice.is-wrong { animation: sk-shake .45s; background: linear-gradient(170deg, #E9E6F5, #CFCBE3); color: #8C88A6; text-shadow: none; box-shadow: 0 5px 0 #B9B4D1; opacity: .7; }
.pl-q-choice.is-dim { opacity: .35; filter: grayscale(.7); }

/* happy state */
.pl-q-cheer {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); z-index: 5; pointer-events: none;
  animation: pl-q-cheer 1.6s cubic-bezier(.34,1.56,.64,1) forwards;
}
.pl-q-cheer-e { display: block; font-size: 110px; line-height: 1; filter: drop-shadow(0 10px 10px rgba(0,0,0,.25)); }
.pl-q-note { font-size: clamp(20px, 2vw, 25px); border-radius: 28px; border-width: 4px; background: linear-gradient(180deg, #F0FAFF, #E2F4FF); }
.pl-q-note-e { font-size: 44px; }
.pl-q-next {
  width: 170px; height: 92px; font-size: 48px; border-radius: 32px;
  background: linear-gradient(180deg, #FF8DB5, var(--pink)); position: relative; overflow: hidden;
}
.pl-q-next::after { content: ''; position: absolute; left: 14px; right: 14px; top: 6px; height: 30%; border-radius: 999px; background: rgba(255,255,255,.3); }
.pl-q-next img.sk-fx { width: 58px; height: 58px; }
.pl-q-after { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.pl-q-after .pl-q-note { flex: 1 1 420px; width: auto; }

@media (max-width: 600px) {
  .pl-q { gap: 12px; padding: 2px 2px 14px; }
  .pl-q-card { padding: 14px 12px 18px; border-radius: 32px; gap: 14px; }
  .pl-q-head { padding: 10px 10px 10px 14px; gap: 10px; border-radius: 24px; }
  .pl-q-text { font-size: 30px; }
  .pl-q-text.long { font-size: 23px; }
  .pl-q-text.spell { font-size: 50px; }
  .pl-q-hear { width: 72px; height: 72px; }
  .pl-q-choices { gap: 14px; }
  .pl-q-choices.short { grid-template-columns: repeat(3, 1fr); }
  .pl-q-choices.short.n4 { grid-template-columns: repeat(2, 1fr); }
  .pl-q-choices.short .pl-q-choice { min-height: 110px; padding: 8px; }
  .pl-q-choices.short .pl-q-ct { font-size: 50px; }
  .pl-q-choices.mid { grid-template-columns: 1fr; }
  .pl-q-choices.mid.n4 { grid-template-columns: 1fr 1fr; }
  .pl-q-choices.mid .pl-q-choice { min-height: 84px; }
  .pl-q-choices.mid .pl-q-ct { font-size: 28px; }
  .pl-q-choice { font-size: 23px; min-height: 80px; }
  .pl-q-choices.emo { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .pl-q-choices.emo .pl-q-choice { min-height: 112px; padding: 6px; border-radius: 26px; }
  .pl-q-ce { font-size: 54px; }
  .pl-q-choices.emo.multi, .pl-q-choices.emo.multi4 { grid-template-columns: 1fr; }
  .pl-q-choices.emo.multi .pl-q-choice, .pl-q-choices.emo.multi4 .pl-q-choice { min-height: 88px; }
  .pl-q-choices.emo.multi .pl-q-ce { font-size: 46px; }
  .pl-q-choices.emo.multi4 .pl-q-ce { font-size: 34px; }
  .pl-q-ci { font-size: 36px; }
  .pl-q-cheer-e { font-size: 86px; }
  .pl-q-pdot { width: 42px; height: 42px; font-size: 18px; }
  .pl-q-track { top: calc(8px + 21px - 5px); }
  .pl-q-next { width: 150px; height: 84px; }
}

@keyframes pl-q-in { 0% { opacity: 0; transform: translateY(30px) scale(.8); } 100% { opacity: 1; transform: none; } }
@keyframes pl-q-win { 0% { transform: scale(1); } 35% { transform: scale(1.12) rotate(-2deg); } 65% { transform: scale(.97) rotate(1deg); } 100% { transform: scale(1.03); } }
@keyframes pl-q-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pl-q-cheer {
  0% { transform: translate(-50%, -20%) scale(0) rotate(-30deg); opacity: 0; }
  30% { transform: translate(-50%, -60%) scale(1.25) rotate(8deg); opacity: 1; }
  55% { transform: translate(-50%, -55%) scale(1) rotate(0); opacity: 1; }
  100% { transform: translate(-50%, -75%) scale(.9); opacity: 0; }
}
.pl-q-choices.mid .pl-q-ct.huge { font-size: clamp(52px, 5.6vw, 72px); }
@media (max-width: 600px) { .pl-q-choices.mid .pl-q-ct.huge { font-size: 46px; } }


/* =====================================================================
   v2 -- matching / flashcard / learn_flip / maze / story polish
   ===================================================================== */
/* ---- matching ---- */
.pl-match { max-width: 1000px; margin: auto; gap: 18px; padding: 4px 6px 16px; }
.pl-match-top { justify-content: center; }
.pl-match-say { width: 76px; height: 76px; background: linear-gradient(180deg, #FFE08A, var(--sun)); }
.pl-match-prog {
  flex: 0 1 auto; gap: 12px; padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,.7); box-shadow: inset 0 -3px 0 rgba(0,0,0,.05);
}
.pl-match-dot { width: 32px; height: 32px; background: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.1), 0 0 0 3px rgba(108,92,231,.12); }
.pl-match-board {
  gap: 16px 56px; position: relative; padding: 18px; border-radius: 40px;
  background: rgba(255,255,255,.55); border: 4px solid rgba(255,255,255,.8);
  box-shadow: 0 10px 0 rgba(108,92,231,.10), 0 22px 40px rgba(0,0,0,.08);
}
.pl-match-board::before {
  content: ''; position: absolute; left: 50%; top: 24px; bottom: 24px; width: 6px; margin-left: -3px; border-radius: 999px;
  background: repeating-linear-gradient(180deg, rgba(108,92,231,.25) 0 12px, transparent 12px 22px);
}
.pl-match-col { gap: 16px; }
.pl-match-item {
  --cc: #FF6B9D;
  min-height: 96px; border-radius: 30px; padding: 10px 16px; overflow: visible;
  font-size: clamp(24px, 2.6vw, 34px);
}
.pl-match-l {
  color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18);
  background: linear-gradient(170deg, color-mix(in srgb, var(--cc) 70%, #fff), var(--cc) 60%, color-mix(in srgb, var(--cc) 85%, #000));
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.1), inset 0 3px 0 rgba(255,255,255,.3), 0 8px 0 color-mix(in srgb, var(--cc) 60%, #000), 0 14px 22px rgba(0,0,0,.12);
}
.pl-match-l:nth-child(5n+1) { --cc: #FF6B9D; }
.pl-match-l:nth-child(5n+2) { --cc: #0984E3; }
.pl-match-l:nth-child(5n+3) { --cc: #FF9F43; }
.pl-match-l:nth-child(5n+4) { --cc: #00B894; }
.pl-match-l:nth-child(5n+5) { --cc: #6C5CE7; }
.pl-match-l.pl-match-emo { background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--cc) 14%, #fff)); color: var(--ink); text-shadow: none;
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--cc) 40%, #fff), 0 8px 0 color-mix(in srgb, var(--cc) 50%, #fff), 0 14px 22px rgba(0,0,0,.10); }
.pl-match-r {
  background: linear-gradient(180deg, #FFFDF4, #FFF3CC); color: #7A4E00;
  box-shadow: inset 0 0 0 4px #FFE29A, 0 8px 0 #F2C75C, 0 14px 22px rgba(0,0,0,.10);
}
.pl-match-big .pl-match-txt { font-size: clamp(44px, 4.6vw, 60px); line-height: 1; }
.pl-match-e1 { display: inline-block; font-size: 1.35em; line-height: 1; }
.pl-match-emo .pl-match-txt { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; }
.pl-match-emo .pl-match-e1 { font-size: clamp(38px, 3.6vw, 50px); }
.pl-match-e1 img.sk-fx { filter: drop-shadow(0 4px 3px rgba(0,0,0,.2)); }
.pl-match-item:hover:not(:disabled) { transform: translateY(-3px) scale(1.02); }
.pl-match-sel { transform: translateY(-6px) scale(1.05) !important; box-shadow: 0 0 0 6px #fff, 0 0 0 11px var(--grape), 0 18px 30px rgba(108,92,231,.35) !important; z-index: 2; }
.pl-match-l.pl-match-sel { filter: brightness(1.06); }
.pl-match-ok { color: var(--ink) !important; text-shadow: none !important; background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--tint) 22%, #fff)) !important; }
.pl-match-tick { width: 42px; height: 42px; top: -14px; right: -12px; font-size: 24px; font-weight: 800; border: 3px solid #fff; }

/* ---- flashcard ---- */
.pl-flash { max-width: 820px; margin: auto; gap: 22px; }
.pl-flash-dots i { width: 24px; height: 24px; }
.pl-flash-dots i.seen { background: linear-gradient(180deg, #FFE08A, var(--sun)); }
.pl-flash-card { height: min(56vh, 500px); min-height: 280px; }
.pl-flash-face { border-radius: 44px; }
.pl-flash-front { border: 6px solid rgba(255,255,255,.55); }
.pl-flash-front::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.35) 0 34px, transparent 35px),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,.25) 0 60px, transparent 61px),
    radial-gradient(circle at 80% 85%, rgba(255,255,255,.18) 0 22px, transparent 23px);
}
.pl-flash-ftxt { font-size: clamp(64px, 9vw, 130px); position: relative; }
.pl-flash-ftxt img.sk-fx { width: 1.3em; height: 1.3em; filter: drop-shadow(0 10px 8px rgba(0,0,0,.25)); }
.pl-flash-ftxt.pl-flash-small { font-size: clamp(38px, 5vw, 64px); }
.pl-flash-img { width: min(46vw, 250px); border-radius: 34px; box-shadow: 0 0 0 8px rgba(255,255,255,.75), 0 12px 24px rgba(0,0,0,.2); }
.pl-flash-back { border: 6px solid #fff; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--fc) 10%, #fff), #fff 70%); }
.pl-flash-btxt { font-size: clamp(48px, 7vw, 92px); text-shadow: 0 4px 0 color-mix(in srgb, var(--fc) 20%, #fff); }
.pl-flash-hint { font-size: clamp(22px, 2.4vw, 30px); padding: 10px 20px; border-radius: 22px; background: #FFF7DA; opacity: 1; color: #8A5A00; }
.pl-flash-btn { width: 108px; height: 92px; }
.pl-flash-hand { font-size: 64px; }

/* ---- learn_flip deck index + cards ---- */
.pl-flip { max-width: 1120px; margin: 0 auto; }
@media (min-width: 900px) {
  .pl-flip-static .pl-flip-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px; }
  .pl-flip-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
  .pl-flip-number .pl-flip-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .pl-flip-static .pl-flip-ftxt { font-size: 62px; }
}
.pl-flip-face { border-radius: 28px; }
.pl-flip-white { border: 4px solid #fff; }
.pl-flip-pill { background: linear-gradient(180deg, #8F82F5, var(--grape)); }
.pl-flip-pill img.sk-fx { width: 34px; height: 34px; }
.pl-flip-ask { border: 5px solid #fff; border-radius: 38px; background: radial-gradient(circle at 50% 0, #F3F0FF, #fff 70%); }
.pl-flip-choice { border: 4px solid #fff; border-radius: 32px; }
.pl-flip-qstars i img.sk-fx { width: 38px; height: 38px; }


@media (max-width: 600px) {
  .pl-match-board { gap: 12px 22px; padding: 12px; border-radius: 30px; }
  .pl-match-item { min-height: 84px; padding: 8px; border-radius: 24px; font-size: 22px; }
  .pl-match-big .pl-match-txt { font-size: 40px; }
  .pl-match-emo .pl-match-e1 { font-size: 30px; }
  .pl-match-tick { width: 34px; height: 34px; font-size: 19px; }
  .pl-flash-card { height: min(52vh, 420px); }
}
@media (min-width: 601px) and (max-height: 820px) {
  .pl-match { gap: 12px; }
  .pl-match-board { gap: 12px 48px; padding: 14px; }
  .pl-match-col { gap: 12px; }
  .pl-match-item { min-height: 78px; padding: 6px 14px; }
  .pl-match-emo .pl-match-e1 { font-size: 40px; }
  .pl-match-big .pl-match-txt { font-size: 46px; }
  .pl-match-say { width: 72px; height: 72px; }
  .pl-flash-card { height: min(50vh, 440px); }
}
/* big screens: quiz grows to fill */
@media (min-width: 1600px) and (min-height: 900px) {
  .pl-q { max-width: 1320px; gap: 24px; }
  .pl-q-prog { width: min(680px, 92%); }
  .pl-q-pdot { width: 58px; height: 58px; font-size: 25px; }
  .pl-q-track { top: calc(8px + 29px - 5px); }
  .pl-q-card { padding: 30px 34px 36px; gap: 26px; border-radius: 48px; }
  .pl-q-head { padding: 22px 22px 22px 30px; }
  .pl-q-text { font-size: 64px; }
  .pl-q-hear { width: 96px; height: 96px; }
  .pl-q-choices { gap: 26px; }
  .pl-q-choice { min-height: 130px; border-radius: 36px; font-size: 38px; }
  .pl-q-choices.short .pl-q-choice { min-height: 190px; }
  .pl-q-choices.short .pl-q-ct, .pl-q-ct.huge, .pl-q-choices.mid .pl-q-ct.huge { font-size: 104px; }
  .pl-q-choices.mid .pl-q-ct { font-size: 46px; }
  .pl-q-choices.emo .pl-q-choice { min-height: 210px; }
  .pl-q-ce { font-size: 120px; }
  .pl-match { max-width: 1200px; }
  .pl-match-item { min-height: 120px; font-size: 40px; }
  .pl-match-emo .pl-match-e1 { font-size: 60px; }
  .pl-match-big .pl-match-txt { font-size: 72px; }
  .pl-flash { max-width: 1000px; }
  .pl-flash-card { height: min(58vh, 620px); }
}
@media (max-width: 600px) { .pl-flash-ftxt.pl-flash-small { font-size: 46px; } .pl-q-choices.emo.multi .pl-q-ce { font-size: 52px; } }
