.kmap-page {
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 18px 56px;
  color: #1b2433;
}

.kmap-hero {
  background: linear-gradient(135deg, #f0f7ff 0%, #fff7ed 100%);
  border: 1px solid #d7e2f1;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(27, 36, 51, 0.08);
}

.kmap-kicker {
  margin: 0 0 10px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0f5e8c;
}

.kmap-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.kmap-intro {
  max-width: 860px;
  margin-top: 16px;
  line-height: 1.7;
  font-size: 1.05rem;
}

.kmap-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.kmap-chip-list span {
  padding: 9px 14px;
  border-radius: 999px;
  background: #1b2433;
  color: #fff;
  font-weight: 700;
}

.kmap-section-links,
.kmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.kmap-link-card,
.kmap-figure-copy,
.kmap-figure,
.kmap-card,
.kmap-content {
  background: #fff;
  border: 1px solid #dde5ee;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 14px 34px rgba(27, 36, 51, 0.06);
}

.kmap-link-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kmap-link-card:hover {
  transform: translateY(-2px);
  border-color: #0f5e8c;
  box-shadow: 0 18px 38px rgba(27, 36, 51, 0.1);
}

.kmap-link-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f5e8c 0%, #2f84b5 100%);
  color: #fff;
  font-size: 1.25rem;
}

.kmap-link-card h2,
.kmap-card h2,
.kmap-content h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.kmap-figure-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: center;
  margin-top: 28px;
}

.kmap-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.kmap-figure figcaption {
  margin-top: 12px;
  color: #536074;
}

.kmap-card p,
.kmap-content p {
  line-height: 1.7;
}

.kmap-card label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 700;
}

.kmap-card input,
.kmap-card select {
  width: 100%;
  border: 1px solid #bfd0df;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f7fbff;
}

.kmap-board-wrap {
  position: relative;
  margin-top: 18px;
  padding-top: 36px;
  padding-left: 44px;
}

.kmap-axis {
  position: absolute;
  font-weight: 700;
  color: #35506b;
}

.kmap-axis.top {
  top: 0;
  left: 44px;
}

.kmap-axis.side {
  top: 56px;
  left: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.kmap-board {
  display: grid;
  gap: 8px;
}

.kmap-board-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kmap-board-3,
.kmap-board-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kmap-cell {
  min-height: 60px;
  border-radius: 16px;
  border: 1px solid #c7d6e4;
  background: #f7fbff;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kmap-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 94, 140, 0.12);
}

.kmap-cell.state-1 {
  background: #dff7ea;
  border-color: #89d5a7;
  color: #116136;
}

.kmap-cell.state-x {
  background: #fff1de;
  border-color: #f0c18d;
  color: #9b5d15;
}

.kmap-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.kmap-actions button {
  flex: 1 1 auto;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: #0f5e8c;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.kmap-actions button.secondary {
  background: #e6eef6;
  color: #294764;
}

.kmap-result {
  margin-top: 16px;
  min-height: 72px;
  border-radius: 16px;
  border: 1px solid #d7e3eb;
  background: #f3f7fd;
  padding: 16px;
}

.kmap-result strong {
  display: block;
  margin-bottom: 8px;
  color: #0f5e8c;
}

.kmap-result svg {
  width: 100%;
  height: auto;
  margin-top: 14px;
  border: 1px solid #d9e4ef;
  border-radius: 14px;
  background: #fff;
}

.kmap-content {
  margin-top: 24px;
}

.kmap-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.kmap-archive-grid a {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eef6fb;
  border: 1px solid #c8dced;
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: #0f5e8c;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.kmap-archive-grid a i {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  color: #0f5e8c;
}

.kmap-archive-grid a:hover {
  transform: translateY(-3px);
  background: #0f5e8c;
  border-color: #0f5e8c;
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 94, 140, 0.22);
}

.kmap-archive-grid a:hover i {
  color: #0f5e8c;
}

@media (max-width: 920px) {
  .kmap-section-links,
  .kmap-grid,
  .kmap-figure-section,
  .kmap-archive-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .kmap-page {
    padding: 20px 14px 44px;
  }

  .kmap-hero,
  .kmap-link-card,
  .kmap-figure-copy,
  .kmap-figure,
  .kmap-card,
  .kmap-content {
    padding: 18px;
    border-radius: 18px;
  }

  .kmap-actions {
    flex-direction: column;
  }

  .kmap-board-wrap {
    padding-left: 0;
  }

  .kmap-axis.side {
    display: none;
  }

  .kmap-axis.top {
    left: 0;
    position: static;
    margin-bottom: 10px;
  }
}
