@font-face {
  font-family: "Nohemi";
  src: url("../fonts/Nohemi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Red Hat Display";
  src: url("../fonts/RedHatDisplay-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fafafa;
  --ink: #000000;
  --muted: #6b6b6b;
  --line: #9dc9f5;
  --line-deep: #6ba8e0;
  --card: #ffffff;
  --edge: #d9d9d9;
  --blue-soft: #d8e9fb;
  --font-title: "Nohemi", "Red Hat Display", system-ui, sans-serif;
  --font-body: "Red Hat Display", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Elements below are laid out with flex or grid, which would otherwise win
   against the hidden attribute the game uses to show and hide them. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
.level-head h1,
.win-card h2,
.clear-banner-title {
  font-family: var(--font-title);
  font-weight: 500;
}

.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ------------------------------------------------------------------- coach */

.coach {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.42);
  backdrop-filter: blur(4px);
  animation: fade 0.25s ease;
}

.coach-card {
  width: min(100%, 380px);
  background: var(--card);
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-shadow: 0 20px 50px rgba(17, 17, 17, 0.22);
  text-align: left;
  animation: cardIn 0.4s cubic-bezier(0.22, 1.4, 0.4, 1) both;
}

.coach-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--line);
}

.coach-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.coach-body {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.coach-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.coach-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.15);
}

.coach-dots span.is-on {
  background: var(--line);
}

.coach-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mission-tip {
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(226, 112, 58, 0.1);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  animation: tipIn 0.28s ease;
}

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

@media (min-width: 900px) {
  .app {
    max-width: 960px;
  }
}

/* ------------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.brand-mark {
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 15px;
  text-transform: uppercase;
}

.brand-game {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.vault-toggle {
  appearance: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(226, 112, 58, 0.1);
  color: var(--line);
  cursor: pointer;
}

/* -------------------------------------------------------------------- vault */

.vault {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 14px 16px;
}

.vault h2 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.vault ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vault li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.vault li code {
  font-size: 12px;
  font-weight: 700;
  color: var(--line);
  letter-spacing: 0.05em;
}

.vault li.is-grand {
  border-top: 1px dashed var(--edge);
  padding-top: 6px;
  font-weight: 700;
}

.vault-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------------- levels */

.levels {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.levels-divider {
  align-self: center;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 2px;
  border-left: 1px solid var(--edge);
  padding-left: 8px;
  margin-left: 1px;
}

.level-btn {
  appearance: none;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 9px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.level-btn:hover {
  border-color: rgba(17, 17, 17, 0.28);
}

.level-btn:active {
  transform: translateY(1px);
}

.level-btn .num {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.1;
}

.level-btn .name {
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.level-btn .pct {
  font-size: 9px;
  font-weight: 700;
  color: var(--line);
}

.level-btn.is-cleared {
  border-color: rgba(226, 112, 58, 0.5);
  background: rgba(226, 112, 58, 0.08);
}

.level-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.level-btn.is-active .name {
  color: rgba(255, 255, 255, 0.7);
}

.level-btn.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
}

/* Draws the eye to the level that just opened up. */
.level-btn.is-fresh {
  animation: freshUnlock 0.9s ease 3;
}

@keyframes freshUnlock {
  0%, 100% {
    border-color: var(--edge);
    box-shadow: none;
  }
  50% {
    border-color: var(--line);
    box-shadow: 0 0 0 4px rgba(226, 112, 58, 0.18);
  }
}

.bonus-note {
  margin: -6px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

/* -------------------------------------------------------------------- stage */

.stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.level-head h1 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.level-head p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* Board + process list share one view: list above on phones, right on desktop. */
.play {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.play-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.board-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  background: var(--card);
  border-radius: 20px;
  padding: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.06);
}

#board {
  display: block;
  touch-action: none;
  cursor: pointer;
  outline: none;
  border-radius: 14px;
}

#board:focus-visible {
  box-shadow: 0 0 0 3px rgba(226, 112, 58, 0.4);
}

#board.is-solved {
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#board.is-celebrating {
  animation: celebratePulse 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

@keyframes celebratePulse {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.03); filter: brightness(1.08); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* Fixed over everything so confetti flies across the whole screen. */
.confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 80;
}

/* The unmistakable "you passed" beat before the win card. */
.clear-banner {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(17, 17, 17, 0.55);
  pointer-events: none;
  text-align: center;
}

.clear-banner-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f5c08a;
}

.clear-banner-title {
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.05;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.clear-banner.is-in {
  animation: bannerIn 0.45s cubic-bezier(0.22, 1.4, 0.4, 1) both;
}

.clear-banner.is-out {
  animation: bannerOut 0.22s ease forwards;
}

@keyframes bannerIn {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bannerOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.04);
  }
}

/* Aura pickup flash — good (blue/grey) vs bad (red trap). */
.pickup {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 5;
  transform: translate(-50%, -50%) scale(0.85);
  min-width: 200px;
  max-width: 88%;
  padding: 16px 18px 18px;
  border-radius: 16px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 12px 36px rgba(17, 17, 17, 0.22);
}

