/* Mobile sign-in and contact journey. Desktop rules remain unchanged. */
html:root.native-mobile body #auth, html:root.native-mobile body #overlay #panel-body .mobile-contact-profile, html:root.native-mobile body #overlay #panel-body .mobile-contact-directory { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; -webkit-font-smoothing: antialiased; }
html:root.native-mobile body #auth.auth-page { background: var(--chat-incoming, #fff); color: var(--chat-ink, #161817); padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); align-items: flex-start; overflow-y: auto; }
html:root.native-mobile body #auth .auth-card { width: 100%; max-width: 440px; margin: 32px auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: inherit; }
html:root.native-mobile body #auth .auth-card .logo { width: 64px; height: 64px; margin: 0 auto 20px; }
html:root.native-mobile body #auth .auth-card .eyebrow { display: none; }
html:root.native-mobile body #auth .auth-card h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.8px; margin: 0 0 10px; text-align: center; }
html:root.native-mobile body #auth-subtitle { text-align: center; font-size: 16px; line-height: 1.5; color: var(--chat-secondary, #65716a); }
html:root.native-mobile body #auth .auth-card .tabs { display: flex; gap: 4px; margin: 24px 0; padding: 4px; background: var(--chat-bar, #f1f3f0); border-radius: 24px; }
html:root.native-mobile body #auth .auth-card .tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 22px; padding: 8px; color: inherit; background: transparent; font-size: 15px; }
html:root.native-mobile body #auth .auth-card .tabs button.active { background: var(--chat-incoming, #fff); box-shadow: 0 1px 4px #0001; font-weight: 600; }
html:root.native-mobile body #auth-form { display: grid; gap: 16px; }
html:root.native-mobile body #auth-form label, html:root.native-mobile body #overlay #panel-body .contact-edit label, html:root.native-mobile body #overlay #panel-body .mobile-contact-form label { display: grid; gap: 8px; font-size: 14px; font-weight: 500; color: var(--chat-ink, #161817); }
html:root.native-mobile body #auth-form input, html:root.native-mobile body #auth-form select, html:root.native-mobile body #overlay #panel-body .contact-edit input, html:root.native-mobile body #overlay #panel-body .contact-edit select, html:root.native-mobile body #overlay #panel-body .contact-edit textarea, html:root.native-mobile body #overlay #panel-body .mobile-contact-form input, html:root.native-mobile body #overlay #panel-body .mobile-contact-directory input { min-height: 48px; min-width: 0; width: 100%; padding: 12px 14px; border: 1px solid var(--chat-border, #d9ded9); border-radius: 14px; background: var(--chat-incoming, #fff); color: var(--chat-ink, #161817); font-size: 16px !important; box-sizing: border-box; }
html:root.native-mobile body #auth-form input:focus-visible, html:root.native-mobile body #overlay #panel-body .mobile-contact-directory input:focus-visible, html:root.native-mobile body #overlay #panel-body .contact-edit input:focus-visible { outline: 2px solid #168d69; outline-offset: 2px; }
html:root.native-mobile body #auth-help { font-size: 14px; line-height: 1.5; color: var(--chat-secondary, #65716a); margin: 0; }
html:root.native-mobile body #auth-form .primary, html:root.native-mobile body #overlay #panel-body .mobile-contact-directory .primary, html:root.native-mobile body #overlay #panel-body .mobile-contact-form .primary, html:root.native-mobile body #overlay #panel-body .contact-edit .primary { min-height: 48px; border-radius: 24px; background: var(--chat-ink, #151917); color: var(--chat-incoming, #fff); border: 0; font-size: 16px; font-weight: 600; padding: 12px 20px; }
html:root.native-mobile body #auth .auth-card.mobile-verifying > :not(form), html:root.native-mobile body #auth .mobile-verifying #auth-form > :not(#otp-inline) { display: none !important; }
html:root.native-mobile body #auth .mobile-otp { display: grid; gap: 16px; text-align: center; border: 0; background: transparent; padding: 0; color: var(--chat-ink, #161817); }
html:root.native-mobile body #auth .mobile-otp .otp-symbol { width: 48px; height: 48px; margin: 12px auto; color: #168d69; }
html:root.native-mobile body #auth .mobile-otp h2 { margin: 0; font-size: 28px; letter-spacing: -.6px; }
html:root.native-mobile body #auth .mobile-otp p { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
html:root.native-mobile body #auth .mobile-otp p { background: transparent; padding: 0; border: 0; box-shadow: none; color: var(--chat-ink); }
html:root.native-mobile body #auth .mobile-otp p.error { color: #bb203d; font-size: 14px; }
html:root.native-mobile body #auth .mobile-otp p.error:empty { display: none; }
html:root.native-mobile body #auth .mobile-otp strong { font-weight: 600; }
html:root.native-mobile body #otp-code { text-align: center; font-size: 24px !important; letter-spacing: 8px; font-variant-numeric: tabular-nums; }
html:root.native-mobile body #auth .mobile-otp button { min-height: 44px; color: var(--chat-ink, #161817); background: transparent; border: 0; border-radius: 24px; font-size: 16px; }
html:root.native-mobile body #auth .mobile-otp small { font-size: 13px; color: var(--chat-secondary, #65716a); line-height: 1.5; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-directory { color: var(--chat-ink); background: var(--chat-incoming); padding: 16px; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-directory .contact-search { display: block; margin: 0 0 16px; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-directory .contact-search input { border: 0; border-radius: 24px; background: var(--chat-bar); }
html:root.native-mobile body #overlay #panel-body .mobile-contact-directory .contact-result, html:root.native-mobile body #overlay #panel-body .mobile-contact-form .contact-result { display: flex; align-items: center; width: 100%; min-height: 72px; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--chat-border); border-radius: 0; background: transparent; color: var(--chat-ink); text-align: left; touch-action: manipulation; }
html:root.native-mobile body #overlay #panel-body .contact-result .avatar { flex: 0 0 44px; width: 44px; height: 44px; font-size: 16px; background: #7960df; color: #fff; }
html:root.native-mobile body #overlay #panel-body .contact-result > span { min-width: 0; flex: 1; }
html:root.native-mobile body #overlay #panel-body .contact-result strong, html:root.native-mobile body #overlay #panel-body .contact-result small { display: block; overflow-wrap: anywhere; }
html:root.native-mobile body #overlay #panel-body .contact-result strong { font-size: 16px; font-weight: 600; }
html:root.native-mobile body #overlay #panel-body .contact-result small { font-size: 13px; line-height: 1.5; color: var(--chat-secondary); }
html:root.native-mobile body #overlay #panel-body .contact-result > b { font-size: 14px; color: #168d69; }
html:root.native-mobile body #overlay #panel-body .contact-result > svg { width: 20px; height: 20px; flex: none; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-shortcuts { display: grid; gap: 4px; margin: 0 0 16px; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-shortcuts button { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 0; background: transparent; border: 0; color: inherit; font-size: 16px; text-align: left; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-shortcuts svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--chat-bar); box-sizing: border-box; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-form { display: grid; gap: 16px; color: var(--chat-ink); }
html:root.native-mobile body #overlay #panel-body .mobile-contact-form small { font-size: 13px; line-height: 1.5; color: var(--chat-secondary); }
html:root.native-mobile body #overlay #panel-body .mobile-contact-profile { color: var(--chat-ink); padding-bottom: 24px; background: var(--chat-bar); }
html:root.native-mobile body #overlay #panel-body .contact-identity { text-align: center; padding: 20px 16px; background: var(--chat-incoming); }
html:root.native-mobile body #overlay #panel-body .contact-identity > .avatar { width: 92px; height: 92px; margin: 0 auto 16px; font-size: 34px; color: #fff; background: #7960df; }
html:root.native-mobile body #overlay #panel-body .contact-identity h2 { margin: 0; font-size: 27px; letter-spacing: -.5px; line-height: 1.2; overflow-wrap: anywhere; }
html:root.native-mobile body #overlay #panel-body .contact-identity p { margin: 8px 0 16px; color: var(--chat-secondary); font-size: 15px; overflow-wrap: anywhere; }
html:root.native-mobile body #overlay #panel-body .contact-primary-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
html:root.native-mobile body #overlay #panel-body .contact-primary-actions button { display: grid; place-items: center; gap: 6px; min-height: 64px; padding: 10px 4px; border: 0; border-radius: 14px; color: var(--chat-ink); background: var(--chat-bar); font-size: 12px; }
html:root.native-mobile body #overlay #panel-body .contact-primary-actions svg { width: 23px; height: 23px; }
html:root.native-mobile body #mobile-contact-content { padding: 0 12px; }
html:root.native-mobile body #overlay #panel-body .contact-section { margin-top: 16px; padding: 0 14px; border-radius: 18px; background: var(--chat-incoming); overflow: hidden; }
html:root.native-mobile body #overlay #panel-body .contact-profile-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--chat-border); border-radius: 0; background: transparent; color: var(--chat-ink); text-align: left; }
html:root.native-mobile body #overlay #panel-body .contact-profile-row:last-child { border-bottom: 0; }
html:root.native-mobile body #overlay #panel-body .contact-profile-row > svg { flex: 0 0 22px; width: 22px; height: 22px; }
html:root.native-mobile body #overlay #panel-body .contact-profile-row > svg:last-child { width: 16px; height: 16px; flex-basis: 16px; color: var(--chat-secondary); }
html:root.native-mobile body #overlay #panel-body .contact-profile-row > span { min-width: 0; flex: 1; }
html:root.native-mobile body #overlay #panel-body .contact-profile-row b { font-size: 16px; font-weight: 400; overflow-wrap: anywhere; }
html:root.native-mobile body #overlay #panel-body .contact-profile-row small { display: block; color: var(--chat-secondary); font-size: 12px; margin-top: 4px; line-height: 1.4; }
html:root.native-mobile body .contact-destructive { color: #bb203d !important; }
html:root.native-mobile[data-theme="dark"] body .contact-destructive, html:root.native-mobile[data-theme="dark"] body #auth .mobile-otp .error { color: #ff9db0 !important; }
html:root.native-mobile body #overlay #panel-body .contact-back { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: 8px 0; background: transparent; border: 0; color: var(--chat-ink); }
html:root.native-mobile body #overlay #panel-body .contact-back svg { width: 20px; height: 20px; }
html:root.native-mobile body #overlay #panel-body .contact-edit { display: grid; gap: 16px; background: var(--chat-incoming); border-radius: 18px; padding: 16px; color: var(--chat-ink); }
html:root.native-mobile body #overlay #panel-body .contact-edit textarea { resize: vertical; min-height: 88px; }
html:root.native-mobile body #overlay #panel-body .contact-edit details { font-size: 14px; }
html:root.native-mobile body #overlay #panel-body .contact-edit summary { min-height: 44px; cursor: pointer; }
html:root.native-mobile body #overlay #panel-body .contact-edit details label { margin-bottom: 12px; }
html:root.native-mobile body #overlay #panel-body .contact-check { display: flex !important; gap: 12px; align-items: center; min-height: 48px; padding: 8px 0; }
html:root.native-mobile body #overlay #panel-body .contact-check input { width: 22px; min-height: 22px; height: 22px; accent-color: #168d69; }
html:root.native-mobile body #overlay #panel-body .contact-security { font-size: 13px; line-height: 1.5; color: var(--chat-secondary); padding: 16px 8px; }
html:root.native-mobile body #overlay #panel-body .contact-empty { display: grid; gap: 12px; padding: 24px 8px; text-align: center; font-size: 15px; line-height: 1.5; color: var(--chat-secondary); }
html:root.native-mobile body .mobile-contact-confirm { position: fixed; inset: 0; z-index: 1000; display: grid; align-items: end; justify-items: center; padding: 16px 16px max(16px,env(safe-area-inset-bottom)); background: #0006; }
html:root.native-mobile body .mobile-contact-confirm section { width: min(100%,440px); border-radius: 24px; padding: 20px; box-sizing: border-box; background: var(--chat-incoming); color: var(--chat-ink); }
html:root.native-mobile body .mobile-contact-confirm h3 { font-size: 20px; margin: 0 0 8px; }
html:root.native-mobile body .mobile-contact-confirm p { color: var(--chat-secondary); font-size: 15px; line-height: 1.5; }
html:root.native-mobile body .mobile-contact-confirm button { display: block; min-height: 48px; width: 100%; border: 0; border-top: 1px solid var(--chat-border); background: transparent; color: inherit; font-size: 16px; }
html:root.native-mobile body :is(.mobile-contact-profile,.mobile-contact-directory,.mobile-contact-form,.auth-card) button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
html:root.native-mobile body :is(.mobile-contact-profile,.mobile-contact-directory,.mobile-contact-form,.auth-card) button:disabled { opacity: .5; cursor: default; }
html:root.native-mobile body :is(.mobile-contact-profile,.mobile-contact-directory,.mobile-contact-form,.auth-card) button:active { filter: brightness(.92); }

html:root.native-mobile body #auth #auth-form .primary { background: var(--chat-ink) !important; color: var(--chat-incoming) !important; -webkit-text-fill-color: var(--chat-incoming) !important; box-shadow: none; }
html:root.native-mobile body #auth .auth-card button { color: var(--chat-ink); }

html:root.native-mobile body #auth h1, html:root.native-mobile body #auth .mobile-otp h2 { font-weight: 650; }
html:root.native-mobile body #auth .mobile-otp p strong { color: var(--chat-ink); -webkit-text-fill-color: var(--chat-ink); overflow-wrap: anywhere; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-directory .contact-search > span { display: none; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-directory :is(#contact-query,#new-contact-query) { background: var(--chat-bar); color: var(--chat-ink); border: 0; border-radius: 24px; padding: 12px 16px; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-directory .contact-search { display: block; width: 100%; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-directory .contact-search::after { display: none; }
html:root.native-mobile body #overlay[data-panel="info"] #panel-body > .panel-content { padding: 0; background: var(--chat-bar); }
html:root.native-mobile body #overlay #panel-body .mobile-contact-profile #mobile-contact-content > h3 { padding: 0 8px; font-size: 22px; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-form .primary::after { content: none; }
html:root.native-mobile body #overlay #panel-body .mobile-contact-form { background: var(--chat-incoming); color: var(--chat-ink); }
html:root.native-mobile body #overlay #panel-body .mobile-contact-form input:focus { outline: 2px solid #168d69; outline-offset: 2px; box-shadow: none; }
html:root.native-mobile body:has(#overlay.navigation-view:is([data-panel="contactsave"],[data-panel="contactgroup"],[data-panel="info"],[data-panel="newchat"],[data-panel="newcontact"]):not(.hidden)) #app:has(#sidebar) #native-mobile-nav { display: none !important; }
html:root.native-mobile body #overlay:is([data-panel="contactsave"],[data-panel="contactgroup"],[data-panel="info"],[data-panel="newchat"],[data-panel="newcontact"]) #panel-body { padding-bottom: max(24px,env(safe-area-inset-bottom)); scroll-padding-bottom: 24px; }
html:root.native-mobile body #overlay #panel-body #group-contact-results { max-height: max(120px,calc(100dvh - 360px)); overflow-y: auto; }
html:root.native-mobile body #overlay #panel-body #mobile-contact-group-form > button { position: sticky; bottom: 8px; }
