/* Compact, flat address book; inherits the portal's dark and white-blue palettes. */
.address-book,.ab-sheet{--ab-soft:var(--surface-2,#202023);--ab-line:var(--border,#303034);--ab-color:var(--accent,#c1ff35);--ab-tint:var(--accent-soft,#283019);color:var(--text);font-size:14px}
.address-book{padding:1px 2px 20px;min-height:55vh}
.address-book svg,.ab-sheet svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
body.ui-polished .address-book button,body.ui-polished .ab-sheet button{box-shadow:none!important;translate:none}
.address-book button,.ab-sheet button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.address-book button:focus-visible,.ab-sheet button:focus-visible,.ab-picker-row:focus-within{outline:2px solid var(--ab-color);outline-offset:3px}
body .ab-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;margin:0 0 22px;border:1px solid var(--ab-line);border-radius:17px;background:var(--ab-soft)}
body .ab-tabs button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:43px;padding:10px 5px;border:1px solid transparent;border-radius:12px;color:var(--muted);background:none;font-size:13px;font-weight:550;line-height:1.3}
body .ab-tabs button svg{width:17px;height:17px;opacity:.85}
body .ab-tabs button.active{color:var(--text);background:var(--surface,#171719);border-color:var(--ab-line);box-shadow:0 2px 5px #00000008!important}
body .ab-tabs button.active svg{color:var(--ab-color);opacity:1}
.ab-pane{min-width:0}
.ab-search{display:flex;align-items:center;gap:9px;background:var(--ab-soft);border:1px solid transparent;border-radius:14px;min-height:46px;padding:0 13px;color:var(--muted)}
.ab-search:focus-within{border-color:var(--ab-color)}
.ab-search svg{width:18px;height:18px;opacity:.8}
body .ab-search input{appearance:none;-webkit-appearance:none;flex:1;width:100%;min-width:0;min-height:44px;padding:8px 0;background:none;border:0;box-shadow:none;outline:none;font:inherit;font-size:14px;color:var(--text);border-radius:0}
.ab-search input::placeholder{color:var(--muted);opacity:.85}
.ab-list-caption{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px;margin:19px 3px 15px}
.ab-list-caption span:last-child{opacity:.8}
.ab-letter-index{display:flex;gap:4px;flex-wrap:wrap;margin:0 0 17px;padding-bottom:2px}
body .ab-letter-index button{display:grid;place-items:center;min-width:28px;min-height:28px;padding:3px;border:0;border-radius:8px;background:var(--ab-soft);color:var(--muted);font-size:11px;font-weight:600}
.ab-contact-section{scroll-margin-top:20px;margin:0 0 17px}
.ab-contact-section h3{display:flex;align-items:center;gap:11px;color:var(--muted);font:600 11px/1.5 ui-sans-serif,sans-serif;margin:0 3px 3px}
.ab-contact-section h3::after{content:'';height:1px;background:var(--ab-line);opacity:.65;flex:1}
body .ab-person-row{display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:75px;padding:13px 3px;border:0;border-bottom:1px solid var(--ab-line);border-radius:0;text-align:left;background:transparent;color:var(--text)}
body .ab-person-row:last-child{border-bottom:0}
body .ab-person-row:active,body .ab-group-main:active{background:var(--ab-soft)}
.ab-avatar{display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;overflow:hidden;border-radius:13px;color:#fff;background:linear-gradient(140deg,#6993ec,#4164af);box-shadow:inset 0 1px 0 #ffffff30;font-size:17px;font-weight:600;line-height:1;isolation:isolate}
.ab-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.ab-avatar-group{background:linear-gradient(145deg,#718dcc,#4e679f)}
.ab-avatar-group svg{width:24px;height:24px;stroke-width:1.6}
.ab-identity{display:flex;flex-direction:column;justify-content:center;gap:6px;flex:1;min-width:0;text-align:left}
.ab-identity b{font-size:14px;font-weight:600;line-height:1.4;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ab-identity small{display:flex;align-items:center;gap:6px;min-width:0;font-size:10px;line-height:1.5;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.ab-identity small>span{opacity:.65}
.ab-row-arrow{display:grid;place-items:center;flex:0 0 22px;color:var(--muted);opacity:.55}
.ab-row-arrow svg{width:15px;height:15px}
.ab-loading{display:flex;align-items:center;justify-content:center;gap:9px;padding:48px 10px;color:var(--muted);font-size:12px}
.ab-loading>span{display:block;width:14px;height:14px;border:1.5px solid var(--ab-line);border-top-color:var(--ab-color);border-radius:50%;animation:ab-spin .8s linear infinite}
@keyframes ab-spin{to{transform:rotate(360deg)}}
.ab-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:40px 15px 32px;color:var(--muted)}
.ab-empty>svg{width:35px;height:35px;padding:0;margin:0 0 15px;opacity:.5;stroke-width:1.2}
.ab-empty b{font-size:14px;font-weight:550;color:var(--text)}
.ab-empty p{font-size:12px;line-height:1.8;margin:8px 0 0;max-width:280px}
body .ab-text-button{border:0;background:transparent;color:var(--ab-color);min-height:40px;padding:10px 15px;font-size:12px;border-radius:10px;margin-top:8px}
.ab-error{text-align:center;color:var(--muted);padding:28px 15px;font-size:12px;line-height:1.8}
.ab-error p{margin:0;overflow-wrap:anywhere}
body .ab-create-banner{display:flex;align-items:center;gap:12px;width:100%;min-height:76px;padding:15px 16px;margin:0 0 18px;border:1px solid var(--ab-line);border-radius:18px;background:linear-gradient(110deg,var(--ab-tint),var(--ab-soft));color:var(--text);text-align:left}
.ab-create-icon{display:grid;place-items:center;width:40px;height:40px;flex:0 0 40px;border-radius:13px;background:var(--surface,#171719);color:var(--ab-color);border:1px solid var(--ab-line)}
.ab-create-banner>span:nth-child(2){display:flex;flex:1;min-width:0;flex-direction:column;gap:6px}
.ab-create-banner b{font-size:14px;font-weight:600}
.ab-create-banner small{font-size:11px;font-weight:400;color:var(--muted)}
.ab-create-banner>svg{width:16px;height:16px;color:var(--muted)}
.ab-group-section{margin-top:23px}
.ab-group-section>h3{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:550;color:var(--muted);margin:0 3px 6px}
.ab-group-section>h3>span{font-size:10px;font-weight:500;color:var(--muted);background:var(--ab-soft);border:1px solid var(--ab-line);padding:1px 6px;border-radius:7px;min-width:21px;text-align:center;font-variant-numeric:tabular-nums}
.ab-group-row{display:flex;align-items:center;gap:7px;min-width:0;border-bottom:1px solid var(--ab-line)}
.ab-group-row:last-child{border-bottom:0}
body .ab-group-main{display:flex;align-items:center;gap:11px;flex:1;min-width:0;min-height:78px;padding:13px 3px;border:0;border-radius:0;background:transparent;color:var(--text);text-align:left}
body .ab-invite-button{flex-shrink:0;min-height:34px;min-width:50px;padding:7px 10px;border:1px solid var(--ab-line);border-radius:10px;background:var(--ab-soft);color:var(--ab-color);font-size:11px;font-weight:550}
.ab-section-empty{margin:0;padding:22px 3px 17px;font-size:12px;color:var(--muted);line-height:1.7}
body .ab-find-group-link{display:flex;align-items:center;justify-content:center;gap:7px;margin:23px auto 0;min-height:42px;padding:10px;border:0;border-radius:11px;background:none;color:var(--muted);font-size:12px}
.ab-find-group-link svg{width:15px;height:15px}
.ab-find-switch{display:flex;justify-content:center;gap:8px;margin:2px 0 23px}
body .ab-find-switch button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:8px 16px;border:1px solid var(--ab-line);border-radius:20px;color:var(--muted);background:transparent;font-size:12px}
.ab-find-switch svg{width:16px;height:16px}
body .ab-find-switch button.active{color:var(--ab-color);border-color:var(--ab-color);background:var(--ab-tint)}
.ab-discover{text-align:center;padding:6px 3px 0}
.ab-discover-icon{display:grid;place-items:center;width:59px;height:59px;margin:0 auto 18px;border-radius:20px;background:var(--ab-tint);border:1px solid var(--ab-line);color:var(--ab-color)}
.ab-discover-icon svg{width:28px;height:28px;stroke-width:1.4}
.ab-discover h2{font-size:18px;font-weight:600;margin:0;letter-spacing:-.015em}
.ab-discover>p{font-size:12px;line-height:1.8;color:var(--muted);margin:9px 0 25px}
.ab-lookup-form{text-align:left}
.ab-lookup-form>label{display:block;color:var(--muted);font-size:12px;margin-bottom:9px}
.ab-lookup-control{display:flex;align-items:center;gap:4px;border:1px solid var(--ab-line);border-radius:15px;background:var(--ab-soft);padding:5px}
.ab-lookup-control:focus-within{border-color:var(--ab-color)}
body .ab-lookup-control input{flex:1;min-width:0;width:100%;height:44px;border:0;outline:0;border-radius:0;background:none;color:var(--text);padding:9px 9px;font-size:16px;font-family:inherit;font-variant-numeric:tabular-nums}
body .ab-lookup-control button{display:flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;min-width:74px;min-height:42px;padding:9px 12px;border:0;border-radius:11px;background:var(--ab-color);color:#111;font-size:12px;font-weight:600}
.ab-lookup-control button svg{width:16px;height:16px}
.ab-discover>p.ab-own-uid{display:flex;justify-content:center;align-items:center;gap:7px;margin:13px 0 23px;font-size:11px}
.ab-own-uid strong{font-weight:500;letter-spacing:.06em;color:var(--text);font-variant-numeric:tabular-nums}
.ab-result-card{margin-top:22px;padding:19px 17px;border:1px solid var(--ab-line);border-radius:19px;background:var(--surface,#171719)}
.ab-result-card>header{display:flex;align-items:center;gap:11px;margin-bottom:20px}
.ab-result-card .ab-avatar{width:45px;height:45px;flex-basis:45px}
.ab-status-pill{flex-shrink:0;font-size:10px;line-height:1.4;padding:5px 7px;border:1px solid var(--ab-line);border-radius:8px;background:var(--ab-soft);color:var(--muted)}
.ab-result-note{color:var(--muted);font-size:12px;line-height:1.8;margin:0}
.ab-result-note+.ab-primary{margin-top:18px}
.ab-request-form{display:grid;gap:0}
.ab-request-form label,.ab-field{display:grid;gap:9px;font-size:12px;color:var(--muted)}
body .ab-request-form input,body .ab-field input{width:100%;min-width:0;border:1px solid var(--ab-line);border-radius:12px;background:var(--ab-soft);color:var(--text);min-height:46px;padding:11px 12px;font:inherit;font-size:14px;outline:none}
.ab-request-form input:focus-visible,.ab-field input:focus-visible{border-color:var(--ab-color)}
body .ab-primary{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:45px;border:1px solid transparent;border-radius:13px;background:var(--ab-color);color:#10130b;font-size:13px;font-weight:600;padding:12px 14px;line-height:1.5}
.ab-primary svg{width:18px;height:18px}
.ab-form-error{font-size:12px;color:var(--danger,#ee7693);line-height:1.8;margin:10px 0;overflow-wrap:anywhere}
.ab-form-error:empty{margin:9px 0}
.ab-search-error{font-size:12px;text-align:center;color:var(--muted);line-height:1.8;margin:25px 10px;overflow-wrap:anywhere}
.ab-request-success{display:flex;align-items:flex-start;justify-content:flex-start;gap:9px;padding:10px 0 0;color:var(--ab-color);font-size:13px;line-height:1.5}
.ab-request-success svg{width:18px;height:18px}
.ab-request-success span{min-width:0}
.ab-request-success small{display:block;font-size:11px;color:var(--muted);line-height:1.8;margin-top:5px}
.ab-sheet{padding:2px 0 0}
.ab-sheet h2{font-size:21px;font-weight:600;line-height:1.45;margin:9px 0 10px;padding-right:24px;overflow-wrap:anywhere}
.ab-eyebrow{display:block;font-size:10px;letter-spacing:.04em;color:var(--muted);line-height:1.5}
.ab-sheet-copy{font-size:12px;color:var(--muted);line-height:1.85;margin:0 0 22px;overflow-wrap:anywhere}
.ab-person-profile{display:flex;flex-direction:column;align-items:center;text-align:center;padding:5px 0 18px}
.ab-person-profile .ab-avatar{width:64px;height:64px;flex-basis:64px;border-radius:20px;font-size:24px;margin-bottom:9px}
.ab-person-profile h2{padding:0;margin:10px 0 4px;font-size:19px}
.ab-person-profile p{font-size:12px;font-variant-numeric:tabular-nums;letter-spacing:.03em;color:var(--muted);margin:0}
body .ab-remove{display:block;width:100%;min-height:43px;border:0;border-radius:12px;padding:10px 15px;margin-top:8px;background:none;color:var(--muted);font-size:12px}
body .ab-primary.ab-danger{background:var(--danger-soft,#352227);color:var(--danger,#ee7693);border-color:var(--ab-line)}
.ab-group-form{display:block}
.ab-group-form>.ab-field{margin:0 0 24px}
.ab-picker-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;font-size:12px}
.ab-picker-heading>b{font-weight:550;color:var(--text)}
.ab-picker-heading>span{color:var(--muted);font-size:11px}
.ab-picker-search{min-height:40px;margin:0 0 9px;border-radius:12px}
body .ab-picker-search input{min-height:40px;font-size:13px}
.ab-friend-picker{max-height:260px;max-height:min(31dvh,260px);overflow:auto;overscroll-behavior:contain;padding-right:2px;scrollbar-width:none}
.ab-picker-row{position:relative;display:flex;align-items:center;gap:10px;padding:10px 2px;min-height:66px;border-bottom:1px solid var(--ab-line);cursor:pointer;border-radius:0}
.ab-picker-row:last-child{border-bottom:0}
.ab-picker-row input[type="checkbox"]{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer;z-index:1}
.ab-picker-row .ab-avatar{width:36px;height:36px;flex-basis:36px;border-radius:11px;font-size:14px}
.ab-picker-row .ab-identity{gap:4px}
.ab-picker-row .ab-identity b{font-size:13px}
.ab-picker-row .ab-identity small{font-size:10px}
.ab-checkbox{display:grid;place-items:center;width:21px;height:21px;flex:0 0 21px;border:1px solid var(--ab-line);border-radius:7px;background:var(--ab-soft);color:transparent;margin-left:4px}
.ab-checkbox svg{width:15px;height:15px;stroke-width:2}
.ab-picker-row input:checked~.ab-checkbox{background:var(--ab-color);border-color:var(--ab-color);color:#111}
.ab-picker-row input:disabled{cursor:wait}
.ab-consent-note{font-size:10px;color:var(--muted);line-height:1.9;margin:15px 0 0}
.ab-group-form>.ab-empty{padding:20px 10px 5px}
.ab-group-form>.ab-empty svg{display:none}
.ab-group-form>.ab-empty b{font-size:12px;font-weight:500;color:var(--muted)}
.ab-group-form>.ab-empty p{font-size:11px}
:root[data-theme="light"] .address-book,:root[data-theme="light"] .ab-sheet{--ab-soft:#f0f4fa;--ab-line:#e1e7f0;--ab-color:#3478ed;--ab-tint:#eaf1ff}
[data-theme="light"] .ab-tabs button.active{background:#fff;border-color:#dce5f3;color:#285aab}
[data-theme="light"] .ab-primary,[data-theme="light"] .ab-lookup-control button,[data-theme="light"] .ab-picker-row input:checked~.ab-checkbox{color:#fff}
[data-theme="light"] .ab-create-banner{background:linear-gradient(115deg,#edf3ff,#f6f8fc);border-color:#dfe7f3}
[data-theme="light"] .ab-create-icon{background:#fff;color:#3478ed;border-color:#dce6f8}
[data-theme="light"] .ab-avatar{background:linear-gradient(140deg,#72a7fa,#5481d8)}
[data-theme="light"] .ab-avatar-group{background:linear-gradient(140deg,#7494cb,#4f73b2)}
[data-theme="light"] .ab-result-card{background:#fff;box-shadow:0 5px 20px #244c8505}
@media(max-width:360px){.address-book{padding-inline:0}.ab-tabs button{gap:5px;font-size:12px}.ab-tabs button svg{width:15px;height:15px}.ab-identity small{font-size:9px;gap:4px}.ab-invite-button{min-width:44px;padding-inline:8px}.ab-group-main{gap:8px}.ab-result-card{padding:16px 12px}.ab-avatar{width:40px;height:40px;flex-basis:40px}.ab-status-pill{font-size:9px;padding-inline:5px}.ab-tabs{margin-bottom:18px!important}}
@media(min-width:700px){.address-book{max-width:700px;margin-inline:auto}.ab-discover,.ab-lookup-result{max-width:440px;margin-inline:auto}.ab-tabs{margin-bottom:25px!important}}
@media(prefers-reduced-motion:reduce){.ab-loading>span{animation:none}.address-book button,.ab-sheet button{transition:none!important}}
