:root {
  --bg: #09080b;
  --panel: #141016;
  --panel-2: #1b141d;
  --ink: #f7edf3;
  --muted: #bcaeba;
  --soft: #7f6c7c;
  --line: #332433;
  --wine: #b52554;
  --wine-dark: #8d1b40;
  --teal: #41d6c6;
  --gold: #d6a34c;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
  font-family:
    "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #10090f;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background-image: url("./midnight-rose-pattern.png");
  background-position: center top;
  background-repeat: repeat;
  background-size: 620px 620px;
  opacity: 0.3;
}

button {
  font: inherit;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 9, 15, 0.82);
  backdrop-filter: blur(3px);
}

.age-gate.is-hidden {
  display: none;
}

.age-panel,
.privacy-dialog {
  width: min(560px, 100%);
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 16, 22, 0.96);
  box-shadow: var(--shadow);
}

.age-panel h1,
.home-screen h1,
.result-screen h2 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.age-panel h1 {
  font-size: clamp(1.9rem, 5.8vw, 3.25rem);
}

.age-panel p,
.home-screen p,
.result-screen p,
.section-title p,
.footer,
.privacy-dialog p {
  line-height: 1.85;
}

.age-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.answer-button:focus-visible,
.logo-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(65, 214, 198, 0.4);
  outline-offset: 3px;
}

.button.primary {
  background: linear-gradient(135deg, var(--wine), #d13d67);
  box-shadow: 0 14px 34px rgba(181, 37, 84, 0.28);
}

.button.primary:hover {
  background: linear-gradient(135deg, var(--wine-dark), #be2e58);
}

.button.ghost,
.button.subtle {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
}

.app.is-locked {
  max-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 4;
  width: 100%;
  padding: 18px clamp(16px, 4vw, 42px);
  pointer-events: none;
}

.logo-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(65, 214, 198, 0.38);
  border-radius: 8px;
  color: var(--teal);
  background: rgba(65, 214, 198, 0.08);
  font-weight: 800;
}

.logo-text {
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.screen {
  display: none;
}

.screen.is-visible {
  display: block;
}

.home-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: none;
  align-content: center;
  justify-items: center;
  padding: 92px 0 68px;
  text-align: center;
}

.home-screen.is-visible {
  display: grid;
}

.home-copy {
  width: min(920px, 100%);
  margin: 0 auto;
}

.home-screen .home-audience {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  gap: 12px;
  margin: 0 auto 14px;
  color: #ff88ac;
  font-size: 1.25rem;
  font-weight: 900;
}

.home-screen .home-audience::before,
.home-screen .home-audience::after {
  width: 30px;
  height: 1px;
  content: "";
  background: #b93464;
}

.home-screen h1 {
  font-size: clamp(2.35rem, 8.8vw, 6.25rem);
  line-height: 1.08;
}

.home-title-line {
  display: block;
  white-space: nowrap;
}

.home-screen p {
  max-width: 760px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 2vw, 1.18rem);
}

.mode-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(560px, 100%);
  margin-top: 38px;
}

.start-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.start-button strong,
.start-button span {
  display: block;
}

.start-button span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.start-button.primary span {
  color: rgba(255, 255, 255, 0.78);
}

.type-directory-link {
  margin-top: 15px;
  border: 0;
  border-bottom: 1px solid rgba(65, 214, 198, 0.42);
  padding: 5px 2px;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.type-directory-link:hover {
  color: #bff7ef;
  border-bottom-color: #bff7ef;
}

.home-share,
.share-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(470px, 100%);
}

.home-share {
  margin-top: 18px;
}

.share-button {
  display: inline-flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-weight: 800;
}

.share-button:hover {
  border-color: rgba(65, 214, 198, 0.48);
  background: rgba(255, 255, 255, 0.09);
}

.share-x {
  color: #09080b;
  background: #f7f4f6;
}

.share-x:hover {
  background: #ffffff;
}

.share-line {
  border-color: #06c755;
  color: #ffffff;
  background: #06c755;
}

.share-line:hover {
  background: #05b94f;
}

.share-brand {
  font-size: 1.05rem;
  line-height: 1;
}

.line-brand {
  font-size: 0.65rem;
}

.share-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.type-directory-screen {
  padding: 104px 0 70px;
}

.type-directory-back {
  margin-bottom: 30px;
}

.type-directory-heading {
  max-width: 800px;
}

.type-directory-heading h1 {
  margin: 0;
  font-size: clamp(2.15rem, 6vw, 4.4rem);
  line-height: 1.14;
  letter-spacing: 0;
}

