.teach-map {
  display: block;
  margin: 24px 0 34px;
  padding: 20px;
  border: 1px solid #c9ddd6;
  border-radius: 14px;
  background: #f0f6f3;
  color: #1c3e3b;
}
.teach-map .teach-map-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 7px;
}
.teach-map .teach-map-help {
  font-size: 0.78rem;
  line-height: 1.7;
  color: #536c67;
  margin: 0 0 16px;
}
.teach-map ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.teach-map li {
  margin: 0;
  min-width: 0;
}
.teach-map a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 12px;
  border: 1px solid #d7e3de;
  border-radius: 9px;
  background: #fff;
  color: #203b3b;
  font-size: 0.82rem;
  line-height: 1.6;
  text-decoration: none;
}
.teach-map a:hover {
  border-color: #157a6e;
  background: #f9fdfa;
}
.teach-map-icon {
  display: flex;
  flex: 0 0 30px;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #16786e;
  font-size: 0.65rem;
  font-weight: 700;
}
.teach-map a:focus-visible,
.teach-figure-source:focus-visible {
  outline: 3px solid #157a6e;
  outline-offset: 3px;
}
.teach-figure {
  margin: 26px 0;
  padding: 22px;
  border: 1px solid #c9dcd6;
  border-radius: 14px;
  background: #f4f8f5;
  font-size: 1em;
  color: #203c3b;
  overflow-wrap: anywhere;
}
.teach-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1.65;
  margin-bottom: 18px;
}
.teach-figure-tag {
  color: #146d61;
  background: #dfede4;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 5px;
}
.teach-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 14px;
  align-items: start;
}
.teach-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d1ded8;
  border-radius: 10px;
  background: white;
  position: relative;
}
.teach-panel-label {
  margin: 0 0 12px !important;
  font-size: 0.84em;
  line-height: 1.6;
  font-weight: 700;
}
.teach-panel-step {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #1d6e63;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}
.teach-cells {
  display: grid;
  gap: 5px;
}
.teach-cell {
  min-width: 0;
  min-height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1.5px solid #abbeb8;
  border-radius: 5px;
  padding: 4px 1px;
  font-size: 0.76em;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
  color: #203c3b;
  background: #fff;
}
.teach-shape-card {
  box-shadow: 0 3px 0 #d9e2df;
  min-height: 48px;
}
.teach-shape-tile {
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 3px;
}
.teach-shape-token {
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 50%;
  box-shadow: 0 3px 0 #cbd5d1;
}
.teach-shape-die {
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 9px;
  box-shadow: 2px 3px 0 #cbd5d1;
}
.teach-shape-pawn {
  border-radius: 45% 45% 6px 6px;
  min-height: 48px;
}
.teach-tone-blue {
  background: #dbe9fa;
  border-color: #5b7ca7;
  color: #23466e;
}
.teach-tone-red {
  background: #f8e0dc;
  border-color: #b7766c;
  color: #782d2a;
}
.teach-tone-yellow {
  background: #fcf0b9;
  border-color: #bca356;
  color: #605013;
}
.teach-tone-green {
  background: #dbefdc;
  border-color: #63956d;
  color: #255e33;
}
.teach-tone-orange {
  background: #fce4c7;
  border-color: #c48e52;
  color: #794a15;
}
.teach-tone-purple {
  background: #ece1f5;
  border-color: #9d80b2;
  color: #614274;
}
.teach-tone-empty {
  background: transparent;
  border-style: dashed;
  color: #a3b5ae;
}
.teach-cell-crossed {
  opacity: 0.6;
  background: repeating-linear-gradient(135deg, #eef0ef, #eef0ef 5px, #e3e7e4 5px, #e3e7e4 7px);
}
.teach-panel-detail {
  margin: 12px 0 0 !important;
  font-size: 0.76em;
  line-height: 1.7;
  color: #4a655e;
}
.teach-figure-caption {
  margin: 18px 0 0 !important;
  font-size: 0.8em;
  line-height: 1.9;
}
.teach-figure-source {
  display: inline-block;
  margin-top: 12px;
  color: #266e61;
  font-size: 0.68rem;
  line-height: 1.6;
  text-underline-offset: 3px;
}
.teach-choice-label {
  font-size: 0.78em;
  margin: -6px 0 14px !important;
  font-weight: 600;
}
.teach-figure-board .teach-panels {
  grid-template-columns: minmax(0, 1fr);
  max-width: 400px;
  margin: auto;
}
.teach-figure-compare .teach-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.teach-figure-wide .teach-panels {
  grid-template-columns: minmax(0, 1fr);
}
.teach-figure-sequence .teach-panel:not(:last-child)::after {
  content: '↓';
  display: block;
  color: #357b6d;
  font-size: 20px;
  text-align: center;
  line-height: 1;
  margin-top: 12px;
}
.teach-figure-sequence .teach-panels {
  grid-template-columns: minmax(0, 1fr);
}
.teach-figure-sequence .teach-panel {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 0 10px;
}
.teach-figure-sequence .teach-panel-step {
  grid-row: 1 / 3;
}
.teach-figure-sequence .teach-panel-label {
  grid-column: 2;
}
.teach-figure-sequence .teach-cells,
.teach-figure-sequence .teach-panel-detail,
.teach-figure-sequence .teach-panel::after {
  grid-column: 2;
}
@media (max-width: 480px) {
  .teach-map {
    padding: 16px;
  }
  .teach-map ol {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .teach-map a {
    padding: 10px;
  }
  .teach-figure {
    padding: 14px;
  }
  .teach-panel {
    padding: 10px;
  }
  .teach-figure-compare .teach-panels {
    gap: 8px;
  }
  .teach-cells {
    gap: 3px;
  }
}
@media print {
  .teach-map,
  .teach-figure {
    break-inside: avoid;
    background: white;
  }
  .teach-figure {
    padding: 14px;
    border-color: #899991;
  }
  .teach-cell {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .teach-figure-source {
    color: #203c3b;
  }
}