.pickup.is-good {
  background: #1a2a33;
  color: #fff;
  border: 2px solid #5ab4e6;
}

.pickup.is-bad {
  background: #2a1515;
  color: #fff;
  border: 2px solid #e24a4a;
}

.pickup.is-in {
  animation: pickupIn 0.4s cubic-bezier(0.22, 1.4, 0.4, 1) both;
}

.pickup.is-out {
  animation: pickupOut 0.32s ease forwards;
}

.pickup.is-freeze {
  animation:
    pickupIn 0.4s cubic-bezier(0.22, 1.4, 0.4, 1) both,
    freezePulse 0.5s ease 0.4s;
}

@keyframes pickupIn {
  from { opacity: 0; transform: translate(-50%, -36%) scale(0.72); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes pickupOut {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -62%) scale(1.04); }
}

@keyframes freezePulse {
  0%, 100% { box-shadow: 0 12px 36px rgba(17, 17, 17, 0.22); }
  50% { box-shadow: 0 0 0 10px rgba(226, 74, 74, 0.4), 0 12px 36px rgba(17, 17, 17, 0.22); }
}

.pickup-kind {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.85;
  animation: pickupTextIn 0.45s ease 0.08s both;
}

.pickup.is-good .pickup-kind { color: #7ec8ef; }
.pickup.is-bad .pickup-kind { color: #ff8a8a; }

.pickup-label {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  animation: pickupTextIn 0.5s ease 0.16s both;
}

.pickup-msg {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.92;
  animation: pickupTextIn 0.55s ease 0.28s both;
}

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

#board.is-frozen {
  filter: saturate(0.7) brightness(0.92);
}

/* -------------------------------------------------------------------- toast */

.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------------------- hud */

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

.hud-item {
  display: flex;
  flex-direction: column;
  min-width: 44px;
}

.hud-label {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hud-value {
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.hud-spacer {
  flex: 1;
}

.btn {
  appearance: none;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: #fff;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
  border-color: rgba(17, 17, 17, 0.3);
}

.btn-small {
  padding: 7px 13px;
  font-size: 12px;
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
}

/* -------------------------------------------------------------------- steps */

.steps {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 12px 14px;
}

.steps h2 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.step-num {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.1);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
  transition: background 0.2s ease, color 0.2s ease;
}

.step-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.step-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease;
}

/* The lesson is the reward for reaching the step, so it stays hidden until then. */
.step-lesson {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.step.is-done .step-num {
  background: var(--line);
  color: #fff;
}

.step.is-done .step-name {
  color: var(--ink);
}

.step.is-done .step-lesson {
  max-height: 220px;
  opacity: 1;
  margin-top: 2px;
}

.step.is-next .step-num {
  background: rgba(226, 112, 58, 0.2);
  color: var(--line);
}

.step.is-next .step-name {
  color: var(--ink);
}

/* Phone: keep the list compact above the board so solve + learn share one screen. */
@media (max-width: 899px) {
  .steps {
    padding: 10px 12px;
  }

  .steps h2 {
    margin-bottom: 6px;
  }

  .steps ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
  }

  .step-name {
    font-size: 12px;
    line-height: 1.25;
  }

  /* Only the latest reached step shows its lesson — keeps height under control. */
  .step.is-done .step-lesson {
    display: none;
  }

  .step.is-done.is-latest .step-lesson {
    display: block;
    grid-column: 1 / -1;
    max-height: 80px;
    margin-top: 2px;
  }

  .step.is-done.is-latest {
    grid-column: 1 / -1;
  }
}

/* Desktop: process list sticks on the right while you draw. */
@media (min-width: 900px) {
  .play {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 18px;
  }

  .play-board {
    order: 1;
  }

  .steps {
    order: 2;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 16px;
  }

  .board-wrap {
    margin: 0;
    max-width: 560px;
  }

  .step-name {
    font-size: 13.5px;
  }

  .step-lesson {
    font-size: 12.5px;
  }
}

/* ------------------------------------------------------------------ overlay */

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(243, 241, 236, 0.92);
  backdrop-filter: blur(3px);
  border-radius: 20px;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow-y: auto;
  z-index: 3;
  animation: fade 0.25s ease;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.win-card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 20px 18px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.12);
  animation: cardIn 0.42s cubic-bezier(0.22, 1.4, 0.4, 1) both;
}

.results-card {
  max-height: min(92vh, 720px);
  overflow-y: auto;
}

