/* しんだんラボ — 16タイプ診断・相性チェック */

.type16-home-section {
  margin-top: 34px;
  padding-top: 6px;
}

.type16-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.type16-section-heading .section-title {
  margin-bottom: 8px;
}

.type16-section-heading p {
  max-width: 720px;
  line-height: 1.8;
}

.type16-text-link {
  flex: 0 0 auto;
  font-weight: 700;
  text-decoration: none;
}

.type16-page {
  padding-bottom: 24px;
}

.type16-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(145deg, var(--accent, #6f5cd7), #443a82);
}

.type16-result-overline {
  margin: 20px 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.9;
}

.type16-result-code {
  display: inline-block;
  margin-right: 4px;
  letter-spacing: 0.08em;
}

.type16-intro-card,
.type16-result-summary {
  margin-top: 28px;
}

.type16-intro-card p,
.type16-result-summary p,
.type16-context-card p,
.type16-disclaimer p {
  line-height: 1.85;
}

.type16-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.type16-axis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.type16-axis-card {
  padding: 16px;
  border: 1px solid #e8e2f0;
  border-radius: 14px;
  background: #fcfbfe;
}

.type16-axis-card h3 {
  margin: 2px 0 12px;
  font-size: 1rem;
}

.type16-axis-card p {
  margin: 7px 0;
  line-height: 1.65;
}

.type16-axis-code {
  margin: 0 !important;
  color: #6f5cd7;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.type16-group {
  margin-top: 28px;
}

.type16-group-heading {
  margin-bottom: 14px;
}

.type16-group-heading h2 {
  margin: 2px 0 6px;
}

.type16-group-heading p:last-child {
  margin: 0;
  line-height: 1.75;
}

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

.type16-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 168px;
  padding: 16px;
  border: 1px solid #e6e0ee;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(51, 42, 72, 0.05);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.type16-card:hover,
.type16-card:focus-visible {
  border-color: #8a76d8;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(51, 42, 72, 0.1);
}

.type16-card-code {
  color: #6f5cd7;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.type16-card-emoji {
  font-size: 1.75rem;
}

.type16-card strong {
  font-size: 1rem;
}

.type16-card span:last-child {
  color: #686171;
  font-size: 0.84rem;
  line-height: 1.55;
}

.type16-disclaimer {
  margin-top: 28px;
  padding: 16px 18px;
  border-left: 4px solid #8a76d8;
  border-radius: 4px 14px 14px 4px;
  background: #f7f4ff;
  color: #4e475b;
}

.type16-disclaimer strong {
  display: block;
  margin-bottom: 5px;
}

.type16-disclaimer p {
  margin: 0;
  font-size: 0.9rem;
}

.type16-test-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}

.type16-test-facts li {
  padding: 7px 11px;
  border-radius: 999px;
  background: #f2eefc;
  color: #5b4aa2;
  font-size: 0.82rem;
  font-weight: 700;
}

.type16-axis-hint {
  margin: 14px 0 4px;
  color: #6f5cd7;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.type16-back-btn {
  display: block;
  margin: 16px auto 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #716b79;
  font: inherit;
  cursor: pointer;
}

.type16-back-btn:hover,
.type16-back-btn:focus-visible {
  color: #4c3b9b;
  text-decoration: underline;
}

.type16-score-panel {
  margin: 24px 0;
  padding: 20px;
  border-radius: 16px;
  background: #f8f6fc;
  text-align: left;
}

.type16-score-panel h2 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 1.15rem;
}

.type16-score-panel > p {
  margin: 0 0 18px;
  text-align: center;
  font-size: 0.88rem;
  color: #696371;
}

.type16-score-row + .type16-score-row {
  margin-top: 14px;
}

.type16-score-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.type16-score-labels span:nth-child(2) {
  color: #817b88;
  font-size: 0.72rem;
  font-weight: 800;
}

.type16-score-labels span:last-child {
  text-align: right;
}

.type16-score-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ded8eb;
}

.type16-score-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6f5cd7, #a38eea);
}

.type16-detail-grid,
.type16-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.type16-detail-card,
.type16-context-card {
  padding: 20px;
  border: 1px solid #e7e1ee;
  border-radius: 16px;
  background: #fff;
}

.type16-detail-card h2,
.type16-context-card h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.type16-detail-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.type16-detail-card li {
  line-height: 1.75;
}

