/* The respondent journey: welcome, one question per screen, finish. */

.shell { max-width: 620px; margin: 0 auto; padding: 26px 20px 90px; }

/* ---- Top bar ------------------------------------------------------ */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--glass-bor);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand img {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: #fff;
  object-fit: cover;
}

.brand b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.brand span { font-size: 12px; color: var(--mu); }

.bar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--glass-bor);
  background: var(--glass);
  color: var(--tx);
  cursor: pointer;
  font-size: 15px;
  transition: transform .2s var(--ease-pop), border-color .2s;
}

.icon-btn:hover { transform: translateY(-2px); border-color: var(--primary); }

.tabs {
  display: flex; gap: 2px;
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--glass-bor);
  background: var(--glass);
}

.tab {
  padding: 6px 13px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--mu);
  font: 500 13px var(--f);
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: all .2s;
}

.tab.on { background: var(--grad-brand); color: #fff; }

/* ---- Anonymity notice --------------------------------------------- */
/*
   Deliberately prominent and deliberately precise. It claims only what is
   true: the stored response carries no identity. Overstating this would be
   worse than saying nothing.
*/

.privacy {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--glass-bor);
  background: var(--tint-success);
  margin-bottom: 22px;
}

.privacy i { color: var(--success); font-size: 17px; margin-top: 1px; }
.privacy h4 { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.privacy p { font-size: 12px; color: var(--mu); line-height: 1.6; }

/* ---- Welcome ------------------------------------------------------ */

.welcome { text-align: center; padding: 30px 26px 34px; }

.welcome-art {
  width: 108px; height: 108px;
  margin: 0 auto 22px;
  border-radius: 30px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(232, 114, 26, .3);
}

.welcome h1 {
  font-size: clamp(25px, 6vw, 33px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 12px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome > p {
  font-size: 14.5px;
  color: var(--mu);
  line-height: 1.7;
  max-width: 390px;
  margin: 0 auto 24px;
}

.assurances {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 9px;
  margin-bottom: 26px;
}

.assurance {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 30px;
  border: 1px solid var(--glass-bor);
  background: var(--glass);
  font-size: 12.5px;
  font-weight: 500;
}

.assurance i { color: var(--accent); font-size: 14px; }

/* ---- Buttons ------------------------------------------------------ */

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 30px;
  border: none;
  border-radius: 30px;
  background: var(--grad-brand);
  background-size: 200% 200%;
  color: #fff;
  font: 600 15px var(--f);
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition: transform .25s var(--ease-pop), box-shadow .25s;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 40px rgba(232, 114, 26, .45);
}

.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.btn-primary i { transition: transform .3s var(--ease-pop); }
.btn-primary:hover i { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px;
  border-radius: 30px;
  border: 1px solid var(--glass-bor);
  background: var(--glass);
  color: var(--tx);
  font: 500 13.5px var(--f);
  cursor: pointer;
  transition: all .2s;
}

.btn-ghost:hover { border-color: var(--primary); transform: translateY(-2px); }

/* ---- Progress: growing tree + chapters ---------------------------- */

.progress-wrap { margin-bottom: 20px; }

.tree-row {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid var(--glass-bor);
  background: var(--glass);
  margin-bottom: 12px;
}

.tree {
  font-size: 27px;
  line-height: 1;
  transition: transform .45s var(--ease-pop);
}

.tree.grew { animation: pop .6s var(--ease-pop); }

.tree-meta { flex: 1; min-width: 0; }

.tree-chapter {
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.tree-pct { color: var(--accent); font-variant-numeric: tabular-nums; }

.track {
  height: 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--tx) 12%, transparent);
  overflow: hidden;
}

.track > span {
  display: block; height: 100%; width: 0;
  border-radius: 6px;
  background: var(--grad-brand);
  transition: width .55s var(--ease-out);
}

/* Chapter rail */
.chapters { display: flex; gap: 6px; }

.chapter {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 3px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 10px;
  color: var(--hi);
  text-align: center;
  transition: all .3s;
}

.chapter .ci { font-size: 15px; filter: grayscale(1); opacity: .5; transition: all .3s; }
.chapter.on { border-color: var(--glass-bor); background: var(--glass); color: var(--tx); }
.chapter.on .ci { filter: none; opacity: 1; transform: scale(1.15); }
.chapter.done .ci { filter: none; opacity: .85; }
.chapter.done { color: var(--mu); }

/* ---- Question card ------------------------------------------------ */

.qcard { padding: 26px 24px; }

.qhead {
  font-size: 11px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 9px;
  display: flex; align-items: center; gap: 7px;
}

.qtext {
  font-size: 19px; font-weight: 600;
  line-height: 1.35; letter-spacing: -.02em;
  margin-bottom: 22px;
}

/* ---- Emoji rating cards ------------------------------------------- */

.emoji-row { display: flex; gap: 8px; }

.emoji-card {
  flex: 1;
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 15px 5px 12px;
  border-radius: 15px;
  border: 1.5px solid var(--glass-bor);
  background: var(--glass);
  cursor: pointer;
  transition: transform .28s var(--ease-pop), border-color .25s, background .25s;
}

.emoji-card .e {
  font-size: 27px; line-height: 1;
  transition: transform .3s var(--ease-pop);
  filter: grayscale(.45);
}

.emoji-card .l {
  font-size: 10px; font-weight: 500;
  color: var(--hi); text-align: center; line-height: 1.35;
}

.emoji-card:hover {
  transform: translateY(-6px) scale(1.04);
  border-color: var(--primary);
  box-shadow: 0 12px 26px rgba(232, 114, 26, .26);
}

.emoji-card:hover .e { transform: scale(1.2); filter: none; }

/* Gradient border on the selected card, drawn as a masked pseudo-element so
   the fill underneath stays translucent. */
.emoji-card.sel {
  background: var(--tint-primary);
  border-color: transparent;
  transform: translateY(-4px);
}

.emoji-card.sel::after {
  content: '';
  position: absolute; inset: -1.5px;
  border-radius: 15px;
  padding: 1.5px;
  background: var(--grad-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.emoji-card.sel .e { filter: none; transform: scale(1.16); }
.emoji-card.sel .l { color: var(--tx); font-weight: 600; }

/* ---- Choice chips -------------------------------------------------- */

.chips { display: flex; flex-direction: column; gap: 9px; }

.chip {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 14px 17px;
  border-radius: var(--r);
  border: 1.5px solid var(--glass-bor);
  background: var(--glass);
  color: var(--tx);
  font: 500 14px var(--f);
  text-align: left;
  cursor: pointer;
  transition: transform .22s var(--ease-pop), border-color .2s, background .2s;
}

.chip .dot {
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 2px solid var(--hi);
  flex-shrink: 0;
  display: grid; place-items: center;
  transition: all .25s var(--ease-pop);
}

.chip:hover { transform: translateX(5px); border-color: var(--primary); }

.chip.sel { background: var(--tint-primary); border-color: var(--primary); }
.chip.sel .dot { border-color: var(--primary); background: var(--primary); }

.chip.sel .dot::after {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: pop .35s var(--ease-pop);
}

/* ---- Recommendation scale ----------------------------------------- */

.nps { display: flex; gap: 5px; }

.nps button {
  flex: 1;
  height: 44px;
  border-radius: 11px;
  border: 1.5px solid var(--glass-bor);
  background: var(--glass);
  color: var(--mu);
  font: 600 13px var(--f);
  cursor: pointer;
  transition: transform .22s var(--ease-pop), all .2s;
}

.nps button:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  color: var(--tx);
}

.nps button.sel {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(232, 114, 26, .4);
}

.nps-ends {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 11.5px; color: var(--hi);
}

/* ---- Sticky note text input ---------------------------------------- */

.note {
  position: relative;
  padding: 18px;
  border-radius: 4px 4px 14px 14px;
  background: linear-gradient(160deg, #fde68a 0%, #fcd34d 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
  transform: rotate(-.5deg);
  transition: transform .35s var(--ease-pop);
}

.note:focus-within { transform: rotate(0) scale(1.015); }

/* The torn strip of tape along the top edge. */
.note::before {
  content: '';
  position: absolute;
  top: -9px; left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 78px; height: 20px;
  background: rgba(255, 255, 255, .42);
  border-radius: 2px;
}

.note-icon { font-size: 21px; margin-bottom: 7px; }

.note textarea {
  width: 100%;
  min-height: 108px;
  border: none;
  background: transparent;
  color: #422006;
  font: 400 15px/1.65 var(--f);
  outline: none;
  resize: vertical;
}

.note textarea::placeholder { color: rgba(66, 32, 6, .48); }

.note-count {
  position: absolute; right: 14px; bottom: 9px;
  font-size: 10.5px; color: rgba(66, 32, 6, .5);
  font-variant-numeric: tabular-nums;
}

/* ---- Encouragement ------------------------------------------------- */

.cheer {
  min-height: 22px;
  margin-top: 16px;
  font-size: 13px; font-weight: 500;
  color: var(--accent);
  display: flex; align-items: center; gap: 7px;
}

.cheer.show { animation: fadeUp .38s var(--ease-out) both; }

/* Full-width celebration between chapters. */
.chapter-toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(120%);
  z-index: 90;
  display: flex; align-items: center; gap: 11px;
  padding: 13px 22px;
  border-radius: 30px;
  border: 1px solid var(--glass-bor);
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow);
  font-size: 13.5px; font-weight: 500;
  transition: transform .5s var(--ease-pop);
  max-width: calc(100vw - 40px);
}

.chapter-toast.show { transform: translateX(-50%) translateY(0); }
.chapter-toast .ct-emoji { font-size: 19px; }

/* ---- Card footer ---------------------------------------------------- */

.qfoot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 22px;
}

