/* ---- Byte's build-along (guided solve, half XP) ---- */

.learn-btn-guide {
  background: linear-gradient(180deg, #a78bfa, #6d28d9);
  color: #fff;
}

.quiz-guide-btn { margin-top: 0.75rem; }

.learn-guide {
  margin-top: 0.9rem;
  border: 1px solid #3b2f6b;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(46, 33, 92, 0.55), rgba(17, 24, 44, 0.9));
  padding: 0.8rem;
}

.learn-guide-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.learn-guide-title { display: flex; flex-direction: column; }
.learn-guide-title strong { color: #e8f1fb; }
.learn-guide-title span { color: #a5b4cf; font-size: 0.75rem; }

.learn-guide-xpnote {
  margin-left: auto;
  font-size: 0.68rem;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

.learn-guide-close {
  border: 0;
  background: transparent;
  color: #a5b4cf;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
}

.learn-guide-close:hover { color: #fff; }

.learn-guide-say {
  margin: 0.7rem 0 0.6rem;
  padding: 0.55rem 0.7rem;
  background: rgba(124, 255, 178, 0.07);
  border-left: 3px solid #7dd3fc;
  border-radius: 0 10px 10px 0;
  color: #d9e6f5;
  font-size: 0.85rem;
  line-height: 1.45;
}

.learn-guide-options {
  display: grid;
  gap: 0.45rem;
}

.learn-guide-opt {
  text-align: left;
  border: 1px solid #274067;
  border-radius: 10px;
  background: #0f1d33;
  color: #dce8f7;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.learn-guide-opt code {
  font-family: var(--alb-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: normal;
}

.learn-guide-opt:hover:not(:disabled) {
  border-color: #8b5cf6;
  transform: translateY(-1px);
}

.learn-guide-opt.is-correct {
  border-color: #38bdf6;
  background: rgba(52, 211, 153, 0.12);
}

.learn-guide-opt.is-wrong {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  opacity: 0.75;
  animation: guideShake 0.3s ease;
}

.learn-guide-opt.elim .elim-tag {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  vertical-align: middle;
}

.learn-guide-preview {
  margin-top: 0.7rem;
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #1e3a5f;
  background: #0b1524;
  padding: 0.7rem 0.85rem;
  font-family: var(--alb-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #c9d6e5;
  white-space: pre-wrap;
}

.learn-guide-preview .is-new {
  color: #7dd3fc;
  animation: guideLineIn 0.35s ease;
}

.learn-guide-foot {
  margin-top: 0.7rem;
  display: flex;
  justify-content: flex-end;
}

.learn-choice.is-elim {
  opacity: 0.45;
  text-decoration: line-through;
  border-color: #f87171;
}

@keyframes guideShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes guideLineIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .learn-hero,
  .learn-hero img.mascot,
  .learn-teach,
  .learn-feedback,
  .learn-celebrate,
  .learn-choice.is-wrong,
  .learn-hero-sparkles span,
  .map-edge.is-hot,
  .map-node.is-buy .map-cell,
  .graphics-gateway.is-buy .graphics-gateway-cell,
  .game-gateway.is-buy .game-gateway-cell,
  .software-gateway.is-buy .software-gateway-cell,
  .engineering-gateway.is-buy .engineering-gateway-cell,
  .arcade-card.is-buy,
  .map-aura,
  .learn-xp-toast.pop,
  .learn-map-unlock,
  .type-station,
  .type-choice.is-wrong,
  .type-byte-stack span,
  .binary-finger,
  .byte-show,
  .bms-cell,
  .sheet-stamp,
  .paper-sheet.is-in,
  .type-station.is-leaving,
  .learn-stage,
  #learnNextBtn.is-live,
  .arithmetic-marks span.is-done {
    animation: none !important;
    transition: none !important;
  }
}

