/* Scoped to playdate results. Quest and mailbox scrolling are unchanged. */
.friendship-celebration{position:relative;isolation:isolate;overflow:hidden;border:1px solid #dbe8d7;border-radius:22px;padding:22px 16px 20px;text-align:center;background:linear-gradient(145deg,#f0f6ec,#fafbf4);color:#31594f}
.friendship-celebration .friendship-eyebrow{position:relative;margin:0 0 8px;font-size:10px;font-weight:700;line-height:1.5;letter-spacing:1.5px;text-transform:uppercase;color:#778968}
.friendship-celebration h3{position:relative;font-family:Outfit,sans-serif;font-size:clamp(22px,4vw,29px);line-height:1.2;margin:0;letter-spacing:-.5px}
.friendship-pet-stage{display:grid;grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr);align-items:center;gap:4px;margin:4px auto 18px;max-width:480px;position:relative}
.friendship-companion{min-width:0}.friendship-companion>.creature-portrait{display:block;width:100%;height:auto;aspect-ratio:1;max-height:208px;transform-origin:50% 90%}.friendship-companion strong{display:block;font-family:Outfit,sans-serif;font-size:19px;font-weight:500;line-height:1.3;overflow-wrap:anywhere}
.friendship-heart{color:#d47b8d;filter:drop-shadow(0 3px 4px #d47b8d25)}.friendship-heart>.icon{width:30px;height:30px;fill:#f1bdc680}
.friendship-tier-seal{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:5px 10px;border:1px solid #d4e2cc;border-radius:9px;background:#e6efdf;color:#55744b}
.friendship-tier-seal .icon{width:15px;height:15px}.friendship-tier-seal>span{display:flex}.friendship-tier-seal strong{font-family:inherit;font-size:14px;line-height:1.5;font-weight:600}
.friendship-celebration .friendship-milestone-points{margin:9px 0 0}.friendship-celebration .friendship-milestone-points .friendship-points{font-size:13px}
.friendship-celebration .friendship-milestone-reward{display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;color:#90673d;margin:7px 0 0}.friendship-milestone-reward .icon{width:16px;height:16px}
.friendship-celebration .friendship-milestone-note{font-size:13px;color:#82927d;margin:7px 0 0;line-height:1.5}
.friendship-festivities{position:absolute;inset:0;z-index:-1;pointer-events:none}.friendship-festivities i{position:absolute;top:-14px;left:var(--x);width:6px;height:12px;border-radius:2px;background:var(--color);opacity:0}
.friendship-trait-discovery{margin-top:16px;padding:14px 16px;border:1px solid #e6e1ec;border-radius:15px;background:#faf7fc;text-align:center}.friendship-trait-discovery>p{font-size:14px;margin:0 0 8px;color:#71637f}.friendship-trait-discovery .species-traits{justify-content:center}
dialog:has(.friendship-celebration) .modal-footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
dialog:has(.friendship-celebration) .modal-footer>.button{min-width:0;min-height:46px;width:100%;white-space:normal;line-height:1.4;padding:10px 12px;text-align:center}
@media(prefers-reduced-motion:no-preference){
 html:not([data-motion="off"]) .friendship-festivities i{animation:friendship-confetti 2.5s cubic-bezier(.19,.6,.4,1) var(--delay) both}
 html:not([data-motion="off"]) .friendship-companion>.creature-portrait{animation:friendship-happy-hop 1.05s .15s ease-in-out 2}
 html:not([data-motion="off"]) .friendship-companion:last-child>.creature-portrait{animation-delay:.33s}
 html:not([data-motion="off"]) .friendship-heart{animation:friendship-heart-bloom 1.5s .1s ease-in-out 2}
 html:not([data-motion="off"]) .friendship-tier-seal{animation:friendship-seal-arrive .65s .15s ease-out both}
 @keyframes friendship-happy-hop{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-9px) rotate(-3deg)}65%{transform:translateY(-3px) rotate(2deg)}}
 @keyframes friendship-heart-bloom{0%,100%{transform:scale(1)}45%{transform:scale(1.22)}}
 @keyframes friendship-confetti{0%{opacity:0;transform:translateY(-10px) rotate(0)}12%,65%{opacity:.8}100%{opacity:0;transform:translate(var(--drift),400px) rotate(var(--turn))}}
 @keyframes friendship-seal-arrive{from{opacity:.4;transform:translateY(7px) scale(.92)}to{opacity:1;transform:none}}
}
@media(max-width:400px){.friendship-celebration{padding:18px 10px}.friendship-pet-stage{grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);gap:0}.friendship-companion strong{font-size:16px}.friendship-heart>.icon{width:22px;height:22px}.friendship-celebration .friendship-eyebrow{font-size:9px;letter-spacing:1px}}
/* The visiting pet uses the same canonical portrait framing as its profile. */
#notifications-view .notification-pet-avatar{display:block;width:44px;height:44px;flex:0 0 44px;padding:0;border:1px solid #e2e7df;border-radius:50%;overflow:hidden;cursor:pointer}
#notifications-view .notification-pet-avatar>.creature-portrait{display:block;width:100%;height:100%;transform:scale(1.25);transform-origin:50% 60%}
#notifications-view .notification-pet-avatar:focus-visible{outline:2px solid #32856c;outline-offset:3px}
#notifications-view .notification-friendship{display:block;margin:5px 0 2px;font-size:12px;line-height:1.65;color:#778b7b}
#notifications-view .notification-friendship-row{display:flex;align-items:center;flex-wrap:wrap;gap:3px 10px;min-width:0}
#notifications-view .notification-friendship-row+.notification-friendship-row{margin-top:7px}
#notifications-view .notification-friendship-pet{flex-basis:100%;overflow-wrap:anywhere}
#notifications-view .notification-turn{color:#32856c}
#notifications-view .notification-events>.notification-friendship{margin-top:10px}
:is(#notifications-view .notification-friendship-badge,.profile-friendship-badge){display:inline-flex;align-items:center;gap:5px;max-width:100%;vertical-align:middle;background:#e6efdf;color:#46613e;border:1px solid #d4e2cc;border-radius:8px;padding:3px 8px;margin:3px 0;font-size:12px;line-height:1.5;font-weight:600}:is(#notifications-view .notification-friendship-badge,.profile-friendship-badge)>.icon{width:13px;height:13px;flex:none}:is(#notifications-view .notification-friendship-badge,.profile-friendship-badge)[data-friendship-level="2"]{background:#e8f3f4;border-color:#cce2e5;color:#356d77}:is(#notifications-view .notification-friendship-badge,.profile-friendship-badge)[data-friendship-level="3"]{background:#fff3d8;border-color:#eddfbb;color:#805f24}
#notifications-view .notification-milestone-reward{display:inline-flex;align-items:center;gap:5px;color:#90673d;font-size:12px;margin-top:3px}#notifications-view .notification-milestone-reward .icon{width:14px;height:14px}

#notifications-view button.notification-return-invite{appearance:none;border:0;border-radius:3px;background:none;padding:0;font:inherit;text-align:left;color:#32856c;text-decoration:none;cursor:pointer}#notifications-view button.notification-return-invite:hover{text-decoration:none;color:#24654f}#notifications-view button.notification-return-invite:focus-visible{outline:2px solid #6b9d87;outline-offset:3px}#notifications-view button.notification-return-invite:disabled{cursor:wait;opacity:.65}

#notifications-view .notification-match{margin-top:10px;padding-top:9px;border-top:1px solid #efe5ec}#notifications-view .notification-match-label{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:#98718a}#notifications-view .notification-match-label .icon{width:14px;height:14px}#notifications-view .notification-match>p{font-size:12px;line-height:1.5;color:#7a8079;margin:5px 0 8px}#notifications-view .notification-match-pair{display:flex;align-items:flex-start;flex-direction:column;gap:5px;margin-top:7px;min-width:0}#notifications-view .notification-match-pair>small{font-size:11px;color:#7a8079}#notifications-view .notification-match-preview{max-width:100%;margin:0}#notifications-view .notification-match-egg{max-width:100%;text-align:left;white-space:normal;font-family:inherit;color:inherit;cursor:pointer}#notifications-view .notification-match-egg small{line-height:1.5}#notifications-view .notification-match-egg .item-art{flex:none}

#notifications-view .notification-friendship-next{font-size:11px}#notifications-view .notification-friendship-next>small{font-size:inherit;font-weight:400;white-space:nowrap}
/* Friendship colors stay distinct: green, teal, gold, then Soulmates purple. */
.friendship-tier-seal[data-friendship-level="2"]{background:#e8f3f4;border-color:#cce2e5;color:#356d77}
.friendship-tier-seal[data-friendship-level="3"]{background:#fff3d8;border-color:#eddfbb;color:#805f24}
.friendship-tier-seal[data-friendship-level="4"],:is(#notifications-view .notification-friendship-badge,.profile-friendship-badge)[data-friendship-level="4"]{background:#f1e8f8;border-color:#decce9;color:#73438e}
.friendship-celebration[data-friendship-tier="4"]{background:linear-gradient(145deg,#f6effa,#fcfaf6);border-color:#e1d5e9}
.friendship-celebration[data-friendship-tier="4"] .friendship-eyebrow{color:#8a719a}
.friendship-totem-reward .item-art{width:32px;height:38px;object-fit:contain;flex:none}
.friendship-prize-celebration{border-color:#e0d2e8}
.friendship-prize-card{overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#fff 0%,#faf6fd 70%);padding-top:30px}
.friendship-prize-card h2{font-size:36px;color:#73438e;letter-spacing:-.8px}
.friendship-prize-card .milestone-eyebrow{color:#8a719a}
.friendship-prize-card .milestone-stage{height:175px;margin:8px auto}
.friendship-prize-card .milestone-stage img{width:160px;height:160px}
.friendship-prize-card .milestone-ring{width:145px;height:145px}
.friendship-prize-card .milestone-prize{background:#f3edf8;border-color:#e3d7ec}
.friendship-prize-card .milestone-continue{background:#815a98}
.friendship-prize-card .milestone-continue:hover{background:#6e4785}

/* A profile friendship badge shares the existing points line. */
.profile-friendship-row:has(.profile-friendship-badge){display:flex;align-items:center;flex-wrap:wrap;gap:3px 10px}.profile-friendship-row[hidden]{display:none}