.type-directory-heading > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.pair-comparison-tool {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 34px);
  background: rgba(20, 16, 22, 0.84);
  box-shadow: var(--shadow);
}

.pair-comparison-heading h2,
.all-types-section h2 {
  margin: 0;
  letter-spacing: 0;
}

.type-selectors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-top: 22px;
}

.type-selectors label {
  display: grid;
  gap: 8px;
  color: #ff91b1;
  font-size: 0.82rem;
  font-weight: 900;
}

.type-selectors select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #171119;
  font: inherit;
  font-weight: 800;
}

.type-pair-symbol {
  display: grid;
  min-height: 50px;
  place-items: center;
  color: var(--teal);
  font-size: 1.4rem;
  font-weight: 900;
}

.directory-comparison-result {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.directory-comparison-result .compatibility-detail-heading h3 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  letter-spacing: 0;
}

.directory-comparison-result .compatibility-copy-grid h4 {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.all-types-section {
  margin-top: 44px;
}

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

.type-directory-card {
  min-width: 0;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  background: rgba(20, 16, 22, 0.76);
  cursor: pointer;
}

.type-directory-card:hover,
.type-directory-card.is-active {
  border-color: rgba(65, 214, 198, 0.58);
  background: rgba(65, 214, 198, 0.08);
}

.type-directory-card > span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.type-directory-card h3 {
  margin: 7px 0;
  font-size: 1.05rem;
  line-height: 1.45;
  letter-spacing: 0;
}

.type-directory-card p,
.type-directory-card small {
  overflow-wrap: anywhere;
  color: var(--muted);
  line-height: 1.55;
}

.type-directory-card p {
  margin: 0 0 8px;
}

.directory-type-detail {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 30px);
  background: rgba(20, 16, 22, 0.86);
}

.directory-type-detail-heading {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.directory-type-detail-heading span {
  color: var(--teal);
  font-weight: 900;
}

.directory-type-detail-heading h3 {
  margin: 5px 0 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: 0;
}

.directory-type-detail-heading > strong {
  max-width: 48%;
  color: #ff91b1;
  text-align: right;
  line-height: 1.5;
}

.directory-type-copy,
.partner-type-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.directory-type-copy h4,
.partner-type-copy h6 {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.directory-type-copy p,
.partner-type-copy p,
.directory-type-match {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.directory-type-match {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.quiz-screen {
  min-height: 100vh;
  min-height: 100svh;
  padding: 64px 0;
}

.quiz-screen.is-visible {
  display: grid;
  place-items: center;
}

.back-button {
  position: fixed;
  top: 18px;
  left: clamp(16px, 4vw, 42px);
  z-index: 5;
}

.question-card {
  width: min(1040px, 100%);
  text-align: center;
}

.question-text {
  min-height: 128px;
  margin: 0;
  font-size: clamp(1.45rem, 4.4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.5;
  text-wrap: pretty;
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

.question-text .phrase {
  display: inline-block;
}

.answer-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.answer-button {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.answer-button:hover {
  border-color: rgba(65, 214, 198, 0.45);
  background: rgba(65, 214, 198, 0.09);
}

.answer-button.is-selected {
  border-color: var(--teal);
  background: rgba(65, 214, 198, 0.16);
  box-shadow: inset 0 0 0 1px rgba(65, 214, 198, 0.34);
}

.answer-button strong {
  display: block;
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 1.1rem;
}

.answer-button span {
  color: var(--muted);
  font-size: 0.82rem;
}

.quiz-progress {
  width: min(620px, 82%);
  margin: 30px auto 0;
}

.progress-text {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wine), #e34b74, var(--teal));
  transition: width 220ms ease;
}

.result-screen {
  padding: 104px 0 40px;
}

.result-screen.is-visible {
  display: flex;
  flex-direction: column;
}

.result-screen.is-simple-result .share-result-card { order: 1; }
.result-screen.is-simple-result .result-shell { order: 2; }
.result-screen.is-simple-result .recommendations { order: 3; }
.result-screen.is-simple-result .experience-profile { order: 4; }
.result-screen.is-simple-result .compatibility-section { order: 5; }
.result-screen.is-simple-result .result-share { order: 6; }
.result-screen.is-simple-result .result-actions { order: 7; }

.share-result-card {
  position: relative;
  display: grid;
  width: min(900px, 100%);
  min-height: 470px;
  margin: 0 auto 24px;
  overflow: hidden;
  align-content: center;
  border: 1px solid rgba(255, 135, 169, 0.42);
  border-radius: 8px;
  padding: clamp(26px, 6vw, 64px);
  background: #160d15;
  box-shadow: var(--shadow);
}

.share-result-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background: var(--wine);
  content: "";
}

.share-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.share-type-code {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 900;
}

.share-result-card h2 {
  max-width: 12em;
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  line-height: 1.16;
  text-wrap: pretty;
}

.share-catch {
  margin: 20px 0 0;
  color: #ff9ab7;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 900;
  line-height: 1.55;
}

.share-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.share-card-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--ink);
  background: #211621;
  font-size: 0.84rem;
  font-weight: 800;
}

.result-shell {
  width: min(900px, 100%);
  margin: 0 auto;
}

.result-main,
.result-side,
.recommendation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 16, 22, 0.74);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.22);
}