.qstep { font-size: 12px; color: var(--hi); font-variant-numeric: tabular-nums; }
.qbtns { display: flex; gap: 8px; }

.err {
  display: none;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  background: var(--tint-danger);
  border: 1px solid rgba(204, 34, 0, .28);
  color: var(--danger);
  font-size: 12.5px; font-weight: 500; line-height: 1.55;
}

.err.show { display: block; animation: fadeUp .3s var(--ease-out); }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, .32);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ---- Finish --------------------------------------------------------- */

.finish { text-align: center; padding: 46px 26px; }

.trophy {
  font-size: 62px;
  line-height: 1;
  margin-bottom: 18px;
  animation: trophyIn .8s var(--ease-pop) both, float 4s ease-in-out 1s infinite;
}

@keyframes trophyIn {
  0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
  60%  { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

.finish h2 {
  font-size: 28px; font-weight: 700; letter-spacing: -.03em;
  margin-bottom: 8px;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.finish .sub { font-size: 17px; font-weight: 600; margin-bottom: 14px; }

.finish p {
  font-size: 14px; color: var(--mu); line-height: 1.75;
  max-width: 360px; margin: 0 auto 10px;
}

.finish .heart { font-size: 14px; color: var(--tx); margin-bottom: 24px; }

/* Animated tick drawn by stroking the path. */
.check-ring {
  width: 54px; height: 54px; margin: 0 auto 18px;
}

.check-ring circle, .check-ring path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw .9s var(--ease-out) forwards;
}

.check-ring path { animation-delay: .45s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

#confetti, #fireworks {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
}

/* ---- Screen transitions ---------------------------------------------- */

.screen-in   { animation: fadeUp .42s var(--ease-out) both; }
.screen-back { animation: fadeDown .42s var(--ease-out) both; }

@media (max-width: 560px) {
  .emoji-card .l { font-size: 9px; }
  .emoji-row { gap: 5px; }
  .nps button { height: 38px; font-size: 11.5px; }
  .qtext { font-size: 17px; }
  .chapter { font-size: 9px; }
}

/* Emoji pop on selection, replayed from JS. */
.pop-e { animation: pop .4s var(--ease-pop); }

/* Top-level page switching. */
.page { display: none; }
.page.on { display: block; }

/* ================================================================== */
/*  Required questions, optional name, and the extra motion           */
/* ================================================================== */

/* ---- Required marker ---------------------------------------------- */

.qhead { justify-content: flex-start; }

.qhead-icon { font-size: 14px; }

.required, .qhead .optional {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--tint-danger);
  color: var(--danger);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
}

.qhead .optional {
  background: var(--tint-success);
  color: var(--success);
  text-transform: uppercase;
}

/* The name screen is a normal question card now, so its field needs the
   breathing room the old inline block got from its divider. */
.name-block { margin-top: 4px; padding-top: 0; border-top: none; }

/* ---- Refusal feedback ---------------------------------------------- */
/*
   Every question is required. Being refused should read as a nudge, not a
   telling-off — a respondent who feels scolded two questions in closes the
   tab, and an abandoned response is worth less than a blunt one.
*/

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%      { transform: translateX(-7px); }
  30%      { transform: translateX(6px); }
  45%      { transform: translateX(-4px); }
  60%      { transform: translateX(3px); }
  80%      { transform: translateX(-2px); }
}

