.ct-quiz-card {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  padding: 16px 22px 20px;
  overflow: hidden;
  transition: box-shadow 0.35s ease;
}
.ct-quiz-card.is-on-fire {
  box-shadow: inset 0 0 0 3px var(--gold-bright), 0 0 28px rgba(245, 183, 49, 0.35);
  animation: ct-fire-glow 1.8s ease-in-out infinite;
}
.ct-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
}
.ct-float-pop {
  position: absolute;
  z-index: 14;
  pointer-events: none;
  font-family: "Baloo 2", cursive, sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.95), 0 1px 0 #ffffff;
  white-space: nowrap;
  transform: translate(-50%, 0);
  animation: ct-float-up 0.82s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.ct-float-pop.is-hot {
  font-size: 23px;
  color: #dc2626;
}
.ct-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1.5px dashed var(--border);
}
.ct-cat-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px 2px 0;
}
.ct-cat-scroll::-webkit-scrollbar {
  display: none;
}
.ct-cat-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: "Baloo 2", cursive, sans-serif;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.ct-cat-pill:hover {
  border-color: var(--gold);
  color: var(--text);
  background: var(--gold-soft);
}
.ct-cat-pill.is-active {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: var(--text-light);
}
.ct-cat-pill.ct-cat-custom {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--primary-dark);
}
.ct-cat-pill.ct-cat-custom.is-active {
  background: var(--pine-deep);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}