.type16-detail-card li + li {
  margin-top: 8px;
}

.type16-detail-card.is-strength {
  border-top: 4px solid #6f9f82;
}

.type16-detail-card.is-caution {
  border-top: 4px solid #d49a63;
}

.type16-context-card p:last-child {
  margin-bottom: 0;
}

.type16-compat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 14px;
}

.type16-compat-form .form-group {
  margin: 0;
}

.type16-compat-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.type16-compat-form select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #d8d1e2;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.type16-form-symbol {
  padding-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 900;
  color: #a494ad;
}

.type16-relation-field {
  grid-column: 1 / -1;
}

.type16-compat-form .quiz-btn {
  grid-column: 1 / -1;
  justify-self: center;
}

.type16-form-help {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.type16-form-error {
  margin-top: 18px;
}

.type16-compat-result {
  margin-top: 20px;
}

.type16-pair-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  margin: 12px auto 18px;
}

.type16-pair-heading > div {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.type16-pair-heading span {
  font-size: 2rem;
}

.type16-pair-heading strong {
  font-size: 1.15rem;
  letter-spacing: 0.1em;
}

.type16-pair-heading small {
  color: #6b6571;
}

.type16-pair-heading b {
  font-size: 1.5rem;
  color: #a18c9b;
}

.type16-compat-score {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  justify-content: center;
  margin-bottom: 16px;
}

.type16-compat-score span {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 900;
  line-height: 0.9;
  color: #c95476;
}

.type16-compat-score small {
  margin-left: 4px;
  color: #77717c;
}

.type16-compat-score strong {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: #6c4250;
}

.type16-comparison-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  text-align: left;
}

.type16-comparison-card {
  padding: 17px;
  border: 1px solid #eadfe4;
  border-radius: 15px;
  background: #fffafb;
}

.type16-comparison-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.type16-comparison-heading span {
  padding: 3px 7px;
  border-radius: 7px;
  background: #f1e7eb;
  color: #8d4560;
  font-size: 0.72rem;
  font-weight: 900;
}

.type16-comparison-heading em {
  margin-left: auto;
  color: #7b7378;
  font-size: 0.76rem;
  font-style: normal;
}

.type16-comparison-card h3 {
  margin: 12px 0 8px;
  font-size: 1rem;
}

.type16-comparison-card p {
  margin: 7px 0;
  line-height: 1.75;
  font-size: 0.92rem;
}

.type16-main-tip {
  margin-top: 18px;
  padding: 18px;
  border-radius: 15px;
  background: #fff0f4;
  text-align: left;
}

.type16-main-tip h2 {
  margin: 2px 0 8px;
  font-size: 1.08rem;
}

.type16-main-tip p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .type16-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .type16-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .type16-axis-grid,
  .type16-detail-grid,
  .type16-context-grid,
  .type16-comparison-list {
    grid-template-columns: 1fr;
  }

  .type16-compat-form {
    grid-template-columns: 1fr;
  }

  .type16-form-symbol {
    padding: 0;
    text-align: center;
  }

  .type16-relation-field,
  .type16-compat-form .quiz-btn {
    grid-column: auto;
  }
}

@media (max-width: 460px) {
  .type16-grid {
    grid-template-columns: 1fr;
  }

  .type16-card {
    min-height: 0;
  }

  .type16-pair-heading {
    gap: 8px;
  }

  .type16-pair-heading small {
    font-size: 0.72rem;
  }

  .type16-score-panel,
  .type16-detail-card,
  .type16-context-card,
  .type16-comparison-card {
    padding: 15px;
  }
}


/* Data-driven homepage priority */
.home-priority-section {
  margin-top: 0;
  padding-top: 30px;
}

.home-priority-heading {
  align-items: flex-start;
}

.home-priority-method {
  margin-top: 7px;
  color: #706979;
  font-size: 0.86rem;
}

.home-priority-card {
  position: relative;
  padding-top: 54px;
  border-width: 2px;
  box-shadow: 0 12px 32px rgba(51, 42, 72, 0.09);
}

.home-priority-card:hover,
.home-priority-card:focus-visible {
  box-shadow: 0 16px 36px rgba(51, 42, 72, 0.14);
}

.home-priority-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #6f5cd7) 12%, white);
  color: var(--accent, #6f5cd7);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .home-priority-section {
    padding-top: 22px;
  }

  .home-priority-card {
    padding-top: 50px;
  }
}