.result-main {
  padding: clamp(22px, 4vw, 34px);
}

.result-side {
  padding: 20px;
}

.result-side h3,
.recommendations h3,
.privacy-dialog h2 {
  margin: 0 0 14px;
  line-height: 1.35;
  letter-spacing: 0;
}

.type-code {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #08070a;
  background: var(--teal);
  font-weight: 900;
}

.result-screen h2 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.25;
  text-wrap: pretty;
}

.result-screen h2 .phrase {
  display: inline-block;
}

.kink-name {
  color: #ff87a9;
  font-size: 1.1rem;
  font-weight: 800;
}

.result-copy-grid,
.result-detail-grid {
  display: grid;
  gap: 28px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.result-copy-grid {
  grid-template-columns: 1fr;
  gap: 36px;
}

.result-detail-grid,
.result-screen.is-simple-result .result-copy-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-copy-block h3,
.result-detail-block h3 {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 1rem;
  letter-spacing: 0;
}

.result-copy-block p {
  margin: 0 0 14px;
  color: var(--muted);
}

.result-copy-block p:last-child {
  margin-bottom: 0;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight-item {
  margin: 0;
  border-left: 2px solid var(--wine);
  padding: 7px 0 7px 12px;
  color: var(--muted);
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 135, 169, 0.28);
  border-radius: 999px;
  color: #ffdce7;
  background: rgba(181, 37, 84, 0.16);
  font-size: 0.9rem;
  font-weight: 800;
}

.result-screen.is-simple-result .detailed-only {
  display: none;
}

.experience-profile,
.big-five-section,
.daily-profile,
.compatibility-section {
  margin-top: 30px;
}

.result-section-heading {
  margin-bottom: 16px;
}

.result-section-heading h3,
.result-section-heading h4 {
  margin: 0;
  letter-spacing: 0;
}

.result-section-heading > p:last-child:not(.eyebrow) {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

.experience-card,
.big-five-trait,
.daily-profile-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 16, 22, 0.76);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
}

.experience-card {
  padding: 18px;
}

.experience-card h4 {
  margin: 0 0 9px;
  color: #ff91b1;
  font-size: 0.92rem;
  line-height: 1.45;
  letter-spacing: 0;
}

.experience-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.big-five-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.big-five-trait {
  padding: 18px;
}

.big-five-trait:last-child {
  grid-column: 1 / -1;
}

.trait-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.trait-heading h4 {
  margin: 0;
  letter-spacing: 0;
}

.trait-heading strong {
  color: var(--teal);
  font-size: 1.35rem;
}

.trait-meter {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #2a202d;
}

.trait-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #cf3568;
}

.big-five-trait p,
.big-five-details p,
.method-note p {
  color: var(--muted);
  line-height: 1.75;
}

.big-five-trait p {
  margin: 13px 0;
}

.big-five-trait .trait-extra {
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: #ddd2dc;
}

.trait-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.trait-chips span {
  padding: 5px 9px;
  border: 1px solid rgba(65, 214, 198, 0.23);
  border-radius: 999px;
  color: #bff7ef;
  background: rgba(65, 214, 198, 0.07);
  font-size: 0.8rem;
  font-weight: 800;
}

