/* The match screen (assets/js/app-match.js, window.appMatch.show()): both photos, the two hearts of the logo meeting
   between them, rings spreading like a stone dropped in the water, the wave below. Any width: it is a layer over the
   page. The background and the light text colours are the mockup's (design/d-match.png). */
.app-match {position:fixed;inset:0;z-index:1300;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;overflow:hidden auto;padding:calc(34px + var(--app-safe-top)) 26px calc(36px + var(--app-safe-bottom));background:radial-gradient(120% 70% at 50% 18%,#0e5f78 0,#0b2f45 42%,var(--app-night) 78%);color:var(--app-text);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;text-align:center;overscroll-behavior:contain;animation:app-match-in .22s var(--app-ease) both;}
.app-match.is-closing {animation:app-match-out .2s var(--app-ease) both;}
.app-match > * {position:relative;z-index:1;width:100%;max-width:440px;}
.app-match-kicker {margin:0;color:#9fe3e3;font-weight:700;font-size:13px;letter-spacing:.16em;text-transform:uppercase;}
.app-match h2 {margin:6px 0 0;color:var(--app-text);font:800 clamp(32px,10vw,40px)/1.1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:-.03em;animation:app-match-rise .26s var(--app-ease) .06s both;}
/* The pair: two round photos with the water ring, the mark between them, the rings behind. */
.app-match-pair {position:relative;flex:none;height:230px;margin-top:clamp(20px,5vh,38px);margin-top:clamp(20px,5dvh,38px);}
.app-match-photo {position:absolute;top:20px;box-sizing:border-box;width:146px;height:146px;padding:3px;border-radius:50%;background:var(--app-water);animation:app-match-left .28s var(--app-ease) both;}
.app-match-photo img {display:block;box-sizing:border-box;width:100%;height:100%;border:3px solid var(--app-night);border-radius:50%;background:var(--app-card);object-fit:cover;}
.app-match-photo.is-me {right:calc(50% - 4px);transform:rotate(-7deg);}
.app-match-photo.is-them {left:calc(50% - 4px);transform:rotate(7deg);animation-name:app-match-right;}
.app-match-mark {position:absolute;top:104px;left:50%;display:block;width:84px;height:84px;margin-left:-42px;border-radius:50%;background:var(--app-night);box-shadow:0 8px 30px #00000080;}
.app-match-mark svg {position:absolute;top:15px;left:15px;width:54px;height:54px;overflow:visible;}
.app-match-mark .is-teal {animation:app-match-heart-teal .28s var(--app-ease) .12s both;}
.app-match-mark .is-blue {animation:app-match-heart-blue .28s var(--app-ease) .12s both;}
.app-match-rings {position:absolute;top:146px;left:50%;z-index:-1;width:0;height:0;pointer-events:none;}
.app-match-rings i {position:absolute;border:1.5px solid #3be0d0;border-radius:50%;opacity:var(--ring);transform:translate(-50%,-50%);animation:app-match-ring .28s var(--app-ease) both;}
.app-match-rings i:nth-child(1) {width:240px;height:240px;--ring:.22;animation-delay:.16s;}
.app-match-rings i:nth-child(2) {width:350px;height:350px;--ring:.15;animation-delay:.24s;}
.app-match-rings i:nth-child(3) {width:470px;height:470px;--ring:.1;animation-delay:.32s;}
.app-match-rings i:nth-child(4) {width:600px;height:600px;--ring:.06;animation-delay:.4s;}
.app-match-text {margin:6px 0 0;padding:0 18px;color:#dcebf2;font-size:17px;line-height:1.45;text-wrap:balance;animation:app-match-rise .26s var(--app-ease) .18s both;}
.app-match-text b {color:#fff;}
.app-match-text span {display:block;}
.app-match-wave {position:absolute;left:0;right:0;bottom:0;z-index:0;width:100%;max-width:none;height:212px;pointer-events:none;}
.app-match-actions {display:flex;flex-direction:column;gap:12px;margin-top:auto;padding-top:28px;}
.app-match-actions .app-btn {min-height:56px;border-radius:28px;font-size:17px;}
.app-match-actions .app-btn-glass {border-color:#ffffff4d;}
.app-match-actions .app-btn:focus-visible {outline:3px solid #fff;outline-offset:3px;}
@media(max-height:700px) {
 .app-match {padding-top:calc(18px + var(--app-safe-top));padding-bottom:calc(20px + var(--app-safe-bottom));}
 .app-match h2 {font-size:30px;}
 .app-match-pair {height:176px;margin-top:6px;transform:scale(.78);transform-origin:50% 30%;}
 .app-match-text {margin-top:0;font-size:15.5px;}
 .app-match-actions {padding-top:16px;gap:10px;}
 .app-match-actions .app-btn {min-height:50px;}
}
@keyframes app-match-in {from {opacity:0;}}
@keyframes app-match-out {to {opacity:0;}}
@keyframes app-match-rise {from {opacity:0;transform:translateY(12px);}}
@keyframes app-match-left {from {opacity:0;transform:translateX(-46px) rotate(-16deg);}}
@keyframes app-match-right {from {opacity:0;transform:translateX(46px) rotate(16deg);}}
@keyframes app-match-heart-teal {from {transform:translateX(-26px) rotate(-12deg);}}
@keyframes app-match-heart-blue {from {transform:translateX(30px) rotate(14deg);opacity:.4;}}
@keyframes app-match-ring {from {opacity:0;transform:translate(-50%,-50%) scale(.35);}}
@media(prefers-reduced-motion:reduce) {
 .app-match,.app-match *,.app-match.is-closing {animation:none !important;}
}