.ct-top-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ct-mini-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ct-mini-toggle:hover {
  border-color: var(--gold);
  color: var(--text);
}
.ct-mini-toggle.is-on {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: var(--text-light);
}
.ct-sound-icon {
  width: 36px;
  padding: 0;
  font-size: 15px;
}
.ct-sound-icon.is-muted {
  opacity: 0.55;
}
.ct-custom-panel {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card-warm);
  border: 2px solid var(--gold);
  display: grid;
  gap: 11px;
  animation: ct-enter-up 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ct-custom-panel[hidden] {
  display: none;
}
.ct-custom-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ct-custom-head strong {
  font-family: "Baloo 2", cursive, sans-serif;
  font-size: 17px;
  color: var(--primary-dark);
}
.ct-close-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.ct-custom-label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.ct-preset-row,
.ct-check-grid,
.ct-len-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}
.ct-preset-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--gold);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.ct-preset-btn:hover {
  background: var(--gold-soft);
}
.ct-check-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}
.ct-check-chip input {
  accent-color: var(--primary);
  margin: 0;
}
.ct-len-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.ct-len-btn.is-active {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: var(--text-light);
}
.ct-custom-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ct-toast {
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  animation: ct-enter-up 0.18s ease both;
}
.ct-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
}
.ct-hud-left,
.ct-hud-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ct-topic-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.ct-score-pill {
  background: var(--gold-soft);
  border: 1.5px solid var(--gold);
  color: var(--primary-dark);
  padding: 2px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.2s ease;
}
.ct-score-pill.is-bump {
  animation: ct-badge-pop 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.ct-streak-pill {
  background: #ffedd5;
  border: 1.5px solid #f97316;
  color: #c2410c;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  animation: ct-badge-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.ct-streak-pill.is-hot {
  background: linear-gradient(135deg, #f97316, #dc2626);
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.32);
}
.ct-ornaments {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 5px 10px;
  background: var(--bg);
  border-radius: 999px;
  border: 1px solid var(--border);
}
.ct-orn {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.ct-ornaments.is-dense {
  border-radius: 14px;
}
.ct-ornaments.is-dense .ct-orn {
  width: 20px;
  height: 20px;
  font-size: 12px;
}
.ct-orn.is-current {
  background: var(--gold-bright);
  color: var(--pine-deep);
  transform: scale(1.16);
  box-shadow: 0 0 8px rgba(245, 183, 49, 0.65);
}
.ct-orn.is-right {
  background: var(--accent);
  color: var(--text-light);
  box-shadow: 0 0 8px rgba(24, 122, 78, 0.45);
}
.ct-orn.is-wrong {
  background: var(--primary);
  color: var(--text-light);
}
.ct-orn.is-just-lit {
  animation: ct-orn-pop 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.ct-timer-wrap {
  margin-bottom: 12px;
}
.ct-timer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--accent);
}
.ct-timer-head.is-warn {
  color: #b45309;
}
.ct-timer-head.is-urgent {
  color: var(--primary);
}
.ct-timer-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.ct-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #22c55e);
  transition: width 0.1s linear;
}
.ct-timer-fill.is-warn {
  background: linear-gradient(90deg, #d97706, #f5b731);
}
.ct-timer-fill.is-urgent {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}
.ct-q-kicker {
  display: inline-block;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}
.ct-q-title {
  margin: 0 0 14px;
  font-family: "Baloo 2", cursive, sans-serif;
  font-size: clamp(22px, 2.7vw, 28px);
  line-height: 1.24;
  color: var(--text);
  animation: ct-enter-up 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ct-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.ct-options.is-tf {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ct-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 11px 16px;
  border-radius: 16px;
  border: 2px solid var(--border);
  border-bottom-width: 5px;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  animation: ct-opt-enter 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.ct-opt-btn:nth-child(2) { animation-delay: 0.03s; }
.ct-opt-btn:nth-child(3) { animation-delay: 0.06s; }
.ct-opt-btn:nth-child(4) { animation-delay: 0.09s; }
.ct-options.is-tf .ct-opt-btn {
  justify-content: center;
  min-height: 68px;
  font-size: 18px;
  font-family: "Baloo 2", cursive, sans-serif;
}
.ct-opt-key {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 2px solid var(--gold);
  color: var(--primary-dark);
  font-family: "Baloo 2", cursive, sans-serif;
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ct-opt-btn.is-tf-true .ct-opt-key {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.ct-opt-btn.is-tf-false .ct-opt-key {
  background: #fee2e2;
  border-color: var(--primary);
  color: var(--primary);
}
.ct-opt-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: var(--card-warm);
}
.ct-opt-btn:active:not(:disabled) {
  transform: translateY(3px);
  border-bottom-width: 2px;
}
.ct-opt-btn:hover:not(:disabled) .ct-opt-key {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-light);
}
.ct-opt-btn.is-tf-true:hover:not(:disabled) .ct-opt-key {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-light);
}
.ct-opt-btn.is-eliminated {
  opacity: 0.25;
  text-decoration: line-through;
  background: var(--bg);
  border-style: dashed;
  cursor: not-allowed;
}
.ct-opt-btn.is-correct {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 122, 78, 0.18);
  animation: ct-pop-right 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ct-opt-btn.is-correct .ct-opt-key {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-light);
}
.ct-opt-btn.is-wrong {
  border-color: var(--primary);
  background: #fee2e2;
  color: var(--primary-dark);
  animation: ct-shake 0.34s ease both;
}
.ct-opt-btn.is-wrong .ct-opt-key {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-light);
}
.ct-helper-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.ct-helper-hint {
  margin-right: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.ct-helper-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.ct-helper-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--gold-soft);
  transform: translateY(-1px);
}
.ct-helper-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ct-feedback {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--gold-soft);
  border: 2px solid var(--gold);
  animation: ct-enter-up 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ct-feedback-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ct-feedback-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ct-pts-pop {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  background: var(--card);
  border: 1.5px solid var(--accent);
  padding: 2px 9px;
  border-radius: 999px;
}
.ct-next-btn {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 14px;
}
.ct-feedback p {
  margin: 8px 0 0;
  font-size: 15px;
}
.ct-tally-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.ct-legend-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 10px 16px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--pine-deep), var(--pine), var(--pine-deep));
  border: 2px solid var(--gold-bright);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: "Baloo 2", cursive, sans-serif;
  font-size: 16px;
  font-weight: 800;
  animation: ct-enter-up 0.28s ease both;
}
.ct-sleigh-svg {
  flex-shrink: 0;
  animation: ct-sleigh-bob 1.4s ease-in-out infinite;
}
.ct-summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
  animation: ct-enter-up 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ct-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}
