.romance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  margin: 0 0 34px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(190, 24, 93, .14);
  border-radius: 22px;
  background: #fff9fa;
  box-shadow: 0 24px 60px rgba(136, 19, 55, .1);
  text-align: left;
}

html[data-tests-page-family="romance-index"] .language-selector {
  justify-content: flex-start;
  min-height: 44px;
  margin: 0 0 18px !important;
  padding-right: 56px;
}

html[data-tests-page-family="romance-index"] .lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(76, 16, 39, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  box-shadow: none;
}

html[data-tests-page-family="romance-index"] .lang-btn[aria-current="page"] {
  border-color: rgba(190, 24, 93, .28);
  background: #fce7f3;
  color: #9d174d;
  font-weight: 900;
}

html[data-tests-page-family="romance-index"] .container > div:has(> .other-tests-btn) {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  margin: 0 !important;
}

html[data-tests-page-family="romance-index"] .other-tests-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 !important;
  border: 1px solid rgba(76, 16, 39, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .92) !important;
  color: #3f1023;
  box-shadow: none;
  font-size: 0;
}

.other-tests-btn::before {
  content: "☰";
  font-size: 1.1rem;
  line-height: 1;
}

.romance-hero-copy {
  display: grid;
  gap: 14px;
}

.romance-hero-kicker {
  margin: 0;
  color: #be185d;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.romance-hero h1 {
  margin: 0;
  color: #4c1027;
  font-size: clamp(2.55rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -.045em;
  text-align: left;
  text-wrap: balance;
  overflow-wrap: normal;
}

:lang(ko) .romance-hero h1 {
  word-break: keep-all;
}

.romance-hero .subtitle {
  max-width: 620px;
  margin: 0;
  color: #6b3347;
  font-size: 1.02rem;
  line-height: 1.7;
  text-align: left;
}

.romance-hero-art {
  display: block;
  width: 100%;
  max-height: 410px;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
}

.romance-hub-controls {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.romance-control-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
}

[data-romance-random],
.romance-search {
  min-height: 48px;
  border: 1px solid rgba(76, 16, 39, .18);
  border-radius: 10px;
  font: inherit;
}

[data-romance-random] {
  padding: 10px 16px;
  border-color: var(--product-primary, #0f766e);
  background: var(--product-primary, #0f766e);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.romance-search {
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  color: #3f1023;
}

.romance-search:focus-visible,
[data-romance-random]:focus-visible,
[data-romance-group]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--product-primary, #0f766e) 25%, transparent);
  outline-offset: 2px;
}

.romance-group-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

[data-romance-group] {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid rgba(76, 16, 39, .16);
  border-radius: 999px;
  background: #fff;
  color: #6b3347;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
}

[data-romance-group][aria-pressed="true"] {
  border-color: var(--product-primary, #0f766e);
  background: color-mix(in srgb, var(--product-primary, #0f766e) 10%, #fff);
  color: var(--product-primary-hover, #115e59);
}

.romance-filter-status {
  min-height: 20px;
  margin: 0;
  color: #7a4256;
  font-size: .85rem;
}

.romance-featured {
  margin: 0 0 34px;
}

.romance-featured h2,
.romance-groups-heading {
  margin: 0 0 6px;
  color: #3f1023;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.romance-featured > p,
.romance-groups-intro {
  margin: 0 0 14px;
  color: #6b3347;
}

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

.romance-featured .test-card {
  border-color: rgba(190, 24, 93, .24);
  background: #fff7fb;
}

.romance-groups {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.romance-group {
  border: 1px solid rgba(76, 16, 39, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 28px rgba(76, 16, 39, .06);
  overflow: clip;
}

.romance-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  color: #3f1023;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.romance-group summary::-webkit-details-marker { display: none; }
.romance-group summary::after { content: "+"; color: #be185d; font-size: 1.35rem; }
.romance-group[open] summary::after { content: "−"; }
.romance-group summary small { margin-left: auto; color: #8d5a6d; font-weight: 700; }
.romance-group .test-grid { padding: 0 16px 18px; }
.romance-card-hidden { display: none !important; }

.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: 820px) {
  .romance-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .romance-hero-copy { display: contents; }
  .romance-hub-controls { display: contents; }
  .romance-control-row { display: contents; }
  .romance-hero-kicker { order: 1; }
  .romance-hero h1 { order: 2; }
  .romance-hero .subtitle { order: 3; }
  [data-romance-random] { order: 4; }
  .romance-hero-art { order: 5; max-height: 320px; }
  .romance-control-row label { order: 6; }
  .romance-group-filters { order: 7; }
  .romance-filter-status { order: 8; }
}

@media (max-width: 640px) {
  html[data-tests-page-family="romance-index"] .language-selector { gap: 6px; }
  html[data-tests-page-family="romance-index"] .lang-btn {
    flex: 0 1 auto;
    min-height: 44px;
    padding: 0 8px;
    font-size: .72rem;
  }
  .romance-hero { padding: 24px 18px 18px; border-radius: 16px; }
  .romance-hero h1 { font-size: clamp(2.3rem, 12vw, 3.4rem); }
  .romance-control-row { grid-template-columns: 1fr; }
  .romance-featured-grid { grid-template-columns: 1fr; }
  .romance-hero-art { max-height: 240px; }
  [data-romance-random], .romance-search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
