/* Shared phone / tablet refinements for the existing portal surfaces. */
:root{--touch-size:44px}html{scrollbar-gutter:stable}input,select,textarea{max-width:100%;min-width:0}button,a{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #e7a147;outline-offset:3px}.contact-options{grid-template-columns:repeat(2,minmax(0,1fr))}.contact-option{display:flex;flex-direction:column}.contact-option p{margin-top:0}.contact-option .consult-button{align-self:flex-start}.inline-ad-qr{gap:16px;align-items:center}.ad-promotion-actions{min-width:116px}.ad-promotion-actions>*{margin:0}.image-viewer-tools{flex-wrap:wrap}.image-viewer-content{min-height:0}.image-picker input::file-selector-button{min-height:44px;padding:8px 12px;margin-right:8px;border:1px solid #bfd3db;border-radius:8px;background:white;color:#086b83;font:inherit}.dialog,.content-card,.activitycard,.externalactivity{overflow-wrap:anywhere}.dialog form>.primary,.dialog form>button[type=submit]{min-height:44px}.contact-options label{font-size:16px;line-height:1.6}.dialog input[type=checkbox],.profile-editor input[type=checkbox]{width:22px;height:22px;min-height:22px;display:inline-block;vertical-align:middle;margin:0 8px 0 0;accent-color:#086b83}.portal-gallery:has(>.portal-image:only-child){grid-template-columns:minmax(0,320px)}
@media(min-width:761px) and (max-width:1100px){.layout{grid-template-columns:minmax(0,1fr)}.layout>aside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.activitycards{grid-template-columns:repeat(2,minmax(0,1fr))}.businessgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.nav{height:auto;min-height:52px;flex-wrap:wrap;justify-content:flex-start;column-gap:22px;row-gap:0}.nav button{min-height:46px}.top{gap:14px}.dialog{width:min(680px,calc(100vw - 48px))}.content-grid{gap:16px}main{padding:24px}.quick{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px 12px}}
@media(max-width:760px){button,.button,.consult-button,.promotion-secondary{min-height:44px}input:not([type=checkbox]),textarea,select{font-size:16px!important}.dialog{max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overscroll-behavior:contain;scroll-padding-bottom:24px}.modal{padding:16px}.dialog form{min-width:0}.ad-promotion{gap:10px}.ad-promotion .ad-card-qr{width:88px;height:88px}.consult-button{padding:10px 16px}.inline-ad-qr{flex-wrap:nowrap;gap:14px}.inline-ad-qr img{width:108px;height:108px;flex-shrink:0}.ad-promotion-actions{min-width:108px;gap:10px}.content-hero{padding:20px 0}main{padding:16px}.content-card{padding:18px}.content-card dl{margin:18px 0}.content-card .actions>*{flex:1 1 auto;text-align:center}.image-previews{grid-template-columns:repeat(3,minmax(0,1fr))}.image-preview button{min-height:40px}.portal-gallery{gap:8px}.portal-image img{height:160px}.image-viewer-tools a{display:inline-flex;align-items:center;min-height:44px}.image-viewer-tools .image-download{margin:0}.voice-controls{gap:8px}.voice-controls audio{width:100%}.voice-controls #voice-status{flex:1;min-width:100px;font-size:14px}.business-community .review-form button{width:100%}.event-actions{display:flex;flex-wrap:wrap;gap:8px}.event-actions button{flex:1 1 130px;margin:0}.event-actions p{flex-basis:100%}}
@media(max-width:640px){.contact-options{grid-template-columns:minmax(0,1fr);gap:12px}.contact-options>label{margin:6px 0}.contact-option{padding:16px}.content-card .actions{gap:8px}.content-card h2{font-size:20px}.content-hero h1{font-size:clamp(25px,7vw,30px)}}
@media(max-width:360px){.inline-ad-qr{gap:10px}.inline-ad-qr img{width:88px;height:88px}.ad-promotion .ad-card-qr{width:76px;height:76px}.ad-promotion .consult-button{padding:9px 12px}.ad-promotion-actions{min-width:100px}.ad-promotion-actions>*{padding:9px 10px}.image-previews{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Let the chat occupy the available space, including a banner and safe areas. */
body:has(#sendform){display:flex;flex-direction:column;height:100dvh;overflow:hidden;padding:0}body:has(#sendform)>header{flex:0 0 auto;padding-top:max(8px,env(safe-area-inset-top))}body:has(#sendform)>div{flex-shrink:0}body:has(#sendform) #app{flex:1;min-height:0;height:auto}body:has(#sendform) #auth{overflow:auto;min-height:0}body:has(#sendform) #conversation,body:has(#sendform) #active{min-height:0}body:has(#sendform) #history{overflow-y:auto;overflow-x:hidden}#sendform{flex-shrink:0;max-height:52dvh;overflow:auto;overscroll-behavior:contain}#sendform textarea{font-size:16px;min-height:50px}#sendform .image-select{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0}#sendform .image-select input{flex:1;min-width:160px;width:auto;margin:0}#sendform .image-picker{padding:8px}#sendform .voice-controls button{min-height:44px}#sendform .image-upload-status:empty{display:none}.msg audio{max-width:100%}.chathead h2{font-size:20px}.chathead>div{min-width:0}
@media(min-width:701px) and (max-width:1100px){#app{grid-template-columns:260px minmax(0,1fr)}#sidebar{padding:16px}.chathead{padding:14px}#history{padding:16px}#sendform{padding:12px}}
@media(max-width:700px){body:has(#sendform) header{min-height:60px;height:auto;flex-wrap:wrap}body:has(#sendform) #identity{font-size:13px;max-width:110px}.chathead h2{font-size:18px}#sendform{padding:8px 12px calc(8px + env(safe-area-inset-bottom));gap:7px}#sendform .image-select{font-size:14px}#sendform .image-select input{font-size:14px!important}#sendform>small{line-height:1.5}#sendform .image-previews{grid-template-columns:repeat(3,minmax(0,1fr))}#sendform .image-preview img{height:48px}.msg .portal-gallery{width:min(100%,300px)}.msg .portal-image img{height:150px}.chathead #members,.chathead #back{min-height:44px;padding:8px 12px}}
@media(max-height:500px) and (max-width:1000px){#sendform>small{display:none}#sendform .image-picker{padding:4px 8px}#sendform .voice-controls button{min-height:36px;padding:6px 12px}.chathead{padding:6px 12px}.dialog{max-height:calc(100dvh - 16px)}}

/* The icon and bilingual name occupy separate layout boxes. */
.top>.brand{display:inline-flex;align-items:center;gap:10px;flex-shrink:0;line-height:1;text-decoration:none;letter-spacing:0}.top>.brand .mark{display:grid;place-items:center;width:48px;height:48px;padding:0;margin:0;border-radius:13px;font-size:32px;line-height:1;flex-shrink:0}.top>.brand .brand-copy{display:flex;flex-direction:column;gap:7px;min-width:0}.top>.brand .brand-name{font-size:28px;line-height:1;font-weight:850;letter-spacing:2px}.top>.brand small{display:block;margin:0;font-size:9px;line-height:1.2;letter-spacing:1.4px;white-space:nowrap}@media(max-width:760px){.top>.brand{gap:7px}.top>.brand .mark{width:40px;height:40px;border-radius:11px;font-size:27px}.top>.brand .brand-name{font-size:23px;letter-spacing:1px}.top>.brand .brand-copy{gap:5px}.top>.brand small{font-size:7px;letter-spacing:.8px}}@media(max-width:359px){.top>.brand{gap:6px}.top>.brand .mark{width:36px;height:36px;font-size:25px}.top>.brand .brand-name{font-size:21px}.top>.brand small{font-size:6px;letter-spacing:.6px}}
@media(min-width:761px) and (max-width:1100px){header .top{height:auto;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:12px;padding:16px 0}header .top>.brand{grid-column:1;grid-row:1}header .top>.muted{grid-column:2;grid-row:1;white-space:nowrap}header .top>.desktopshortcut{grid-column:3;grid-row:1;margin:0;white-space:nowrap}header .top>.primary{grid-column:4;grid-row:1;white-space:nowrap}header .top>.city-picker{grid-column:1/-1;grid-row:2;width:100%;min-width:0;gap:16px}header .top>.city-picker .city{flex:1;min-width:0}header .top>.spacer{display:none}}
body:has(#sendform) #app{padding:0;margin:0;max-width:none;width:100%}body:has(#sendform) #auth{width:100%;margin:0;max-width:none;padding:0}
@media(max-width:760px){.mobilebar button{padding:2px 0;white-space:nowrap}.mobilebar button span{white-space:normal}}
@media(min-width:761px) and (max-width:1100px){header .nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0 8px}header .nav button{min-height:48px;white-space:nowrap}}

#govlinks[hidden],#govhint[hidden]{display:none!important}

.activity-card-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:10px;width:100%;margin-top:14px}.activity-card-actions>button{display:flex;align-items:center;justify-content:center;min-width:0;max-width:100%;width:100%;min-height:46px;margin:0;padding:11px 12px;border:1px solid transparent;border-radius:9px;font-family:inherit;font-size:16px;font-weight:650;line-height:1.5;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}.activity-card-actions>.primary{background:#ed7548;color:white}.activity-card-actions>.consult-button{background:#086b83;color:white}.activity-card-actions>.consult-button:hover{background:#07596c}
.activitycard .activity-card-actions>button{height:auto;min-height:48px;margin:0;font-size:16px}

.activity-info-invite{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0}.activity-info-invite>p{flex:1;min-width:0;margin:0;overflow-wrap:anywhere}.activity-invite-qr{display:flex;align-items:center;flex-direction:column;gap:5px;flex:0 0 112px;color:#086b83;font-size:12px;text-align:center}.activity-invite-qr img{display:block;width:112px;height:112px;background:white;border:1px solid #dce7eb;border-radius:6px;image-rendering:pixelated}.activity-invite-qr span{line-height:1.5}@media(max-width:360px){.activity-invite-qr{flex-basis:96px}.activity-invite-qr img{width:96px;height:96px}.activity-info-invite{gap:8px}}

.layout{align-items:start}.layout>div>.panel:last-child{margin-bottom:24px}

#consult-login-tip{width:min(92vw,460px);border:1px solid #d3e3e9;border-radius:16px;padding:24px;color:#123342;font:16px/1.7 system-ui}#consult-login-tip::backdrop{background:#12334266}.consult-tip-actions{display:flex;gap:10px;flex-wrap:wrap}.consult-tip-actions button{min-height:44px;padding:10px 15px;border-radius:9px}.consult-tip-actions [data-login]{border:1px solid #086b83;background:white;color:#086b83}.consult-tip-actions [data-dismiss]{background:#edf3f5;color:#587580;border:0}#sendform{grid-template-columns:minmax(0,1fr) auto;align-items:end}.composer-actions{display:flex;align-items:center;gap:8px}.composer-actions>button{min-height:48px;min-width:54px;padding:10px;border:1px solid #bfd3db;border-radius:9px;white-space:nowrap;font-size:16px}.composer-actions>#send{background:#086b83;color:white;border-color:#086b83}#sendform .chat-image-picker:has(.image-previews:empty):has(.image-upload-status:empty){display:none}#sendform .chat-image-picker .image-select{display:none}#sendform .voice-controls:not(:has(audio:not([hidden]))):not(:has(#voice-status:not(:empty))){display:none}#sendform .voice-controls{grid-column:1/-1}#sendform .chat-image-picker{grid-column:1/-1}#sendform #message{grid-column:1;grid-row:auto}#sendform .composer-actions{grid-column:2}#sendform>small{grid-column:1/-1}#sendform:has(.voice-controls #voice-preview:not([hidden])) .voice-controls{display:flex}@media(max-width:600px){#sendform #message{grid-column:1/-1}.composer-actions{grid-column:1/-1!important;justify-content:flex-end}.composer-actions>button{min-height:44px;min-width:60px}#sendform{gap:7px}}

body:has(#sendform) header>.chat-home-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid #c9dfe4;border-radius:9px;line-height:1.4;flex-shrink:0}body:has(#sendform) header>a:first-child{min-height:44px;display:inline-flex;align-items:center}#voice-status:not(:empty){overflow-wrap:anywhere}@media(max-width:380px){body:has(#sendform) header{gap:6px;padding-left:10px;padding-right:10px}body:has(#sendform) header>.chat-home-link{padding:8px;font-size:15px!important}body:has(#sendform) #identity{max-width:68px}.composer-actions{gap:7px}}
@media(max-width:700px){body:has(#sendform)>header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;padding-left:12px;padding-right:12px}body:has(#sendform)>header #identity{display:none}body:has(#sendform)>header>.chat-home-link{justify-self:start}body:has(#sendform)>header #logout{min-height:44px;min-width:0;padding:8px 10px;font-size:14px;white-space:nowrap}}

.chat-contact-group{border:1px solid #dbe7eb;border-radius:10px;margin:12px 0;overflow:hidden;background:#fff}.chat-contact-group summary{display:flex;align-items:center;gap:9px;min-height:46px;padding:10px 12px;cursor:pointer;list-style:none;background:#f1f7f9;font-weight:650;color:#123342}.chat-contact-group summary::-webkit-details-marker{display:none}.chat-contact-group summary:before{content:'›';font-size:24px;line-height:1;transform:rotate(0deg);transition:transform .15s}.chat-contact-group[open] summary:before{transform:rotate(90deg)}.chat-contact-group summary small{color:#647d89;font-size:13px;font-weight:400}.group-unread{margin-left:auto;padding:1px 7px;border-radius:12px;background:#df303c;color:white;font-size:12px}.contact-conversation-row{display:flex;align-items:center;gap:4px;padding-right:7px;min-width:0}.contact-conversation-row .conversation{flex:1;min-width:0;margin:3px 0;padding:12px 9px}.contact-conversation-row .friend-action{flex-shrink:0;min-height:40px;max-width:64px;padding:6px 8px;font-size:13px;line-height:1.4;background:#edf6f8;color:#086b83;border:1px solid #c8dfe5;border-radius:7px}.contact-group-empty{padding:12px;margin:0;font-size:14px;color:#6b818c;line-height:1.6}.chat-contact-group summary:focus-visible{outline:3px solid #e7a147;outline-offset:-3px}@media(max-width:700px){.contact-conversation-row .friend-action{min-height:44px}.chat-contact-group summary{min-height:48px}}

.contact-avatar{position:relative;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;margin-left:7px;padding:0;overflow:hidden;border:1px solid #cce0e6;border-radius:12px;background:#e5f1f4;color:#086b83;font-size:20px;font-weight:700;cursor:pointer}.contact-avatar img,.profile-avatar-large img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.contact-avatar-static{cursor:default;font-size:18px}.contact-conversation-row .conversation{padding-left:6px}.contact-conversation-row .conversation strong{font-size:15px}.contact-conversation-row .friend-action{padding-left:6px;padding-right:6px;font-size:12px;max-width:56px}#contact-profile-dialog{width:min(92vw,440px);max-height:85dvh;border:1px solid #c9dfe4;border-radius:16px;padding:24px;overflow:auto;color:#123342;background:white;font:16px/1.7 system-ui}#contact-profile-dialog::backdrop{background:#12334266}.contact-profile-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.contact-profile-head h2{margin:0;font-size:21px}.contact-profile-head button{min-height:44px;padding:8px 12px;border:1px solid #c9dfe4;border-radius:9px;background:#f1f7f9;color:#086b83;font:inherit}.profile-avatar-large{position:relative;display:grid;place-items:center;width:84px;height:84px;margin:20px 0 12px;border:1px solid #c9dfe4;border-radius:22px;background:#e5f1f4;color:#086b83;font-size:36px;font-weight:700;overflow:hidden}#contact-profile-dialog h3{margin:8px 0;font-size:22px;overflow-wrap:anywhere}#contact-profile-dialog h4{margin-bottom:8px}.contact-profile-bio{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:0}@media(max-width:700px){#contact-profile-dialog{padding:20px}.contact-avatar{flex-basis:46px;width:46px;height:46px}.contact-conversation-row .friend-action{min-width:48px;min-height:44px}}

.contact-profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}.contact-profile-actions button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:46px;padding:10px 12px;border:1px solid #086b83;border-radius:10px;font:600 16px/1.5 system-ui;cursor:pointer}.contact-profile-actions [data-profile-friend]{background:#edf6f8;color:#086b83}.contact-profile-actions [data-profile-message]{background:#086b83;color:white}.contact-profile-actions button:focus-visible{outline:3px solid #e7a147;outline-offset:3px}.contact-profile-status{margin:10px 0 0;font-size:14px;overflow-wrap:anywhere;color:#426572}.contact-profile-status:empty{display:none}@media(max-width:360px){.contact-profile-actions{gap:8px}.contact-profile-actions button{padding:10px 8px}}

.activitycard{display:flex;flex-direction:column;min-width:0}.activity-card-qr{margin-top:auto;padding-top:12px;margin-bottom:0;display:flex;justify-content:flex-start}.activity-card-qr .activity-invite-qr{flex:0 0 auto;align-items:flex-start;max-width:100%;width:auto}.activity-card-qr .activity-invite-qr img{width:120px;height:120px}.activity-card-qr .activity-invite-qr span{font-size:12px;color:#587580;text-align:left}.activitycard .activity-card-actions{margin-top:14px}@media(max-width:600px){.activity-card-qr .activity-invite-qr img{width:112px;height:112px}}

/* Keep invitation codes and actions in separate, bounded rows on every device. */
.activitycards{min-width:0}.activitycard{box-sizing:border-box;max-width:100%}.activity-card-qr{position:static;flex:0 0 auto;min-width:0;max-width:100%;box-sizing:border-box;clear:both}.activity-card-qr .activity-invite-qr{min-width:0;box-sizing:border-box;white-space:normal}.activity-card-qr .activity-invite-qr img{max-width:100%;height:auto;aspect-ratio:1;box-sizing:border-box;flex-shrink:0}.activity-card-qr .activity-invite-qr span{max-width:100%;overflow-wrap:anywhere}.activitycard .activity-card-actions{position:static;flex:0 0 auto;min-width:0;max-width:100%;box-sizing:border-box;gap:10px;margin-top:16px}.activitycard .activity-card-actions>button{box-sizing:border-box;min-width:0;max-width:100%;height:auto;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1100px){.activitycards{grid-template-columns:repeat(2,minmax(0,1fr))}.activitycard .activity-card-actions{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){.activitycards{grid-template-columns:minmax(0,1fr)}.activity-card-qr{padding-top:10px}.activitycard .activity-card-actions{margin-top:16px}.activitycard .activity-card-actions>button{min-height:48px}}
