/* ============================================
   Legacy Content Compatibility
   Low-risk visual fallback for old Hannya Builder content
   ============================================ */

.hp-legacy-box {
  margin: 1.8rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(0, 39, 69, 0.12);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(8, 28, 48, 0.05);
}

.hp-legacy-box__title {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #002745;
}

.hp-legacy-box__body > :first-child {
  margin-top: 0;
}

.hp-legacy-box__body > :last-child {
  margin-bottom: 0;
}

.hp-legacy-box--point,
.hp-legacy-box--check,
.hp-legacy-box--checklist {
  border-left: 4px solid #2d8c46;
  background: #f8fcf8;
}

.hp-legacy-box--tokushuu,
.hp-legacy-box--hero_box,
.hp-legacy-box--herobox,
.hp-legacy-box--box_h {
  border-left: 4px solid #e97929;
  background: #fffaf5;
}

.hp-legacy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.3rem;
  border-radius: 999px;
  border: 1px solid #2d8c46;
  color: #2d8c46;
  background: #ffffff;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hp-legacy-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(8, 28, 48, 0.1);
}

.hp-legacy-button--official {
  border-color: #002745;
  color: #002745;
}

.hp-legacy-button--solid {
  border-color: #e97929;
  background: linear-gradient(135deg, #d8742f 0%, #ef9a4d 100%);
  color: #ffffff;
}

.hp-legacy-label {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #eef8f8;
  color: #2d8c46;
  font-size: 0.85rem;
  font-weight: 700;
}

.hp-legacy-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid rgba(0, 39, 69, 0.2);
  background: #f7f9fb;
  color: #475467;
}

.hp-legacy-accordion {
  margin: 1rem 0;
  border: 1px solid rgba(0, 39, 69, 0.12);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.hp-legacy-accordion__summary {
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
  color: #002745;
  list-style: none;
}

.hp-legacy-accordion__summary::-webkit-details-marker {
  display: none;
}

.hp-legacy-accordion__body {
  padding: 0 1.1rem 1.05rem;
}

.hp-legacy-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  color: #2d8c46;
  font-weight: 700;
}

.hp-legacy-toc {
  margin: 1.8rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(45, 140, 70, 0.14);
  border-radius: 16px;
  background: #f8fcf8;
}

.hp-legacy-toc__title {
  margin: 0 0 0.75rem;
  color: #002745;
  font-weight: 700;
}

.hp-legacy-toc__list {
  margin: 0;
  padding-left: 1.2rem;
}

.hp-legacy-toc__list li + li {
  margin-top: 0.45rem;
}

.hp-legacy-author {
  margin: 1.5rem 0;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: #eef8f8;
  color: #002745;
  font-weight: 600;
}

.hp-legacy-footnote {
  color: #475467;
  font-size: 0.8em;
}

.hp-legacy-device--sp {
  display: none;
}

@media (max-width: 767px) {
  .hp-legacy-device--pc {
    display: none;
  }

  .hp-legacy-device--sp {
    display: inline;
  }
}