.completion {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: rgba(226, 112, 58, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.completion-ring {
  --pct: 70;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(var(--line) calc(var(--pct) * 1%), rgba(17, 17, 17, 0.08) 0);
  font-weight: 800;
  font-size: 15px;
}

.completion-label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.completion-detail,
.completion-best {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink);
}

.completion-best {
  color: var(--muted);
  font-size: 11.5px;
}

.results-steps,
.results-auras {
  text-align: left;
  margin-bottom: 12px;
}

.results-steps h3,
.results-auras h3 {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.results-steps ol,
.results-auras ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.results-steps li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.rs-num {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--line);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.rs-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.rs-body strong {
  font-size: 12.5px;
}

.rs-body span {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}

.results-auras li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.results-auras .art-icon {
  flex: 0 0 auto;
  width: 1.25em;
  text-align: center;
  font-size: 14px;
  line-height: 1;
}

.results-auras .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.results-auras small {
  color: var(--muted);
  font-weight: 500;
}

.artifact-docs-wrap {
  text-align: left;
  margin: 4px 0 14px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(17, 17, 17, 0.02);
}

.artifact-docs-wrap summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  list-style: none;
}

.artifact-docs-wrap summary::-webkit-details-marker {
  display: none;
}

.artifact-docs-wrap[open] summary {
  margin-bottom: 10px;
  color: var(--ink);
}

.artifact-docs {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.results-card.is-revealing .reveal-block {
  animation: revealUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.results-card.is-revealing .reveal-block[data-reveal="0"] { animation-delay: 0.05s; }
.results-card.is-revealing .reveal-block[data-reveal="1"] { animation-delay: 0.18s; }
.results-card.is-revealing .reveal-block[data-reveal="2"] { animation-delay: 0.3s; }
.results-card.is-revealing .reveal-block[data-reveal="3"] { animation-delay: 0.42s; }
.results-card.is-revealing .reveal-block[data-reveal="4"] { animation-delay: 0.54s; }
.results-card.is-revealing .reveal-block[data-reveal="5"] { animation-delay: 0.66s; }

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

.adoc-group h4 {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.adoc-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adoc-group li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11.5px;
  line-height: 1.35;
}

.adoc-group .art-icon {
  flex: 0 0 auto;
  width: 1.4em;
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
}

.adoc-group strong {
  display: block;
  font-size: 12px;
}

.adoc-group li span span {
  color: var(--muted);
}

.adoc-blue h4 { color: #3a8fc4; }
.adoc-grey h4 { color: #6a6a72; }
.adoc-red h4 { color: #d64545; }

.results-auras li.aura-blue .dot { background: #5ab4e6; }
.results-auras li.aura-grey .dot { background: #8a8a93; }
.results-auras li.aura-red .dot { background: #e24a4a; }

.results-auras li em {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.results-auras li.is-got em { color: var(--line); }
.results-auras li.aura-red.is-got em { color: #e24a4a; }
.results-auras li.is-missed { opacity: 0.55; }

.aura-legend {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.aura-legend span {
  font-weight: 700;
}

.lg-blue { color: #3a8fc4; }
.lg-grey { color: #6a6a72; }
.lg-red { color: #d64545; }

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.93);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.win-eyebrow {
  animation: eyebrowIn 0.5s ease 0.12s both;
}

@keyframes eyebrowIn {
  from { opacity: 0; letter-spacing: 0.4em; }
  to { opacity: 1; letter-spacing: 0.18em; }
}

/* "Level 3 unlocked" — the progression payoff, so it gets its own beat. */
.win-unlock {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: unlockIn 0.45s cubic-bezier(0.22, 1.4, 0.4, 1) 0.3s both;
}

@keyframes unlockIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.win-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--line);
  font-weight: 700;
}

.win-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.win-time {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.win-lesson {
  background: rgba(226, 112, 58, 0.08);
  border-radius: 12px;
  padding: 11px 13px;
  text-align: left;
  margin-bottom: 12px;
}

.win-service {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--line);
  margin-bottom: 3px;
}

.win-lesson p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.win-teaser {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* ------------------------------------------------------------------- reward */

.win-reward,
.win-grand {
  border: 1px dashed rgba(226, 112, 58, 0.55);
  border-radius: 12px;
  padding: 13px;
  margin-bottom: 12px;
}

.win-reward-title,
.grand-title {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 700;
}

.win-reward-sub,
.grand-sub {
  margin: 0 0 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

.reward-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reward-choice {
  font-size: 12.5px;
  padding: 10px 12px;
  text-align: center;
}

.reward-choice:hover {
  border-color: var(--line);
  background: rgba(226, 112, 58, 0.06);
}

.grand-eyebrow {
  margin: 0 0 2px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

.grand-title {
  color: var(--line);
  font-size: 17px;
}

.win-form {
  display: flex;
  gap: 6px;
}

.win-form input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: #fff;
}

.win-form input:focus {
  outline: none;
  border-color: var(--line);
}

.win-form-note {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.win-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 9px;
}

.win-code-label {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.win-code strong {
  font-size: 19px;
  letter-spacing: 0.08em;
  color: var(--line);
}

.win-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.win-cta {
  display: block;
  margin: 12px auto 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  width: fit-content;
}

.rules {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.rules b {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .app {
    padding: 14px 12px 28px;
  }

  .level-btn .name {
    display: none;
  }

  .levels-divider {
    padding-left: 6px;
  }
}