.big-five-details {
  margin-top: 12px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.big-five-details h4,
.daily-profile-grid h4 {
  margin: 0 0 8px;
  letter-spacing: 0;
}

.big-five-details p {
  margin: 0;
}

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

.daily-profile-grid article {
  padding: 18px;
}

.method-note {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
}

.method-note summary {
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.method-note p {
  margin: 10px 0 0;
}

.method-note a {
  color: var(--teal);
  font-weight: 800;
}

.compatibility-groups {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 22px;
}

.compatibility-groups h4 {
  margin: 0 0 10px;
  letter-spacing: 0;
}

.compatibility-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.compatibility-groups section:last-child .compatibility-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compatibility-card {
  display: grid;
  min-width: 0;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  background: rgba(20, 16, 22, 0.76);
  cursor: pointer;
}

.compatibility-card:hover,
.compatibility-card.is-active {
  border-color: rgba(65, 214, 198, 0.55);
  background: rgba(65, 214, 198, 0.08);
}

.compatibility-card.challenging:hover,
.compatibility-card.challenging.is-active {
  border-color: rgba(255, 135, 169, 0.55);
  background: rgba(181, 37, 84, 0.1);
}

.compatibility-card span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.compatibility-card.challenging span {
  color: #ff91b1;
}

.compatibility-card strong {
  margin: 5px 0;
  font-size: 1.55rem;
}

.compatibility-card small {
  color: var(--muted);
  line-height: 1.45;
}

.compatibility-compare {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 16, 22, 0.76);
  overflow: hidden;
}

.compatibility-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px 0;
}

.compatibility-tabs button {
  min-width: 78px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.compatibility-tabs button.is-active {
  border-bottom-color: var(--teal);
  color: var(--ink);
}

.compatibility-detail {
  padding: clamp(18px, 3vw, 28px);
}

.compatibility-detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.compatibility-detail-heading span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
}

.compatibility-detail-heading h4 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  letter-spacing: 0;
}

.compatibility-detail-heading > strong {
  color: #ff91b1;
  font-size: clamp(2rem, 5vw, 3rem);
}

.compatibility-pair-name {
  margin: 8px 0 20px;
  color: var(--muted);
}

.compatibility-axis-list {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}

.compatibility-axis-row {
  display: grid;
  grid-template-columns: 120px repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.compatibility-axis-row > span {
  color: #ff91b1;
  font-size: 0.82rem;
  font-weight: 900;
}

.compatibility-axis-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.compatibility-axis-row strong {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
}

.compatibility-copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.compatibility-copy-grid h5 {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.compatibility-copy-grid p,
.compatibility-note {
  color: var(--muted);
  line-height: 1.75;
}

.compatibility-copy-grid p {
  margin: 0;
}

.partner-type-result {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.partner-type-result-heading span {
  color: #ff91b1;
  font-size: 0.78rem;
  font-weight: 900;
}

.partner-type-result-heading h5 {
  margin: 5px 0 0;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  letter-spacing: 0;
}

.partner-kink-name {
  margin: 8px 0 0;
  color: #ffd4e1;
  font-weight: 800;
}

.partner-type-result .tag-list {
  margin-top: 18px;
}

.compatibility-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
}

.recommendation-card {
  padding: 18px;
}

.recommendation-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.recommendations {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 24px);
  background: rgba(20, 16, 22, 0.58);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.18);
}

.section-title {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: end;
  margin-bottom: 14px;
}

.section-title h3 {
  margin: 0;
  line-height: 1.35;
  letter-spacing: 0;
}

.section-title > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.recommendations > .tag-list {
  margin-bottom: 16px;
}

.recommendation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.work-cover-link {
  display: block;
  margin: -18px -18px 16px;
  overflow: hidden;
  border-radius: 7px 7px 0 0;
  background: #211621;
}

.work-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.recommendation-card h4 {
  margin: 0 0 10px;
  line-height: 1.35;
  letter-spacing: 0;
}

.owned-work-note {
  align-self: flex-start;
  margin: 0 0 9px;
  color: #ff9fba;
  font-size: 0.75rem;
  font-weight: 800;
}

.question-text,
.share-result-card h2,
.share-catch,
.result-screen h2,
.result-copy-block p,
.insight-item,
.section-title h3,
.section-title > p,
.recommendation-card h4,
.recommendation-card p {
  line-break: strict;
  word-break: normal;
  word-break: auto-phrase;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.experience-card h4,
.experience-card p,
.big-five-trait p,
.big-five-details p,
.daily-profile-grid .insight-item,
.method-note p {
  line-break: strict;
  word-break: normal;
  word-break: auto-phrase;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.compatibility-card small,
.compatibility-pair-name,
.compatibility-axis-row p,
.compatibility-copy-grid p,
.compatibility-note {
  line-break: strict;
  word-break: normal;
  word-break: auto-phrase;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.recommendation-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.recommendation-card a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.recommendation-card .work-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 900;
}

.work-rating span {
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 700;
}

.recommendation-card .work-match {
  color: var(--muted);
  line-height: 1.7;
}

.work-match strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.8rem;
}

.recommendation-card .work-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border: 1px solid rgba(65, 214, 198, 0.32);
  border-radius: 7px;
  padding: 9px 12px;
  background: rgba(65, 214, 198, 0.07);
}

