/* ---------- Adoption detail page ---------- */
.detail-page { background: #fff; }
.detail-page .header { position: relative; color: var(--dark); border-bottom: 1px solid #ebe9f0; }
.detail-page .header__cta { border-color: var(--primary); background: var(--primary); color: #fff; }
.detail-page .header__cta:hover { background: #54458f; color: #fff; }
.detail-page .gnb a:hover { color: var(--primary); opacity: 1; }

.detail-main { padding-bottom: 120px; }
.detail-wrap { width: calc(100% - 88px); max-width: 1352px; margin: 0 auto; }
.detail-breadcrumb { padding: 36px 0 31px; color: #74727a; font-size: 15px; line-height: 24px; }
.detail-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.detail-breadcrumb a { color: var(--dark); }
.detail-breadcrumb a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.detail-profile { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 64px; align-items: stretch; }
.detail-media { width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 24px; background: #e8e5ed; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-media__empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--gray); font-size: 16px; }

.detail-summary { height: 600px; min-width: 0; display: flex; flex-direction: column; }
.detail-summary__top { flex: 0 0 auto; }
.detail-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 3px 12px; border-radius: 999px; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; line-height: 20px; }
.detail-titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 12px; }
.detail-titlegroup { min-width: 0; display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; }
.detail-titlegroup h1 { min-width: 0; color: var(--dark); font-size: clamp(32px, 3vw, 46px); font-weight: 700; line-height: 1.22; letter-spacing: -1.3px; overflow-wrap: anywhere; }
.detail-titlegroup span { flex: 0 0 auto; color: var(--gray); font-size: 17px; font-weight: 500; line-height: 26px; letter-spacing: -.3px; }
.detail-neighbors { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding-bottom: 4px; font-size: 14px; line-height: 22px; white-space: nowrap; }
.detail-neighbors a { color: var(--dark); transition: color .2s; }
.detail-neighbors a:hover { color: var(--primary); }
.detail-neighbors > span { color: #b7b4bc; cursor: default; }

.detail-health { flex: 1 1 auto; min-height: 230px; margin-top: 20px; }
.health-table { width: 100%; height: 100%; table-layout: fixed; border: 1px solid #dedbe6; border-radius: 16px; border-spacing: 0; border-collapse: separate; overflow: hidden; color: var(--dark); }
.health-table tr { height: 16.666%; }
.health-table th, .health-table td { padding: 8px 20px; border-bottom: 1px solid #e5e2ea; font-size: 15px; line-height: 22px; text-align: left; vertical-align: middle; }
.health-table tr:last-child td { border-bottom: 0; }
.health-table th { width: 134px; background: var(--light); border-right: 1px solid #e2dfe8; color: #5d5965; font-weight: 700; }
.health-table td { background: #fff; font-weight: 500; }
.health-table th[rowspan] { border-bottom: 0; }

.detail-terms { flex: 0 0 auto; display: grid; gap: 3px; margin-top: 14px; color: #88848e; font-size: 12px; line-height: 18px; letter-spacing: -.18px; }
.detail-terms li { display: flex; min-width: 0; gap: 8px; }
.detail-terms b { flex: 0 0 auto; color: #66616d; font-weight: 500; }
.detail-terms span { min-width: 0; }
.detail-consult { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 56px; margin-top: 14px; border-radius: 0; background: var(--primary); color: #fff; font-size: 16px; font-weight: 700; line-height: 24px; transition: background .2s, filter .2s; }
.detail-consult:hover { background: #54458f; }
.detail-consult:focus-visible, .inquiry-form :focus-visible { outline: 3px solid rgba(101, 84, 166, .35); outline-offset: 3px; }

.detail-inquiry { margin-top: 120px; padding: 92px 24px 96px; background: var(--light); scroll-margin-top: 24px; }
.detail-inquiry__inner { width: 100%; max-width: 1040px; margin: 0 auto; }
.detail-inquiry__heading { text-align: center; }
.detail-inquiry__heading .label { margin: 0; }
.detail-inquiry__heading .sec-title { margin-top: var(--section-label-gap, 16px); }
.detail-inquiry__heading .sec-sub { margin-top: var(--section-sub-gap, 12px); }
.inquiry-form { margin-top: var(--section-content-gap, 64px); }
.inquiry-success { margin: 0 0 24px; padding: 15px 20px; border: 1px solid #cfc8e7; background: #fff; color: var(--primary); font-size: 15px; font-weight: 700; line-height: 24px; text-align: center; }
.inquiry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; }
.inquiry-field { min-width: 0; }
.inquiry-field--full { grid-column: 1 / -1; }
.inquiry-field > label { display: flex; align-items: center; gap: 5px; margin-bottom: 9px; color: var(--dark); font-size: 15px; font-weight: 700; line-height: 22px; }
.inquiry-field em { color: var(--red); font-size: 12px; font-style: normal; font-weight: 700; }
.inquiry-field input, .inquiry-field select, .inquiry-field textarea { width: 100%; border: 1px solid #d8d4df; border-radius: 8px; background: #fff; color: var(--dark); font: inherit; font-size: 16px; line-height: 24px; }
.inquiry-field input, .inquiry-field select { height: 58px; padding: 0 16px; }
.inquiry-field select { appearance: auto; }
.inquiry-field textarea { min-height: 132px; padding: 16px; resize: vertical; }
.inquiry-field input::placeholder, .inquiry-field textarea::placeholder { color: #9b98a1; opacity: 1; }
.inquiry-field.has-error input, .inquiry-field.has-error select, .inquiry-field.has-error textarea { border-color: var(--red); }
.inquiry-hint { margin-top: 7px; color: #89858e; font-size: 12px; line-height: 18px; }
.inquiry-error { margin-top: 7px; color: var(--red); font-size: 12px; font-weight: 500; line-height: 18px; }
.inquiry-error[hidden] { display: none; }
.website-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.inquiry-consent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 28px; }
.inquiry-consent > label { display: inline-flex; align-items: center; gap: 9px; color: var(--dark); font-size: 14px; font-weight: 500; line-height: 22px; cursor: pointer; }
.inquiry-consent input { width: 18px; height: 18px; accent-color: var(--primary); }
.inquiry-consent details { color: #706b78; font-size: 13px; line-height: 20px; }
.inquiry-consent summary { color: var(--primary); cursor: pointer; font-weight: 700; }
.inquiry-consent details p:first-of-type { margin-top: 9px; }
.inquiry-consent details p { margin-top: 2px; }
.inquiry-consent .inquiry-error { flex-basis: 100%; margin-top: -1px; }
.inquiry-submit { display: flex; justify-content: center; margin-top: 34px; }
.inquiry-submit .btn { width: 218px; border-radius: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
  .detail-profile { gap: 40px; }
  .detail-neighbors { gap: 9px; font-size: 13px; }
  .health-table th { width: 114px; }
}

@media (max-width: 1080px) {
  .detail-profile { grid-template-columns: minmax(0, 600px); justify-content: center; }
  .detail-summary { height: auto; min-height: 520px; }
  .detail-health { height: 280px; flex: 0 0 280px; }
}

@media (max-width: 720px) {
  .detail-page .header .nav-toggle span, .detail-page .header .nav-toggle::before, .detail-page .header .nav-toggle::after { background: var(--dark); }
  .detail-page .gnb { color: #fff; }
  .detail-wrap { width: calc(100% - 32px); }
  .detail-main { padding-bottom: 80px; }
  .detail-breadcrumb { padding: 23px 0 24px; font-size: 13px; line-height: 20px; }
  .detail-breadcrumb ol { gap: 0 7px; }
  .detail-profile { display: block; }
  .detail-media { border-radius: 18px; }
  .detail-summary { min-height: 0; margin-top: 28px; }
  .detail-titlebar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .detail-titlegroup { gap: 3px 9px; }
  .detail-titlegroup h1 { font-size: 32px; letter-spacing: -.9px; }
  .detail-titlegroup span { font-size: 15px; line-height: 24px; }
  .detail-neighbors { align-self: flex-end; padding-bottom: 0; }
  .detail-health { height: 276px; min-height: 0; margin-top: 18px; }
  .health-table th { width: 104px; }
  .health-table th, .health-table td { padding: 7px 14px; font-size: 14px; line-height: 20px; }
  .detail-terms { margin-top: 12px; }
  .detail-consult { margin-top: 16px; }
  .detail-inquiry { margin-top: 80px; padding: 64px 16px 72px; }
  .detail-inquiry__heading .sec-title { margin-top: var(--section-label-gap, 16px); }
  .detail-inquiry__heading .sec-sub { margin-top: var(--section-sub-gap, 12px); }
  .inquiry-form { margin-top: var(--section-content-gap, 40px); }
  .inquiry-grid { grid-template-columns: 1fr; row-gap: 20px; }
  .inquiry-field--full { grid-column: auto; }
  .inquiry-field input, .inquiry-field select { height: 56px; }
  .inquiry-consent { align-items: flex-start; margin-top: 24px; }
  .inquiry-consent > label { align-items: flex-start; }
  .inquiry-consent input { flex: 0 0 auto; margin-top: 2px; }
  .inquiry-consent details { flex-basis: 100%; padding-left: 27px; }
  .inquiry-submit { margin-top: 30px; }
  .inquiry-submit .btn { width: 100%; max-width: 280px; }
}

@media (max-width: 359px) {
  .detail-neighbors { align-self: flex-start; flex-wrap: wrap; }
  .detail-titlegroup h1 { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-neighbors a, .detail-consult { transition: none; }
}

/* Match the supplied rounded inquiry card, without changing existing pages. */
.detail-inquiry { width: calc(100% - 88px); max-width: 1352px; margin-left: auto; margin-right: auto; border-radius: 24px; }
.detail-inquiry__inner { max-width: 1256px; }
.detail-inquiry__heading .sec-title { font-size: 32px; line-height: 44px; }
.detail-inquiry__heading .sec-sub { font-size: 18px; line-height: 28px; }
.detail-neighbors { gap: 12px; font-size: 12px; }
.detail-neighbors a, .detail-neighbors > span { padding: 3px 12px; border: 1px solid #dedbe6; border-radius: 16px; background: var(--light); line-height: 20px; }
@media (max-width: 720px) {
  .detail-inquiry { width: calc(100% - 32px); border-radius: 18px; }
  .detail-inquiry__heading .sec-title { line-height: 40px; }
  .detail-inquiry__heading .sec-sub { font-size: 16px; line-height: 26px; word-break: keep-all; text-wrap: balance; }
}

.detail-breadcrumb ol { list-style: none; }

/* Nested kind text follows its active link on desktop and is hidden on mobile. */
.detail-neighbors .detail-neighbor-kind { color: inherit; }
@media (max-width: 720px) {
  .detail-titlebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
  }
  .detail-titlegroup {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
  }
  .detail-neighbors {
    align-self: center;
    max-width: 100%;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 6px;
    padding-bottom: 0;
    font-size: 12px;
    line-height: 18px;
  }
  .detail-neighbors a,
  .detail-neighbors > span {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 3px 9px;
    line-height: 18px;
  }
  .detail-neighbors .detail-neighbor-kind { display: none; }
}

.inquiry-field > label { flex-wrap: wrap; }
.inquiry-message-optional { color: #89858e; font-size: 12px; font-weight: 400; }
.inquiry-consent details { overflow-wrap: anywhere; }
