.feature { display: grid; gap: .8rem; margin-block: 1rem; min-width: 0; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.55; }
.feature :is(h2,h3) { line-height: 1.35; margin: .25rem 0; }
.feature :is(label,summary) { font-weight: 700; }
.feature .partner-label { margin-top: .5rem; padding-top: 1rem; border-top: 1px solid #b69fba; font-size: 1.125rem; }
.feature input:not([type=checkbox]), .feature textarea, .feature select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 2.8rem; padding: .55rem; font: inherit; color: #241828; background: white; border: 1px solid #625367; border-radius: .38rem; }
.feature textarea { overflow-wrap: anywhere; resize: vertical; }
.feature-action { padding: .65rem 1rem; min-height: 2.8rem; border-radius: .55rem; color: #fff; background: #57224a; border: 2px solid #3c1733; font: inherit; font-weight: 700; cursor: pointer; }
.feature-action:disabled { color: #554b52; background: #e1d7dd; border-color: #b7a8b1; cursor: default; }
.feature :focus-visible { outline: 3px solid #08616d; outline-offset: 2px; }
.feature p:empty { display: none; }
#shareDialog { display: none; width: min(36rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; margin: auto; }
#shareDialog[open] { display: grid; }
#shareDialog::backdrop { background: rgb(27 12 27 / .72); }
#shareDialog form { justify-self: end; }
#shareDialog .share-heading { display: contents; }
#shareDialog.show-pair { width: min(30rem, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: clamp(10px, 3.8vw, 1.15rem); gap: .6rem; align-content: start; overscroll-behavior: contain; container: pair-dialog / inline-size; }
#shareDialog.show-pair .share-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
#shareDialog.show-pair .share-heading form { grid-column: 2; grid-row: 1; }
#shareDialog.show-pair .share-heading h2 { grid-column: 1; grid-row: 1; margin: 0; font-size: 1.35rem; text-wrap: balance; }
#shareDialog.show-pair .share-heading button { padding: .35rem .65rem; }
.pair-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.4rem, 2.5vw, .85rem); }
.pair-card { min-width: 0; margin: 0; padding: .35rem .25rem .45rem; display: flex; flex-direction: column; align-items: stretch; border: 3px solid var(--card-suit); border-radius: .7rem; background: #fffaf1; box-shadow: inset 0 0 0 2px #fffaf1, inset 0 0 0 3px color-mix(in srgb, var(--card-suit) 32%, #fffaf1); }
.pair-rank { align-self: flex-start; margin-inline: .35rem; color: color-mix(in srgb, var(--card-suit) 68%, #211525); font-weight: 900; line-height: 1.2; }
.pair-art { display: grid; place-items: center; height: clamp(3.8rem, 15.5dvh, 7.8rem); color: var(--card-suit); font: bold 2.5rem Georgia, serif; }
.pair-art img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; mix-blend-mode: multiply; }
.pair-card figcaption { margin-block: .18rem 0; padding-inline: .1rem; text-align: center; color: var(--ink); font-weight: 800; line-height: 1.28; }
.pair-name-part { display: block; text-wrap: balance; }
.pair-spoken { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.show-pair #compatibility { font-size: 1.2rem; font-weight: 900; line-height: 1.45; color: #54234b; }
#pairReading { display: grid; gap: 1.15rem; margin-block: .55rem .35rem; padding-top: 1rem; border-top: 1px solid #b69fba; text-align: start; }
#pairReading h3 { font-size: 1.125rem; color: #54234b; margin: 0 0 .35rem; }
#pairReading p, .pair-voices dd { line-height: 1.8; }
.pair-voices { display: grid; gap: .6rem; margin-top: .8rem; }
.pair-voices div { padding: .6rem .75rem; border-inline-start: 3px solid #79527a; background: #f4eaf2; }
.pair-voices dt { font-weight: 800; color: #54234b; }
.pair-voices dd { margin: .14rem 0 0; }
@container pair-dialog (max-width: 14em) {
  #shareDialog.show-pair .share-heading { grid-template-columns: minmax(0, 1fr); }
  #shareDialog.show-pair .share-heading form { grid-column: 1; grid-row: 2; }
}
@media (max-width: 350px) {
  #shareDialog.show-pair .share-heading h2 { font-size: 1.1875rem; }
  .pair-card figcaption { font-size: .9375rem; }
}
@media (max-height: 520px) {
  #shareDialog.show-pair { gap: .25rem; }
  .pair-art { height: clamp(2.8rem, 13dvh, 4.25rem); }
}
@media (max-width: 350px) and (max-height: 520px) {
  #shareDialog.show-pair {
    width: calc(100% - 12px);
    padding: .45rem;
    gap: .1rem;
  }
  #shareDialog.show-pair .share-heading h2 { font-size: 1.125rem; }
}
@media (min-width: 560px) and (max-height: 450px) {
  #shareDialog.show-pair { width: min(42rem, calc(100% - 24px)); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "heading heading" "cards lead" "cards copy" "cards status" "reading reading"; column-gap: .9rem; }
  .show-pair .share-heading { grid-area: heading; }
  .show-pair .pair-cards { grid-area: cards; align-self: start; }
  .show-pair #compatibility { grid-area: lead; }
  .show-pair #pairReading { grid-area: reading; }
  .show-pair #copyUrl { grid-area: copy; }
  .show-pair #copyStatus { grid-area: status; }
  .pair-art { height: clamp(3.5rem, 20dvh, 6rem); }
}