.recommendation-card > .tag-list {
  margin-bottom: 16px;
}

.recommendation-note {
  margin: 16px 0 0;
  color: var(--soft);
  font-size: 0.76rem;
  text-align: right;
}

.result-share {
  width: min(520px, 100%);
  margin: 24px auto 0;
  text-align: center;
}

.result-share h3 {
  margin: 0 0 12px;
  line-height: 1.35;
  letter-spacing: 0;
}

.result-share .share-row {
  width: 100%;
}

.entertainment-note {
  margin: 24px auto 0;
  color: var(--soft);
  font-size: 0.78rem;
  text-align: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 26px 0 42px;
  color: var(--soft);
  font-size: 0.88rem;
}

.text-button {
  border: 0;
  padding: 0;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.privacy-dialog {
  color: var(--ink);
}

.privacy-dialog::backdrop {
  background: rgba(0, 0, 0, 0.76);
}

body.is-quiz [data-app-header],
body.is-quiz [data-app-footer] {
  display: none;
}

@media (max-width: 860px) {
  .answer-scale,
  .result-copy-grid,
  .result-detail-grid,
  .experience-grid,
  .big-five-bars,
  .daily-profile-grid,
  .compatibility-groups,
  .compatibility-copy-grid,
  .directory-type-copy,
  .partner-type-copy,
  .recommendation-list {
    grid-template-columns: 1fr;
  }

  .all-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compatibility-list,
  .compatibility-groups section:last-child .compatibility-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compatibility-axis-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .big-five-trait:last-child {
    grid-column: auto;
  }

  .answer-button {
    min-height: 58px;
  }

  .section-title {
    display: grid;
    gap: 8px;
    align-items: start;
  }
}

@media (min-width: 521px) {
  .home-screen p {
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .app {
    width: min(100% - 20px, 1180px);
  }

  .compatibility-list,
  .compatibility-groups section:last-child .compatibility-list {
    grid-template-columns: 1fr;
  }

  .compatibility-detail-heading {
    align-items: flex-start;
  }

  .type-directory-screen {
    padding-top: 84px;
  }

  .type-selectors {
    grid-template-columns: 1fr;
  }

  .type-pair-symbol {
    min-height: 24px;
  }

  .all-type-grid {
    grid-template-columns: 1fr;
  }

  .directory-type-detail-heading {
    display: grid;
  }

  .directory-type-detail-heading > strong {
    max-width: none;
    text-align: left;
  }

  .home-screen h1 {
    font-size: clamp(2.25rem, 15vw, 4rem);
  }

  .home-screen {
    padding: 82px 0 30px;
  }

  .home-screen p {
    max-width: 310px;
    line-height: 1.7;
  }

  .start-button {
    margin-top: 0;
  }

  .mode-actions {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .home-share,
  .share-row {
    gap: 7px;
  }

  .home-share {
    margin-top: 14px;
  }

  .share-button {
    min-height: 52px;
    gap: 5px;
    padding: 8px 5px;
    font-size: 0.78rem;
  }

  .quiz-screen {
    padding: 58px 0 24px;
  }

  .answer-scale {
    gap: 8px;
    margin-top: 24px;
  }

  .answer-button {
    min-height: 52px;
  }

  .quiz-progress {
    width: 92%;
    margin-top: 20px;
  }

  .progress-text {
    margin-bottom: 8px;
    font-size: 0.8rem;
  }

  .question-text {
    min-height: 112px;
    font-size: 1.45rem;
    line-height: 1.55;
  }

  .share-result-card {
    min-height: 430px;
    padding: 28px 22px;
  }

  .share-card-topline {
    margin-bottom: 28px;
    font-size: 0.72rem;
  }

  .share-result-card h2 {
    font-size: 2.25rem;
  }

  .share-card-tags {
    margin-top: 22px;
  }

  .result-main {
    padding: 20px 16px;
  }

  .result-screen h2 {
    font-size: clamp(1.8rem, 9vw, 2.7rem);
  }

  .result-copy-grid,
  .result-detail-grid {
    gap: 20px;
    margin-top: 24px;
    padding-top: 20px;
  }

  .age-actions .button,
  .result-actions .button,
  .start-button {
    width: 100%;
  }
}
