.profile-backdrop{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;overflow:auto;padding:clamp(.75rem,3vw,2rem);background:rgba(19,35,28,.62);backdrop-filter:blur(6px)}
.profile-backdrop[hidden],.photo-crop-backdrop[hidden]{display:none!important}.profile-card{position:relative;width:min(100%,560px);max-height:min(92dvh,920px);overflow:auto;margin:auto;padding:clamp(1.1rem,3vw,2rem);border:1px solid rgba(255,255,255,.75);border-radius:20px;background:#fff;box-shadow:0 24px 80px rgba(8,22,14,.28);overscroll-behavior:contain}
.profile-card h2{margin:.2rem 0 .45rem;color:#283b31;font-size:1.45rem}.profile-card label{display:grid;gap:.4rem;margin:.85rem 0;color:#46574e;font-size:.9rem;font-weight:650}.profile-card input:not([type=file]){width:100%;min-height:44px;border:1px solid #d1dcd5;border-radius:10px;padding:.68rem .8rem}.profile-card button{min-height:44px;border-radius:10px}.profile-card .profile-close{position:absolute;top:1rem;right:1rem}.profile-card hr{height:1px;margin:1rem 0;border:0;background:#e5ece7}.profile-notice{padding:.5rem 0;line-height:1.45}.profile-notice.error,.push-status.error{color:#a33c33}.profile-notice.success,.push-status.success{color:#267249}.profile-notice.info,.push-status.info{color:#52655a}.profile-retry{margin:.3rem 0}.photo-field{margin:1rem 0;padding:.85rem;border:1px solid #e1e9e4;border-radius:14px;min-width:0}.photo-field legend{padding:0 .35rem;color:#46574e;font-size:.95rem;font-weight:700}.photo-actions{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}.photo-actions button{white-space:normal}.photo-field small{display:block;margin:.6rem 0;color:#65776d;font-size:.83rem;line-height:1.4}.profile-photo{display:block;width:112px;height:112px;margin:.75rem 0;object-fit:cover;border:2px solid #e5ece7;border-radius:50%;background:#f2f5f3}.text-button{padding:.4rem 0;background:transparent;color:#a33c33;text-decoration:underline}.profile-card #trustedDeviceArea{padding:.85rem;border-radius:12px;background:#f5f8f6}.profile-card #trustedDeviceArea h3{margin:.2rem 0;font-size:1rem;color:#355747}.profile-card #trustedDeviceArea p,.profile-card small{color:#65776d;font-size:.83rem;line-height:1.4}.push-device-row{display:grid;gap:.4rem;margin:.6rem 0;padding:.7rem;border:1px solid #e1e9e4;border-radius:10px;background:#fff;font-size:.83rem}.push-device-row button{justify-self:start;min-height:38px}.photo-crop-backdrop{position:fixed;inset:0;z-index:1400;display:flex;align-items:center;justify-content:center;padding:1rem;background:rgba(11,28,22,.78);backdrop-filter:blur(5px)}.photo-crop-card{width:min(100%,440px);padding:1rem;border-radius:18px;background:#fff;box-shadow:0 20px 70px #0005;text-align:center}.photo-crop-card h3{margin:.25rem 0;color:#263a30}.photo-crop-card p{margin:.35rem 0 .85rem;color:#65736c;font-size:.9rem}.photo-crop-card canvas{display:block;width:min(100%,360px);aspect-ratio:1;margin:0 auto;border-radius:14px;background:#132f28;touch-action:none;cursor:grab}.photo-crop-card canvas:active{cursor:grabbing}.photo-crop-card .crop-zoom{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.75rem;margin:.8rem 0;color:#46574e;font-size:.9rem}.photo-crop-card .crop-zoom input{width:100%;padding:0}.crop-actions{display:flex;gap:.65rem}.crop-actions button{flex:1}
.recovery-trigger{display:block;width:100%;margin-top:.55rem}.recovery-actions{display:flex;flex-wrap:wrap;gap:.65rem;margin-top:.5rem}.recovery-actions button{flex:1 1 220px}.recovery-card #recoveryMessage{padding:.75rem;border-radius:9px;background:#f2f6f3;color:#43584b;line-height:1.5}.recovery-card form[hidden]{display:none}
@media(max-width:520px){.profile-card{max-height:calc(100dvh - 1.25rem);padding:1rem;border-radius:16px}.photo-actions{grid-template-columns:1fr 1fr}.profile-card .profile-close{position:static;float:right;margin:0 0 .4rem .5rem}.photo-crop-card{padding:.8rem}.photo-crop-card canvas{width:min(100%,320px)}}

/* Photo editor modal title bar and native-style close control. */
.photo-crop-card{position:relative;max-height:min(92dvh,900px);overflow:auto;padding:0 1rem 1rem;overscroll-behavior:contain}.photo-crop-heading{position:sticky;top:0;z-index:5;display:flex;align-items:center;min-height:52px;margin:0 -1rem .8rem;padding:10px 58px 10px 16px;border-bottom:1px solid #d9e5dc;border-radius:18px 18px 0 0;background:linear-gradient(135deg,#edf5ef,#f7faf8);text-align:left}.photo-crop-heading h3{margin:0;color:#294b39;font-size:1rem}.photo-crop-close{position:absolute;top:0;right:0;display:grid;place-items:center;width:46px;height:36px;min-height:36px;padding:0;border:0;border-left:1px solid #e5e9e6;border-bottom:1px solid #e5e9e6;border-radius:0 18px 0 8px;background:#fff;color:#44534b;font:400 23px/1 "Segoe UI",Arial,sans-serif}.photo-crop-close:hover{background:#e81123;color:#fff;border-color:#e81123}
@media(max-width:520px){.photo-crop-card{max-height:calc(100dvh - 1.25rem);padding:0 .8rem .8rem}.photo-crop-heading{margin:0 -.8rem .7rem;padding-left:13px}.photo-crop-close{width:42px;height:34px;min-height:34px}}
