.course-kicker {
  width: fit-content;
}

.course-game {
  display: grid;
  gap: 14px;
}

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

.course-heading {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.course-title {
  color: #142033;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.2;
}

.course-subtitle {
  color: #5f6d7e;
  font-size: 13px;
  line-height: 1.35;
}

.course-goal {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.course-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.course-mode-btn {
  min-width: 0;
  min-height: 50px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #253247;
  cursor: pointer;
  touch-action: manipulation;
  display: grid;
  gap: 2px;
  text-align: left;
}

.course-mode-btn span,
.course-mode-btn strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.course-mode-btn span {
  font-size: 14px;
  font-weight: 850;
}

.course-mode-btn strong {
  color: #667085;
  font-size: 12px;
}

.course-mode-active {
  border-color: #0f766e;
  background: #d7f4ef;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.course-mode-active strong {
  color: #0f766e;
}

.course-prompt {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #263548;
  padding: 11px 12px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}

.course-shell {
  display: grid;
  gap: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.96)),
    repeating-linear-gradient(90deg, rgba(14, 116, 144, 0.05) 0, rgba(14, 116, 144, 0.05) 1px, transparent 1px, transparent 18px);
  overflow: hidden;
}

.course-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.course-stat {
  min-width: 0;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 2px;
}

.course-stat span {
  color: #667085;
  font-size: 12px;
  line-height: 1.2;
}

.course-stat strong {
  color: #142033;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
}

.course-board {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  aspect-ratio: 1;
  min-height: 286px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(219, 234, 254, 0.84) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 50%, rgba(15, 118, 110, 0.1) 0 38%, transparent 39%),
    linear-gradient(145deg, #eef7f5, #f8fafc 48%, #edf2ff);
  overflow: hidden;
}

.course-board::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px dashed rgba(71, 85, 105, 0.25);
  border-radius: 50%;
}

.course-wires,
.course-nodes {
  position: absolute;
  inset: 0;
}

.course-wires {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.course-edge {
  stroke: #64748b;
  stroke-width: 1.55;
  stroke-linecap: round;
  opacity: 0.9;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.85));
}

.course-edge-dropping {
  stroke: #d97706;
  stroke-width: 2.35;
  stroke-dasharray: 5 4;
  animation: course-edge-drop 760ms ease forwards;
}

.course-edge-cycle {
  stroke: #dc2626;
  stroke-width: 2.45;
  animation: course-cycle-pulse 900ms ease-in-out infinite;
}

.course-arrow-head {
  fill: #64748b;
}

.course-arrow-drop {
  fill: #d97706;
}

.course-arrow-cycle {
  fill: #dc2626;
}

.course-node {
  position: absolute;
  z-index: 2;
  width: 62px;
  min-height: 62px;
  transform: translate(-50%, -50%);
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  color: #17202a;
  cursor: pointer;
  touch-action: manipulation;
  display: grid;
  place-items: center;
  padding: 7px 5px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  transition: transform 150ms ease, border-color 160ms ease, background 160ms ease;
}

.course-node:active,
.course-queue-chip:active,
.course-btn:active,
.course-mode-btn:active {
  transform: scale(0.97);
}

.course-node:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.course-node-id {
  display: block;
  color: inherit;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.course-node-degree {
  display: block;
  color: #475467;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.course-node-dots {
  min-height: 5px;
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
}

.course-node-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
}

.course-node-ready {
  border-color: #0f766e;
  background: #d7f4ef;
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.13), 0 12px 24px rgba(15, 118, 110, 0.16);
}

.course-node-ready .course-node-degree {
  color: #0f766e;
}

.course-node-locked {
  background: #fff;
}

.course-node-learned {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
}

.course-node-learned .course-node-degree {
  color: #1d4ed8;
}

.course-node-change {
  border-color: #d97706;
  background: #fff7ed;
  animation: course-node-bump 620ms ease;
}

.course-node-new {
  border-color: #0f766e;
  background: #ccfbf1;
  animation: course-node-unlock 780ms ease;
}

