/* チートシート */

.band--cheat {
  background-color: #f4f6f9;
  background-image: radial-gradient(circle, rgba(13, 20, 32, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  padding-top: clamp(20px, 3vw, 32px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.cheat-intro {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid #111;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.7;
  color: #333;
}

.cheat-intro strong {
  font-weight: 900;
  color: #111;
}

.band--cheat .chapter-tabs {
  flex-wrap: wrap;
}

@media (max-width: 780px) {
  .band--cheat .chapter-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 4px 4px 12px;
    margin-bottom: 20px;
    scrollbar-width: thin;
  }

  .band--cheat .chapter-tab {
    flex: 0 0 auto;
    transform: none;
    box-shadow: 3px 3px 0 #111;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.78rem;
  }

  .band--cheat .chapter-tab > span {
    transform: none;
  }

  .band--cheat .chapter-tab:hover,
  .band--cheat .chapter-tab:focus-visible {
    transform: translate(-1px, -1px);
  }
}

.cheat-panel {
  display: none;
}

.cheat-panel.active {
  display: block;
}

.cheat-panel__lead {
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #5a6270;
  line-height: 1.6;
}

.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.cheat-card {
  background: #fff;
  border: 2px solid #111;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
}

.cheat-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.cheat-card__tag {
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid #111;
  background: #fff;
  color: #111;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.cheat-card__link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 900;
  color: #00a2ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cheat-card__link:hover {
  color: #ff2d6e;
}

.cheat-card__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 900;
  font-style: italic;
  color: #111;
}

.cheat-card__desc {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #5a6270;
  line-height: 1.55;
}

.cheat-card pre {
  margin: 0;
  margin-top: auto;
  padding: 12px;
  background: #282c34;
  border: 2px solid #111;
  overflow-x: auto;
}

.cheat-card pre code,
.cheat-card pre code.hljs {
  display: block;
  padding: 0 !important;
  background: transparent !important;
  font-family: "Cascadia Code", "Fira Code", Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #abb2bf;
}

.cheat-note {
  margin: 24px 0 0;
  padding: 14px 16px;
  border: 2px solid #111;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.7;
}

.cheat-note a {
  color: #00a2ff;
  font-weight: 900;
}

@media (max-width: 640px) {
  .cheat-grid {
    grid-template-columns: 1fr;
  }
}