.ct-stat-box {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card-warm);
  border: 1.5px solid var(--border);
  text-align: center;
}
.ct-stat-val {
  display: block;
  font-family: "Baloo 2", cursive, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.15;
}
.ct-stat-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.ct-card-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ct-card-stage {
  position: relative;
  width: 100%;
  max-width: 274px;
  perspective: 1100px;
}
.ct-card-frame {
  position: relative;
  border-radius: 20px;
  padding: 3px;
  background: linear-gradient(135deg, #ffe082 0%, #d99b18 48%, #fff0b3 100%);
  box-shadow: 0 18px 36px rgba(10, 42, 28, 0.24), 0 0 0 1px rgba(245, 183, 49, 0.45);
  transform-style: preserve-3d;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease;
  will-change: transform;
  --rx: 0deg;
  --ry: 0deg;
  --foil-x: 50%;
  --foil-y: 50%;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
}
.ct-card-frame:hover {
  box-shadow: 0 22px 44px rgba(10, 42, 28, 0.32), 0 0 24px rgba(245, 183, 49, 0.38);
}
.ct-card-frame.is-entering {
  animation: ct-card-unwrap 0.82s cubic-bezier(0.2, 0.92, 0.25, 1.06) both;
}
.ct-card-frame.is-settled {
  animation: ct-card-settle 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ct-unlock-stage {
  position: relative;
  min-height: 446px;
  border-radius: 18px;
  padding: 26px 18px 20px;
  background: radial-gradient(circle at 50% 44%, #186444 0%, #0e422c 55%, #072418 100%);
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 130, 0.28), 0 12px 28px rgba(7, 36, 24, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  animation: ct-enter-up 0.22s ease both;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.ct-unlock-stage.is-legend {
  background: radial-gradient(circle at 50% 42%, #247851 0%, #104830 52%, #072418 100%);
  box-shadow: inset 0 0 42px rgba(245, 183, 49, 0.28), 0 14px 32px rgba(7, 36, 24, 0.28);
}
.ct-unlock-stage.is-exiting {
  opacity: 0;
  transform: scale(1.02);
}
.ct-unlock-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 640px;
  height: 640px;
  margin-left: -320px;
  margin-top: -320px;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 214, 102, 0.26) 0deg 12deg,
    transparent 12deg 30deg
  );
  opacity: 0;
  transform: scale(0.28);
  transition: opacity 0.36s ease, transform 0.56s cubic-bezier(0.18, 0.92, 0.28, 1.05);
}
.ct-unlock-stage.is-opened .ct-unlock-rays {
  opacity: 0.92;
  transform: scale(1.08);
  animation: ct-rays-spin 14s linear infinite;
}
.ct-unlock-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  margin-left: -150px;
  margin-top: -150px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 224, 130, 0.42) 0%, rgba(245, 183, 49, 0.14) 44%, transparent 72%);
  transform: scale(0.68);
  transition: transform 0.42s ease, opacity 0.42s ease;
}
.ct-unlock-stage.is-opened .ct-unlock-glow {
  transform: scale(1.38);
  background: radial-gradient(circle, rgba(255, 232, 150, 0.68) 0%, rgba(245, 183, 49, 0.22) 48%, transparent 74%);
}
.ct-unlock-badge {
  position: relative;
  z-index: 6;
  padding: 5px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b91c2a, #e02c3d, #b91c2a);
  border: 2px solid var(--gold-bright);
  color: #fff9e6;
  font-family: "Baloo 2", cursive, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px) scale(0.84);
  transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.2, 0.95, 0.28, 1.12);
}
.ct-unlock-stage.is-opened .ct-unlock-badge {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.ct-unlock-center {
  position: relative;
  width: 240px;
  height: 318px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1100px;
  z-index: 4;
}
.ct-unlock-card-slot {
  position: absolute;
  width: 176px;
  z-index: 5;
  opacity: 0;
  transform: translateY(68px) scale(0.32) rotateY(-30deg);
  pointer-events: none;
}
.ct-unlock-stage.is-opened .ct-unlock-card-slot {
  animation: ct-unlock-card-rise 0.64s cubic-bezier(0.18, 0.96, 0.28, 1.08) both;
}
.ct-unlock-card-inner {
  position: relative;
  border-radius: 16px;
  padding: 3px;
  background: linear-gradient(135deg, #ffe699 0%, #d99b18 50%, #fff4cc 100%);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.44), 0 0 32px rgba(255, 209, 102, 0.52);
  overflow: hidden;
}
.ct-unlock-card-inner .ct-canvas {
  border-radius: 13px;
}
.ct-unlock-shimmer {
  position: absolute;
  inset: -25%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 250, 224, 0.22) 44%, rgba(255, 236, 158, 0.8) 50%, rgba(255, 250, 224, 0.22) 56%, transparent 66%);
  transform: translateX(-135%) rotate(8deg);
}
.ct-unlock-stage.is-opened .ct-unlock-shimmer {
  animation: ct-foil-sweep 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.16s 1 both;
}
.ct-gift-wrap {
  position: relative;
  width: 148px;
  height: 152px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 3;
  animation: ct-gift-wiggle 0.46s cubic-bezier(0.32, 0.04, 0.28, 1) both;
}
.ct-gift-lid {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
  margin-bottom: -4px;
  transition: transform 0.46s cubic-bezier(0.2, 0.9, 0.25, 1), opacity 0.38s ease;
}
.ct-gift-bow {
  display: block;
  margin-bottom: -10px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
}
.ct-gift-lid-box {
  position: relative;
  width: 148px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ef3b4a 0%, #c81e2f 100%);
  border: 2px solid #f5b731;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.ct-gift-body {
  position: relative;
  width: 134px;
  height: 96px;
  border-radius: 8px 8px 14px 14px;
  background: linear-gradient(160deg, #dc2638 0%, #991624 100%);
  border: 2px solid #f5b731;
  border-top: none;
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.22), 0 12px 24px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.36s ease;
}
.ct-gift-ribbon-v {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 24px;
  margin-left: -12px;
  background: linear-gradient(90deg, #d99b18 0%, #ffe082 50%, #c7830a 100%);
}
.ct-gift-ribbon-h {
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  height: 20px;
  background: linear-gradient(180deg, #ffe082 0%, #d99b18 100%);
}
.ct-gift-shadow {
  width: 132px;
  height: 16px;
  margin-top: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.36);
  filter: blur(4px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.ct-unlock-stage.is-opened .ct-gift-lid {
  transform: translateY(-96px) translateX(38px) rotate(26deg) scale(0.84);
  opacity: 0;
}
.ct-unlock-stage.is-opened .ct-gift-body {
  transform: translateY(72px) scale(0.76);
  opacity: 0.22;
}
.ct-unlock-stage.is-opened .ct-gift-shadow {
  opacity: 0.15;
  transform: scale(0.72);
}
.ct-unlock-status {
  position: relative;
  z-index: 6;
  margin: 2px 0 0;
  font-family: "Baloo 2", cursive, sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fffaf0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.ct-unlock-skip {
  position: relative;
  z-index: 6;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 248, 224, 0.78);
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(7, 36, 24, 0.45);
}
.ct-card-inner {
  position: relative;
  border-radius: 17px;
  overflow: hidden;
  background: #0b3322;
}
.ct-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 17px;
}
.ct-card-foil {
  position: absolute;
  inset: 0;
  border-radius: 17px;
  pointer-events: none;
  background: radial-gradient(circle at var(--foil-x) var(--foil-y), rgba(255, 245, 200, 0.32), rgba(255, 214, 102, 0.08) 34%, transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ct-card-frame:hover .ct-card-foil {
  opacity: 1;
}
.ct-card-shimmer {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 248, 214, 0.16) 44%, rgba(255, 232, 148, 0.62) 50%, rgba(255, 248, 214, 0.16) 56%, transparent 64%);
  transform: translateX(-130%) rotate(8deg);
}
.ct-card-frame.is-shimmering .ct-card-shimmer {
  animation: ct-foil-sweep 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.32s 1 both;
}
.ct-card-sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 16px;
  line-height: 1;
  color: #ffd166;
  text-shadow: 0 0 10px rgba(245, 183, 49, 0.85);
  z-index: 2;
  animation: ct-sparkle-twinkle 2.4s ease-in-out infinite;
}
.ct-card-sparkle-a {
  top: -8px;
  right: -6px;
}
.ct-card-sparkle-b {
  bottom: 24px;
  left: -8px;
  font-size: 13px;
  animation-delay: 1.1s;
}
.ct-challenge-box,
.ct-board-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 2px dashed var(--border);
}
.ct-inline-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.ct-inline-row input {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 15px;
  background: var(--card);
}
.ct-link-box {
  margin-top: 12px;
  padding: 14px;
  background: var(--card-warm);
  border: 2px solid var(--gold);
  border-radius: 14px;
  font-size: 14px;
  word-break: break-all;
  display: grid;
  gap: 8px;
}
.ct-board-list {
  margin: 12px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
@keyframes ct-enter-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ct-opt-enter {
  from { opacity: 0; transform: translateY(9px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ct-pop-right {
  0% { transform: scale(1); }
  45% { transform: scale(1.032); }
  100% { transform: scale(1); }
}
@keyframes ct-shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-6px); }
  46% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
  88% { transform: translateX(2px); }
}
@keyframes ct-orn-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.36); }
  100% { transform: scale(1); }
}
@keyframes ct-badge-pop {
  0% { transform: scale(0.84); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes ct-float-up {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(0.82); }
  20% { opacity: 1; transform: translate(-50%, -6px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -44px) scale(0.96); }
}
@keyframes ct-fire-glow {
  0%, 100% { box-shadow: inset 0 0 0 2.5px var(--gold-bright), 0 0 18px rgba(245, 183, 49, 0.24); }
  50% { box-shadow: inset 0 0 0 3.5px #f97316, 0 0 30px rgba(249, 115, 22, 0.42); }
}
@keyframes ct-sleigh-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}
@keyframes ct-card-unwrap {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.84) rotateY(-28deg) rotateX(9deg);
  }
  58% {
    opacity: 1;
    transform: translateY(-4px) scale(1.025) rotateY(6deg) rotateX(-2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateY(0deg) rotateX(0deg);
  }
}
@keyframes ct-foil-sweep {
  0% { transform: translateX(-130%) rotate(8deg); opacity: 0; }
  18% { opacity: 1; }
  85% { opacity: 0.9; }
  100% { transform: translateX(135%) rotate(8deg); opacity: 0; }
}
@keyframes ct-sparkle-twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.82) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.18) rotate(22deg); }
}
@keyframes ct-gift-wiggle {
  0% { opacity: 0; transform: translateY(-28px) scale(0.72); }
  32% { opacity: 1; transform: translateY(4px) scale(1.04, 0.94); }
  52% { transform: translateY(-3px) rotate(-8deg) scale(1.02); }
  72% { transform: translateY(-2px) rotate(8deg) scale(1.05); }
  88% { transform: translateY(2px) rotate(-4deg) scale(1.08, 0.92); }
  100% { transform: translateY(0) rotate(0deg) scale(1.02); }
}
@keyframes ct-unlock-card-rise {
  0% {
    opacity: 0;
    transform: translateY(72px) scale(0.32) rotateY(-30deg);
  }
  62% {
    opacity: 1;
    transform: translateY(-10px) scale(1.06) rotateY(7deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateY(0deg);
  }
}
@keyframes ct-card-settle {
  0% { opacity: 0.35; transform: scale(0.92) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes ct-rays-spin {
  from { transform: scale(1.08) rotate(0deg); }
  to { transform: scale(1.08) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ct-quiz-card,
  .ct-q-title,
  .ct-opt-btn,
  .ct-feedback,
  .ct-custom-panel,
  .ct-toast,
  .ct-orn,
  .ct-streak-pill,
  .ct-score-pill,
  .ct-float-pop,
  .ct-legend-banner,
  .ct-sleigh-svg,
  .ct-summary-grid,
  .ct-card-frame,
  .ct-card-foil,
  .ct-card-shimmer,
  .ct-card-sparkle,
  .ct-unlock-stage,
  .ct-unlock-rays,
  .ct-unlock-card-slot,
  .ct-unlock-shimmer,
  .ct-gift-wrap {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 640px) {
  .ct-quiz-card {
    padding: 14px 12px 16px;
  }
  .ct-topbar {
    gap: 6px;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
  .ct-cat-scroll {
    -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%);
    mask-image: linear-gradient(to right, #000 86%, transparent 100%);
    padding-right: 18px;
  }
  .ct-cat-pill {
    padding: 5px 10px;
    font-size: 13px;
  }
  .ct-mini-toggle {
    padding: 5px 9px;
    font-size: 12px;
  }
  .ct-ornaments {
    gap: 3px;
    padding: 4px 8px;
  }
  .ct-orn {
    width: 20px;
    height: 20px;
  }
  .ct-options,
  .ct-summary-grid {
    grid-template-columns: 1fr;
  }
  .ct-options.is-tf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ct-helper-bar {
    justify-content: flex-start;
  }
  .ct-helper-hint {
    width: 100%;
  }
  .ct-feedback-head .ct-next-btn {
    width: auto;
  }
  .ct-stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
}