.course-node-wrong {
  border-color: #dc2626;
  background: #fee2e2;
  animation: course-node-wrong 360ms ease;
}

.course-node-cycle {
  border-color: #dc2626;
  background: #fee2e2;
  box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.13), 0 12px 24px rgba(127, 29, 29, 0.16);
}

.course-queue-card,
.course-order-card {
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 9px;
}

.course-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.course-card-head strong {
  color: #0f766e;
  white-space: nowrap;
}

.course-queue,
.course-order {
  min-height: 54px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.course-queue-chip {
  min-width: 58px;
  min-height: 48px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  background: #d7f4ef;
  color: #0f766e;
  cursor: pointer;
  touch-action: manipulation;
  padding: 6px 9px;
  display: grid;
  place-items: center;
  gap: 1px;
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.12);
}

.course-queue-chip span {
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
}

.course-queue-chip strong {
  font-size: 11px;
  line-height: 1;
}

.course-order-step {
  min-width: 48px;
  min-height: 44px;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  padding: 5px 8px;
  animation: course-step-in 240ms ease;
}

.course-order-step small,
.course-order-step strong {
  line-height: 1;
}

.course-order-step small {
  color: #475467;
  font-size: 10px;
  font-weight: 850;
}

.course-order-step strong {
  font-size: 18px;
  font-weight: 950;
}

.course-empty {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #667085;
  font-size: 13px;
  line-height: 1.3;
}

.course-status {
  min-height: 56px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.course-status-good {
  border-color: #0f766e;
  background: #d7f4ef;
  color: #0f4f49;
}

.course-status-warn {
  border-color: #d97706;
  background: #fff7ed;
  color: #854d0e;
}

.course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.course-btn {
  flex: 1 1 140px;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  cursor: pointer;
  touch-action: manipulation;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 850;
}

.course-btn-primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

@keyframes course-edge-drop {
  0% {
    opacity: 1;
    stroke-dashoffset: 0;
  }

  100% {
    opacity: 0;
    stroke-dashoffset: 24;
  }
}

@keyframes course-cycle-pulse {
  0%, 100% {
    opacity: 0.82;
  }

  50% {
    opacity: 1;
  }
}

@keyframes course-node-bump {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }

  45% {
    transform: translate(-50%, -50%) scale(1.09);
  }
}

@keyframes course-node-unlock {
  0% {
    transform: translate(-50%, -50%) scale(0.88);
  }

  60% {
    transform: translate(-50%, -50%) scale(1.1);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes course-node-wrong {
  0%, 100% {
    transform: translate(-50%, -50%) translateX(0);
  }

  25% {
    transform: translate(-50%, -50%) translateX(-6px);
  }

  75% {
    transform: translate(-50%, -50%) translateX(6px);
  }
}

@keyframes course-step-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .course-top {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .course-goal {
    justify-content: flex-start;
  }

  .course-shell {
    padding: 10px;
  }

  .course-stats {
    gap: 6px;
  }

  .course-stat {
    padding: 8px 7px;
  }

  .course-stat strong {
    font-size: 16px;
  }

  .course-board {
    min-height: 292px;
  }

  .course-node {
    width: 58px;
    min-height: 58px;
  }

  .course-node-id {
    font-size: 20px;
  }

  .course-prompt {
    font-size: 14px;
  }
}

@media (max-width: 390px) {
  .course-game {
    gap: 12px;
  }

  .course-mode-tabs {
    gap: 6px;
  }

  .course-mode-btn {
    min-height: 48px;
    padding: 7px 8px;
  }

  .course-mode-btn span {
    font-size: 13px;
  }

  .course-mode-btn strong {
    font-size: 11px;
  }

  .course-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .course-stat span {
    font-size: 11px;
  }

  .course-stat strong {
    font-size: 15px;
  }

  .course-board {
    min-height: 276px;
  }

  .course-node {
    width: 54px;
    min-height: 54px;
    padding: 6px 4px;
  }

  .course-node-id {
    font-size: 19px;
  }

  .course-node-degree {
    font-size: 10px;
  }

  .course-queue-chip {
    min-width: 54px;
  }
}