.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97); }

.cheer.warn { color: var(--danger); font-weight: 600; }

/* ---- Optional name -------------------------------------------------- */

.name-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--glass-bor);
  animation: fadeUp .45s var(--ease-out) both;
}

.name-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 8px;
}

.name-label i { color: var(--primary); font-size: 15px; }

.optional {
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--tint-success);
  color: var(--success);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.name-input {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--r);
  border: 1.5px solid var(--glass-bor);
  background: var(--glass);
  color: var(--tx);
  font: 500 14.5px var(--f);
  outline: none;
  transition: border-color .2s, box-shadow .25s;
}

.name-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
}

.name-hint { margin-top: 7px; font-size: 11.5px; color: var(--hi); line-height: 1.5; }

/* ---- Shine sweep on primary buttons ---------------------------------- */

.btn-shine { position: relative; overflow: hidden; }

.btn-shine::after {
  content: '';
  position: absolute;
  top: 0; left: -140%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .42), transparent);
  transform: skewX(-18deg);
  animation: sweep 3.4s ease-in-out infinite;
}

@keyframes sweep {
  0%, 62% { left: -140%; }
  92%, 100% { left: 155%; }
}

/* ---- Brand link ------------------------------------------------------- */

.brand { text-decoration: none; color: inherit; transition: transform .25s var(--ease-pop); }
.brand:hover { transform: translateY(-1px); }

