/* Shared popup geometry and the app's existing dark/green design tokens. */
html.urban-dialog-open{overflow:hidden;overscroll-behavior:none}
.urban-message-dialog,.urban-modal{box-sizing:border-box;color:#f1f6f3;background:#131a16;border:1px solid #2b3730;border-radius:12px;box-shadow:0 24px 80px #0009;font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;padding:0;max-width:calc(100vw - 32px);max-height:calc(var(--urban-dialog-height,100dvh) - 32px);margin:auto;overflow:hidden}
.urban-message-dialog::backdrop,.urban-modal::backdrop{background:rgba(0,0,0,.75)}
.urban-message-dialog:not([open]),.urban-modal:not([open]){display:none!important}
.urban-message-dialog[open]{display:flex;width:440px}
.urban-message-dialog *,.urban-modal *{box-sizing:border-box}
.urban-dialog-form{display:flex;flex-direction:column;width:100%;min-height:0;max-height:inherit;margin:0;padding:0}
.urban-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px 12px;flex-shrink:0}
.urban-dialog-header h2{font-size:22px;font-weight:700;line-height:1.2;letter-spacing:-.3px;margin:0;overflow-wrap:anywhere}
.urban-dialog-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:-8px -10px -8px 0;padding:0;border:0;border-radius:8px;background:transparent;color:#a8b7ae;font:30px/1 Arial,sans-serif;cursor:pointer}
.urban-dialog-body{padding:0 20px;overflow:auto;overscroll-behavior:contain;min-height:0;overflow-wrap:anywhere;scrollbar-gutter:stable}
.urban-dialog-body p{margin:0;white-space:pre-wrap;color:#a8b7ae}
.urban-dialog-input{display:block;width:100%;min-height:46px;margin-top:16px;background:#090d0b;color:#f1f6f3;border:1px solid #2b3730;border-radius:8px;padding:10px 12px;font:inherit}
.urban-message-dialog [hidden]{display:none!important}
.urban-dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding:20px;flex-shrink:0;margin:0}
.urban-dialog-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;min-width:90px;padding:10px 18px;border:1px solid transparent;border-radius:8px;font:650 15px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;cursor:pointer;margin:0;white-space:normal}
.urban-dialog-primary{color:#03130a;background:#00e676}
.urban-dialog-secondary{color:#f1f6f3;background:transparent;border-color:#42544a}
.urban-dialog-danger{background:#ffb4ac;color:#320903}
.urban-message-dialog :is(button,input):focus-visible,.urban-modal :is(button,a,input,select,textarea):focus-visible{outline:3px solid #00e676;outline-offset:3px}
.urban-message-dialog button:hover{filter:brightness(1.08)}
.urban-modal[open]{display:flex;flex-direction:column;width:620px;inset:0;height:fit-content}
.urban-modal .urban-modal-header,.urban-modal .urban-modal-footer{flex:0 0 auto;padding:16px 20px}
.urban-modal .urban-modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.urban-modal .urban-modal-header h2,.urban-modal .urban-modal-header h3{margin:0;font-size:22px;line-height:1.2;letter-spacing:-.3px}
.urban-modal .urban-modal-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:0 20px 20px}
@media(max-width:480px){.urban-message-dialog,.urban-modal{max-width:calc(100vw - 24px);max-height:calc(var(--urban-dialog-height,100dvh) - 24px)}.urban-dialog-header{padding:16px 16px 12px}.urban-dialog-body{padding:0 16px}.urban-dialog-actions{padding:18px 16px}.urban-dialog-actions .urban-dialog-button{flex:1;min-width:0}.urban-dialog-header h2{font-size:21px}.urban-modal .urban-modal-header,.urban-modal .urban-modal-footer{padding:16px}.urban-modal .urban-modal-scroll{padding:0 16px 16px}}
@media(prefers-reduced-motion:reduce){.urban-message-dialog,.urban-modal,.urban-message-dialog *,.urban-modal *{animation:none!important;transition:none!important}}
/* Patch details have one content scroller, with title/actions always reachable. */
#patchModal.urban-modal{width:560px;padding:0;background:#131a16;color:#f1f6f3;border:1px solid #2b3730;box-shadow:0 24px 80px #0009}
#patchModal #claimForm{display:flex;flex-direction:column;min-height:0;overflow:hidden;margin:0}
#patchModal #modalImg{display:block;width:160px;max-width:60%;max-height:min(24vh,200px);height:auto;object-fit:contain;margin:0 auto 18px;border-radius:8px}
#patchModal #modalTitle{color:#f1f6f3;overflow-wrap:anywhere}
#patchModal :is(#modalDesc,#modalXP,#modalRequire,#proofWrapper){font-size:15px;line-height:1.5;overflow-wrap:anywhere}
#patchModal #modalDesc{margin-top:12px;color:#a8b7ae}
#patchModal #modalXP{color:#00e676}
#patchModal #modalRequire{margin-top:12px}
#patchModal #proofWrapper p{margin:14px 0}
#patchModal #proofWrapper button{min-height:44px;border-radius:8px;box-shadow:none;color:#03130a;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;margin:0 8px 8px 0}
#patchModal .urban-modal-footer{display:flex;justify-content:flex-end;border-top:1px solid #2b3730}
#patchModal .urban-modal-footer:has(button[style*="display: none"]){display:none}
/* All profile variants show uncropped media and a reachable 44px close button. */
#lightbox-overlay.urban-image-dialog{width:1100px;height:fit-content;inset:0;padding:52px 12px 12px;opacity:1;background:#090d0b;overflow:hidden;align-items:center;justify-content:center;transition:none}
#lightbox-overlay.urban-image-dialog[open]{display:flex}
#lightbox-overlay.urban-image-dialog img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(var(--urban-dialog-height,100dvh) - 100px);object-fit:contain;border-radius:6px;box-shadow:none;transform:none;transition:none}
#lightbox-overlay.urban-image-dialog #lightbox-close{top:4px;right:4px;width:44px;height:44px;min-height:44px;border:0;border-radius:8px;color:#f1f6f3;background:transparent;font-size:28px;transform:none;box-shadow:none;backdrop-filter:none}
/* The cropper gets a measured stage, not an image-sized parent taller than a phone. */
#cropper-modal.urban-modal{width:820px;padding:0;background:#131a16;border:1px solid #2b3730;overflow:hidden}
#cropper-modal #cropper-message{flex:0 0 auto;margin:0;padding:0 20px 14px;color:#a8b7ae;font-size:15px;line-height:1.4}
#cropper-modal .urban-crop-stage{position:relative;flex:0 1 auto;min-height:90px;height:min(calc(var(--urban-dialog-height,100dvh) - 240px),480px);margin:0 20px;overflow:hidden;background:#090d0b;border:1px solid #2b3730;border-radius:8px}
#cropper-modal .urban-crop-stage>img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;margin:auto}
#cropper-modal .cropper-container{max-width:100%;max-height:100%;font-size:0}
#cropper-modal .urban-modal-footer{flex-shrink:0}
#google-modal.urban-modal{width:440px;height:fit-content;padding:0;inset:0;background:#131a16;text-align:left}
#google-modal.urban-modal[open]{display:flex}
@media(max-width:480px){#cropper-modal #cropper-message{padding:0 16px 12px}#cropper-modal .urban-crop-stage{margin:0 16px}#cropper-modal .urban-modal-footer button{flex:1}}
.urban-scanner-dialog.urban-modal{width:540px;padding:0;background:#131a16}
.urban-scanner-dialog .video-box{width:100%;height:auto;aspect-ratio:1;max-height:min(55vh,420px);overflow:hidden;border-radius:8px;background:#090d0b}
.urban-scanner-dialog video{display:block;width:100%;height:auto;max-height:min(55vh,420px);object-fit:contain;border-radius:8px;background:#090d0b}
.urban-scanner-dialog .cam-controls{display:flex;gap:10px;margin-top:14px;align-items:center}
.urban-scanner-dialog .cam-controls select{flex:1;min-width:0;min-height:44px;font-size:16px;background:#090d0b;color:#f1f6f3;border:1px solid #2b3730;border-radius:8px;padding:8px}
.urban-scanner-dialog .cam-controls button{width:44px;height:44px;flex:0 0 44px;margin:0}
/* Existing page-specific/global form rules must not recolor confirmation UI. */
#urban-message-dialog .urban-dialog-button,dialog.urban-modal button.urban-dialog-button{min-height:46px;font:650 15px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;box-shadow:none;text-shadow:none}
#urban-message-dialog .urban-dialog-close,dialog.urban-modal button.urban-dialog-close{min-height:44px;width:44px;height:44px;min-width:44px;font-size:30px;line-height:1;padding:0;border:0;background:transparent;color:#a8b7ae;box-shadow:none}
#urban-message-dialog .urban-dialog-primary{background:#00e676;border-color:transparent;color:#03130a}
#urban-message-dialog .urban-dialog-secondary{background:transparent;border-color:#42544a;color:#f1f6f3}
#urban-message-dialog .urban-dialog-danger{background:#ffb4ac;color:#320903}
#urban-message-dialog .urban-dialog-input{font:400 16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:#090d0b;color:#f1f6f3}
/* Avatar, location and voucher viewers never crop or stretch their originals. */
#avatarLightbox.urban-avatar-dialog{width:560px;inset:0;padding:52px 20px 20px;background:#131a16;opacity:1;visibility:visible;pointer-events:auto;backdrop-filter:none;transition:none}
#avatarLightbox.urban-avatar-dialog[open]{display:flex}
.urban-avatar-dialog .urban-avatar-content{display:flex;flex-direction:column;gap:16px;align-items:center;min-height:0;overflow:auto;overscroll-behavior:contain}
.urban-avatar-dialog .urban-avatar-content img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(var(--urban-dialog-height,100dvh) - 180px);object-fit:contain;border-radius:8px}
#avatarLightbox.urban-avatar-dialog>.urban-dialog-close{position:absolute;right:8px;top:8px;margin:0}
.urban-avatar-dialog #avatarProfileLink{min-height:44px;margin:0;flex-shrink:0;align-self:stretch;text-align:center;border-radius:8px}
#lightbox.urban-location-dialog{width:1100px;inset:0;padding:52px 52px 16px;background:#090d0b;opacity:1;visibility:visible;pointer-events:auto;align-items:center;justify-content:center;transition:none}
#lightbox.urban-location-dialog img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(var(--urban-dialog-height,100dvh) - 120px);object-fit:contain;border-radius:6px}
#lightbox.urban-location-dialog .urban-dialog-close{position:absolute;right:8px;top:8px;margin:0}
#lightbox.urban-location-dialog :is(.prev,.next){position:absolute;top:50%;width:44px;height:44px;min-height:44px;padding:0;border:1px solid #42544a;border-radius:8px;background:#131a16;color:#f1f6f3;font-size:24px;transform:translateY(-50%)}
#lightbox.urban-location-dialog .prev{left:4px}#lightbox.urban-location-dialog .next{right:4px}
.urban-voucher-dialog.urban-modal{width:440px}
.urban-voucher-dialog #qrImg{display:block;width:min(100%,300px);height:auto;max-width:100%;max-height:calc(var(--urban-dialog-height,100dvh) - 150px);object-fit:contain;margin:auto;background:white;padding:8px;border-radius:8px}
#dmPopup.urban-dm-dialog{width:600px;height:min(680px,calc(var(--urban-dialog-height,100dvh) - 32px));padding:0;inset:0;background:#131a16}
#dmPopup.urban-dm-dialog .urban-modal-header{gap:8px}#dmPopup.urban-dm-dialog .urban-modal-header h2{flex:1}
#dmPopup.urban-dm-dialog .dm-frame{display:block;flex:1;min-height:0;width:100%;height:auto;border:0}
#dmIcon.dm-icon{width:44px;height:44px;min-height:44px}
.urban-modal [hidden]{display:none!important}
.urban-home-prompt.urban-modal{width:520px;padding:0;visibility:visible;opacity:1}
.urban-home-prompt .urban-home-prompt-content{position:relative;padding:52px 24px 24px;overflow:auto;min-height:0;overscroll-behavior:contain;text-align:left}
.urban-home-prompt .urban-home-prompt-content :is(h3,p){margin:0 0 16px;overflow-wrap:anywhere}
.urban-home-prompt .urban-home-prompt-content h3{font-size:22px;line-height:1.2;color:#f1f6f3}
.urban-home-prompt .urban-home-prompt-content p{font-size:16px;line-height:1.5;color:#a8b7ae}
.urban-home-prompt .close-btn{position:absolute;top:6px;right:6px;display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;font-size:28px;background:transparent;border:0;color:#a8b7ae}
.urban-home-prompt .btn-group{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin:18px 0 0}
.urban-home-prompt .btn-group :is(button,a){min-height:44px;border-radius:8px;flex:1;margin:0;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:15px}
.urban-notice-dialog.urban-modal{width:500px}.urban-notice-dialog #popupText{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#a8b7ae}
.urban-notice-dialog #popupInput{display:block;width:100%;min-height:46px;margin-top:16px;font-size:16px}
.urban-admin-dialog.urban-modal{width:900px;padding:0;background:#131a16;color:#f1f6f3}
.urban-admin-dialog .urban-admin-modal-layout{display:flex;flex-direction:column;max-height:inherit;min-height:0;overflow:hidden}
.urban-admin-dialog .urban-modal-header{margin:0;border-bottom:1px solid #2b3730}
.urban-admin-dialog .urban-modal-header h3{font-size:22px;overflow-wrap:anywhere}
.urban-admin-dialog .modal-body.urban-modal-scroll{padding-top:20px;gap:18px}
.urban-admin-dialog .modal-section{padding:16px;border:1px solid #2b3730;border-radius:8px;background:#090d0b;min-width:0}
.urban-admin-dialog .modal-section :is(input,select,textarea){max-width:100%;min-width:0}
.urban-admin-dialog .modal-section :is(p,label,span){overflow-wrap:anywhere}
.urban-admin-dialog .modal-section.danger{border-color:#80534d;background:#281b19}
.urban-admin-dialog .profile-preview{max-width:100%;overflow:hidden}
.urban-admin-dialog .profile-banner{max-width:100%;max-height:180px;object-fit:contain}
.urban-admin-dialog .profile-photo{max-width:100%;max-height:140px;object-fit:contain}
