.kth-game {
  display: grid;
  gap: 12px;
}

.kth-question {
  color: #17202a;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.kth-board {
  display: grid;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.08), transparent 30%),
    linear-gradient(#ffffff, #f7f9fc);
}

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

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

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

.kth-stat strong {
  min-width: 0;
  color: #17202a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.kth-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 7px;
  min-width: 0;
}

.kth-tile {
  min-width: 0;
  min-height: 54px;
  border: 1px solid #98a2b3;
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  display: grid;
  place-items: center;
  padding: 5px 3px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.kth-tile:active,
.kth-zone:active,
.kth-btn:active {
  transform: scale(0.98);
}

.kth-tile strong {
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.kth-tile span {
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.kth-tile-pivot {
  border-color: #d97706;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

.kth-tile-current {
  border-color: #2563eb;
  background: #dbeafe;
  transform: translateY(-3px);
}

.kth-tile-locked {
  cursor: default;
}

.kth-tile-wrong {
  border-color: #b42318;
  background: #fff1f0;
  animation: kth-shake 360ms ease;
}

.kth-current {
  min-height: 62px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: auto minmax(54px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  color: #344054;
}

.kth-current-label {
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.kth-current strong {
  min-width: 48px;
  min-height: 44px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0 8px;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.kth-current span:last-child {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

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

.kth-zone {
  min-width: 0;
  min-height: 116px;
  border: 2px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.kth-zone:disabled {
  cursor: default;
}

.kth-zone-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.kth-zone-head strong {
  min-height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.kth-zone-head span {
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.kth-zone-count {
  width: 28px;
  min-height: 24px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 950;
}

.kth-zone-stack {
  min-width: 0;
  min-height: 34px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-content: flex-end;
  align-items: flex-end;
}

.kth-chip {
  min-width: 30px;
  min-height: 30px;
  border-radius: 8px;
  background: #17202a;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.kth-empty {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 800;
}

.kth-zone-greater {
  border-color: #93c5fd;
  background: #eff6ff;
}

.kth-zone-greater .kth-zone-head strong {
  background: #2563eb;
}

.kth-zone-equal {
  border-color: #fbbf24;
  background: #fffbeb;
}

.kth-zone-equal .kth-zone-head strong {
  background: #d97706;
}

.kth-zone-less {
  border-color: #fca5a5;
  background: #fff5f5;
}

.kth-zone-less .kth-zone-head strong {
  background: #dc2626;
}

.kth-zone-keep {
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.kth-zone-wrong {
  border-color: #b42318;
  background: #fff1f0;
  animation: kth-shake 360ms ease;
}

.kth-status {
  min-height: 52px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  padding: 10px 11px;
  color: #344054;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.kth-status-good {
  border-color: #0f766e;
  background: #d7f4ef;
  color: #0f514b;
}

.kth-status-warn {
  border-color: #b45309;
  background: #fff7ed;
  color: #8a3b07;
}

.kth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.kth-btn {
  min-height: 46px;
  border: 1px solid #98a2b3;
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

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

.kth-tile:focus-visible,
.kth-zone:focus-visible,
.kth-btn:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

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

@media (max-width: 430px) {
  .kth-board {
    padding: 10px;
  }

  .kth-stats {
    gap: 6px;
  }

  .kth-stat {
    padding: 7px 6px;
  }

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

  .kth-current {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
  }

  .kth-current-label {
    grid-column: 1 / -1;
  }

  .kth-current strong {
    min-width: 52px;
    font-size: 22px;
  }

  .kth-zones {
    gap: 6px;
  }

  .kth-zone {
    min-height: 108px;
    padding: 7px 5px;
  }

  .kth-zone-head {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 5px;
  }

  .kth-zone-head strong {
    min-height: 30px;
    font-size: 21px;
  }

  .kth-zone-head span {
    font-size: 12px;
  }

  .kth-chip {
    min-width: 28px;
    min-height: 28px;
    font-size: 13px;
  }
}