a.btn-ghost { text-decoration: none; }

/* ---- Card hover lift --------------------------------------------------- */

.qcard { transition: box-shadow .35s var(--ease-out); }
.qcard:hover { box-shadow: 0 20px 55px rgba(100, 50, 0, .14), 0 6px 16px rgba(100, 50, 0, .07); }

:root[data-theme='dark'] .qcard:hover { box-shadow: 0 22px 60px rgba(0, 0, 0, .55); }

/* Gentle attention pulse on the tree when a chapter completes. */
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50%      { filter: drop-shadow(0 0 10px var(--primary)); }
}

.tree.grew { animation: pop .6s var(--ease-pop), glowPulse 1.2s ease-in-out; }

/* ================================================================== */
/*  Nudge popup                                                        */
/* ================================================================== */
/*
   A playful interruption at the start and again at the halfway mark. It is
   dismissible and auto-closes — the point is to cheer the respondent on, not
   to block them.
*/

.nudge-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg-deep) 62%, transparent);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out);
}

.nudge-overlay.show { opacity: 1; pointer-events: auto; }

.nudge {
  max-width: 380px;
  width: 100%;
  padding: 32px 26px 26px;
  text-align: center;
  transform: scale(.82) translateY(18px);
  transition: transform .45s var(--ease-pop);
}

.nudge-overlay.show .nudge { transform: none; }

.nudge-emoji {
  font-size: 50px;
  line-height: 1;
  margin-bottom: 14px;
  display: inline-block;
  animation: nudgeBounce 1.1s var(--ease-pop) infinite;
}

@keyframes nudgeBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-11px) rotate(4deg); }
}

/* Each word rocks on its own offset cycle, so the chant never reads as one
   static block of text. */
.nudge-chant {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 10px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nudge-chant span { display: inline-block; animation: chant 1s ease-in-out infinite; }
.nudge-chant span:nth-child(2) { animation-delay: .18s; }

@keyframes chant {
  0%, 100% { transform: translateY(0) scale(1); }
  40%      { transform: translateY(-6px) scale(1.07); }
}

.nudge p {
  font-size: 14px;
  color: var(--mu);
  line-height: 1.65;
  margin-bottom: 20px;
}

/* Draining bar showing the auto-dismiss, so the popup never feels stuck. */
.nudge-timer {
  height: 3px;
  border-radius: 3px;
  background: var(--glass-bor);
  overflow: hidden;
  margin-top: 16px;
}

.nudge-timer span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--grad-brand);
  transform-origin: left;
  animation: drain var(--nudge-ms, 4200ms) linear forwards;
}

