/* The full matching form remains unchanged; only its initial presentation is compact. */
html[data-uc-r3-service-order="boot"] [data-home-match-compact] {
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  margin: 0;
}

:is(body.home-v2-page, body[data-page-key="fortune-hub-v2"]) [data-home-match-compact].home-match--r3-entry,
:is(body.home-v2-page, body[data-page-key="fortune-hub-v2"]) [data-home-match-compact][slot="teacher-match-entry"] {
  display: block;
  max-width: none;
  /* This light-DOM slot does not inherit the embedded card's inset. Match the
     heading and card edge explicitly on phones. */
  margin: 10px 18px 4px;
  padding: 0;
  background: transparent;
  color: inherit;
  visibility: visible;
}

.home-match__disclosure { margin: 0; }
.home-match__disclosure > summary { list-style: none; }
.home-match__disclosure > summary::-webkit-details-marker { display: none; }

.home-match__trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #443328;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.home-match__trigger:hover {
  color: #75431c;
}

.home-match__trigger:focus-visible {
  outline: 3px solid rgba(172, 112, 51, .28);
  outline-offset: 3px;
}

.home-match__trigger-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.home-match__trigger-copy strong {
  overflow: hidden;
  color: #3f2d20;
  font: 600 15px/1.35 Georgia, 'Songti TC', serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-match__trigger-copy em {
  overflow: hidden;
  color: #796657;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-match__trigger-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8e5525, #613618);
  box-shadow: 0 5px 12px rgba(89, 48, 18, .16);
  color: #fff8eb;
  font-size: 12px;
  font-weight: 800;
}

.home-match__disclosure[open] .home-match__trigger { margin-bottom: 10px; }
.home-match__disclosure[open] .home-match__frame { max-width: 760px; }

@media (min-width: 768px) {
  :is(body.home-v2-page, body[data-page-key="fortune-hub-v2"]) [data-home-match-compact].home-match--r3-entry,
  :is(body.home-v2-page, body[data-page-key="fortune-hub-v2"]) [data-home-match-compact][slot="teacher-match-entry"] { margin: 12px 0 4px; }

  .home-match__trigger { min-height: 50px; }

  /* Keep the 3-question action paired with the question it answers instead of
     stranding it at the far edge of a wide teacher rail. */
  .home-match__trigger-action { margin-left: 4px; }
}

@media (max-width: 420px) {
  .home-match__trigger { gap: 10px; }
  .home-match__trigger-action { font-size: 12px; }
  .home-match__trigger-action span { font-size: 15px; }
}
