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

.jg-brief {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.jg-brief-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 38%, #ffffff 38% 47%, transparent 47%),
    radial-gradient(circle at 70% 50%, #f59e0b 0 7px, transparent 8px),
    #0f766e;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.26);
}

.jg-brief-title {
  color: #17202a;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.25;
}

.jg-brief-text {
  margin-top: 3px;
  color: #475467;
  font-size: 14px;
  line-height: 1.45;
}

.jg-summary {
  display: grid;
  gap: 10px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.jg-summary-main {
  color: #344054;
  font-weight: 750;
  line-height: 1.45;
}

.jg-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jg-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 800;
}

.jg-pill-good {
  border-color: #147d4f;
  background: #e7f6ef;
  color: #0b5f3d;
}

.jg-pill-bad {
  border-color: #b42318;
  background: #fff1f0;
  color: #912018;
}

.jg-boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.jg-board {
  min-width: 0;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 12px;
  box-shadow: 0 8px 22px rgba(20, 31, 50, 0.06);
}

.jg-board-success {
  border-color: #147d4f;
}

.jg-board-fail {
  border-color: #b42318;
}

.jg-board-head {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.jg-board-title {
  color: #17202a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.jg-board-sub {
  margin-top: 3px;
  color: #667085;
  font-size: 13px;
  line-height: 1.3;
}

.jg-board-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: #eef2f6;
  color: #344054;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.jg-board-success .jg-board-badge {
  background: #e7f6ef;
  color: #0b5f3d;
}

.jg-board-fail .jg-board-badge {
  background: #fff1f0;
  color: #912018;
}

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

.jg-stat {
  min-width: 0;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 9px;
  display: grid;
  gap: 2px;
}

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

.jg-stat strong {
  color: #17202a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.jg-track {
  position: relative;
  display: grid;
  gap: 8px;
  padding-top: 24px;
}

.jg-shield {
  position: absolute;
  left: 0;
  top: 6px;
  width: var(--jg-reach);
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.18), rgba(20, 125, 79, 0.42));
  border: 1px solid rgba(15, 118, 110, 0.28);
  transition: width 260ms ease;
}

.jg-shield::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f766e;
  transform: translateY(-50%);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.22);
}

.jg-runway {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--jg-count), minmax(0, 1fr));
  gap: 7px;
}

.jg-cell {
  min-width: 0;
  min-height: 72px;
  border: 2px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #17202a;
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  padding: 7px 4px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: transform 140ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.jg-cell:active {
  transform: scale(0.96);
}

.jg-index {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.jg-cell strong {
  color: #17202a;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.jg-cell-foot {
  min-height: 15px;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.jg-cell-shielded {
  background: #effcf8;
  border-color: #99d5c8;
}

.jg-cell-scanned {
  background: #e7f6ef;
  border-color: #147d4f;
}

.jg-cell-current {
  background: #dbeafe;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  transform: translateY(-4px);
}

.jg-cell-goal {
  border-color: #d97706;
}

.jg-cell-breach {
  background: #fff1f0;
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.jg-cell-wrong {
  background: #fff7ed;
  border-color: #b45309;
  animation: jg-shake 360ms ease;
}

.jg-formula {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px dashed #a7b0be;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 9px 10px;
}

.jg-formula span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.jg-formula strong {
  min-width: 0;
  color: #17202a;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: right;
}

.jg-message {
  min-height: 52px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  background: #fbfcfe;
  color: #344054;
  padding: 10px 11px;
  line-height: 1.45;
  font-weight: 650;
}

.jg-message-success {
  border-color: #147d4f;
  background: #e7f6ef;
  color: #0b5f3d;
}

.jg-message-fail {
  border-color: #b42318;
  background: #fff1f0;
  color: #912018;
}

.jg-result {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
  padding: 10px;
}

.jg-result-success {
  background: #e7f6ef;
  border: 1px solid #147d4f;
}

.jg-result-fail {
  background: #fff1f0;
  border: 1px solid #b42318;
}

.jg-result-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
}

.jg-result-success .jg-result-mark {
  background: #147d4f;
}

.jg-result-fail .jg-result-mark {
  background: #b42318;
}

.jg-result-title {
  color: #17202a;
  font-weight: 900;
  line-height: 1.25;
}

.jg-result-body {
  margin-top: 2px;
  color: #344054;
  font-size: 13px;
  line-height: 1.4;
}

.jg-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.jg-btn {
  min-height: 44px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #17202a;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.jg-btn:active {
  transform: scale(0.97);
}

.jg-btn-primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

@keyframes jg-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 760px) {
  .jg-boards {
    grid-template-columns: 1fr;
  }

  .jg-board {
    padding: 10px;
  }

  .jg-cell {
    min-height: 64px;
  }
}

@media (max-width: 420px) {
  .jg-brief {
    grid-template-columns: 1fr;
  }

  .jg-brief-icon {
    width: 44px;
    height: 44px;
  }

  .jg-stats {
    gap: 6px;
  }

  .jg-stat {
    padding: 8px 6px;
  }

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

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

  .jg-runway {
    gap: 5px;
  }

  .jg-cell {
    min-height: 58px;
    padding: 6px 2px;
  }

  .jg-cell strong {
    font-size: 21px;
  }

  .jg-index,
  .jg-cell-foot {
    font-size: 10px;
  }

  .jg-actions {
    justify-content: stretch;
  }

  .jg-btn {
    flex: 1 1 120px;
  }
}