@keyframes drain { to { transform: scaleX(0); } }

/* ---- Finish sign-off --------------------------------------------------- */

.finish .signoff {
  margin: 18px auto 24px;
  padding: 14px 18px;
  max-width: 350px;
  border-radius: var(--r);
  background: var(--tint-success);
  border: 1px solid var(--glass-bor);
  font-size: clamp(17px, 4.2vw, 20px);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.5;
  animation: fadeUp .5s .5s var(--ease-out) both;
}

.finish .signoff small {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mu);
}

/* ================================================================== */
/*  Mascot                                                             */
/* ================================================================== */
/*
   The character is the boy from the Shivoraa mark. Reusing him rather than
   importing an illustration keeps the brand consistent and costs no extra
   bytes — the image is already in cache as the favicon and hero art.

   He speaks through a bubble that scales in from its tail, so the words read
   as coming from him rather than merely appearing near him.
*/

.mascot-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.mascot {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 14px 34px rgba(232, 114, 26, .34);
  transform-origin: 50% 90%;
  animation: mascotIdle 2.4s ease-in-out infinite;
}

/* Weight shifts foot to foot rather than bobbing straight up, which reads as
   a person rather than a floating sticker. */
@keyframes mascotIdle {
  0%, 100% { transform: translateY(0) rotate(-3deg) scale(1); }
  25%      { transform: translateY(-5px) rotate(0deg) scale(1.02); }
  50%      { transform: translateY(0) rotate(3deg) scale(1); }
  75%      { transform: translateY(-5px) rotate(0deg) scale(1.02); }
}

.mascot.cheering { animation: mascotCheer .9s var(--ease-pop) infinite; }

@keyframes mascotCheer {
  0%, 100% { transform: translateY(0) rotate(-6deg) scale(1); }
  50%      { transform: translateY(-13px) rotate(6deg) scale(1.07); }
}

.mascot.celebrating { animation: mascotCelebrate 1.4s var(--ease-pop) infinite; }

@keyframes mascotCelebrate {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  20%      { transform: translateY(-16px) rotate(-9deg) scale(1.09); }
  40%      { transform: translateY(0) rotate(0) scale(1); }
  60%      { transform: translateY(-11px) rotate(9deg) scale(1.06); }
  80%      { transform: translateY(0) rotate(0) scale(1); }
}

/* ---- Speech bubble ---------------------------------------------------- */

.speech {
  position: relative;
  max-width: 320px;
  padding: 16px 20px 15px;
  border-radius: 20px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-bor);
  box-shadow: var(--glass-shadow);
  font-size: clamp(22px, 5.4vw, 27px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.28;
  transform-origin: 50% 0;
  animation: speechIn .5s var(--ease-pop) both;
}

@keyframes speechIn {
  0%   { opacity: 0; transform: scale(.6) translateY(-10px); }
  70%  { opacity: 1; transform: scale(1.06) translateY(0); }
  100% { opacity: 1; transform: scale(1); }
}

/* The tail, pointing back up at the mascot. */
.speech::before {
  content: '';
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 15px; height: 15px;
  background: var(--glass-strong);
  border-left: 1px solid var(--glass-bor);
  border-top: 1px solid var(--glass-bor);
  border-radius: 3px 0 0 0;
}

.speech .chant-word {
  display: inline-block;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: chant 1s ease-in-out infinite;
}

.speech .chant-word:nth-of-type(2) { animation-delay: .18s; }

/* The supporting line stays quiet on purpose — it is context for the shout
   above it, not a second headline. */
.speech small {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.55;
  color: var(--mu);
}

/* The reassurance is the exception: it is the line people need to believe, so
   it is sized to be read rather than skimmed. */
.finish .speech small {
  font-size: clamp(15px, 3.6vw, 17px);
  font-weight: 700;
  color: var(--success);
}

/* Finish-screen mascot sits a little larger; he has earned it. */
.finish .mascot { width: 118px; height: 118px; border-radius: 32px; }
.finish .speech { max-width: 360px; font-size: clamp(24px, 6vw, 30px); }
