.profile-card,.profile-dialog{
 --profile-action:var(--vb-action,var(--action));--profile-ink:var(--vb-ink,var(--ink));
 --profile-muted:var(--vb-muted,var(--muted));--profile-line:var(--vb-line,var(--line));
 --profile-tint:var(--vb-tint,var(--tint));--profile-surface:var(--surface,var(--zj-surface,#fff));
 --profile-danger:var(--vb-danger,var(--danger));--profile-radius:var(--vb-radius,10px);
 --profile-card-height:240px;color:var(--profile-ink);font:inherit;text-align:left;box-sizing:border-box;
}
.profile-card{height:var(--profile-card-height);min-width:0;width:100%;padding:12px;border:1px solid var(--profile-line);border-radius:var(--profile-radius);background:var(--profile-surface);overflow-wrap:anywhere}
.profile-card>form,.profile-card-content{display:grid;grid-template-rows:auto minmax(0,1fr) auto 44px;gap:4px;height:100%;min-height:0;margin:0}
.profile-card h2{font-size:20px;line-height:22px;font-weight:600;letter-spacing:-.02em;margin:0;color:var(--profile-ink);align-self:start}
.profile-content{min-width:0;min-height:0;overflow:auto;scrollbar-width:thin;padding:2px}
.profile-card label,.profile-dialog label{display:block;font-size:14px;font-weight:400;line-height:20px;text-transform:none;color:var(--profile-ink)}
.profile-card input:not([type=checkbox]):not([type=radio]):not([type=range]),.profile-card select,.profile-dialog input:not([type=radio]):not([type=checkbox]):not([type=range]),.profile-dialog select{display:block;width:100%;min-width:0;min-height:44px;margin-top:4px;padding:8px 10px;font:inherit;font-size:16px;background:var(--profile-surface);color:var(--profile-ink);border:1px solid var(--control,var(--zj-control,#8298a3));border-radius:6px;box-sizing:border-box;text-align:left}
.profile-place,.profile-range{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.profile-place label,.profile-range label{min-width:0}
.profile-options{display:flex;flex-wrap:wrap;gap:8px;align-content:start;min-width:0}
.profile-card .profile-option,.profile-dialog .profile-option{display:flex;align-items:center;gap:8px;padding:8px 10px;min-height:44px;border:1px solid var(--profile-line);border-radius:20px;font-size:14px;cursor:pointer;background:var(--profile-surface);max-width:100%;line-height:20px;box-sizing:border-box}
.profile-option:has(input:checked){border-color:var(--profile-action);background:var(--profile-tint)}
.profile-option input{position:static;opacity:1;appearance:auto;width:17px;height:17px;flex:0 0 17px;margin:0;accent-color:var(--profile-action)}
.profile-count{font-size:13px;color:var(--profile-muted);white-space:nowrap;font-variant-numeric:tabular-nums;margin-left:auto}
.profile-preview{margin:0;padding:0;list-style:none;font-size:14px;line-height:22px}
.profile-preview>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-preview-more{color:var(--profile-muted)}
.profile-preview .profile-text{padding:0;min-height:44px}
.profile-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:nowrap;margin:0}
.profile-card button,.profile-dialog button{font:inherit;font-size:14px;min-height:44px;border-radius:6px;padding:10px 12px;cursor:pointer;line-height:20px;transition:background .12s,color .12s;box-sizing:border-box}
.profile-card .profile-primary{flex:none;min-width:88px;margin-left:auto;background:var(--profile-surface);color:var(--profile-action);border:1px solid var(--profile-action);font-weight:600}
.profile-card .profile-primary:hover,.profile-card .profile-primary:active{background:var(--profile-tint)}
.profile-dialog .profile-primary{background:var(--zj-action,var(--profile-action));color:var(--zj-on-action,#fff);border:1px solid var(--profile-action);font-weight:600}
.profile-dialog .profile-primary:hover{filter:brightness(.92)}
.profile-dialog .profile-primary:active{filter:brightness(.82)}
.profile-card .profile-text,.profile-dialog .profile-text{color:var(--profile-action);background:transparent;border:1px solid transparent;padding-inline:0;text-decoration:underline;text-underline-offset:3px;font-size:14px;white-space:nowrap}
.profile-text:hover,.profile-text:active{background:var(--profile-tint)}
.profile-card button:disabled,.profile-dialog button:disabled{cursor:wait;opacity:.65}
.profile-card :focus-visible,.profile-dialog :focus-visible{outline:3px solid var(--profile-action);outline-offset:2px}
.profile-card .profile-message{display:block;min-height:0;max-height:36px;overflow:auto;font-size:14px;line-height:18px;margin:0;align-self:end;color:var(--profile-muted);scrollbar-width:thin}
.profile-card .profile-error,.profile-dialog .profile-error{color:var(--profile-danger);font-weight:600}
.profile-dialog{position:fixed;inset:0;margin:auto;width:min(580px,calc(100vw - 32px));height:fit-content;max-height:calc(100dvh - 32px);border:1px solid var(--profile-line);border-radius:var(--profile-radius);padding:24px;background:var(--profile-surface);overflow:auto;overscroll-behavior:contain}
.profile-dialog::backdrop{background:#18354199}
.profile-dialog h2{font-size:22px;line-height:1.3;font-weight:600;margin:0 0 16px;color:var(--profile-ink);letter-spacing:-.02em}
.profile-dialog p{margin:0 0 16px;line-height:1.6}
.profile-dialog .profile-help{font-size:14px;color:var(--profile-muted)}
.profile-dialog .profile-message{font-size:14px;line-height:20px;margin:12px 0}
.profile-dialog .profile-message:empty{display:none}
.profile-dialog .profile-actions{margin-top:16px}
.profile-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.profile-dialog-head h2{max-width:370px}
.profile-summary{margin:12px 0 16px;padding-left:20px;font-size:14px;line-height:1.6}
.profile-summary li{margin-bottom:6px}
.profile-option-search{margin:0 0 16px}
.profile-dialog-options{display:grid;grid-template-columns:minmax(0,1fr);max-height:360px;overflow:auto;padding:3px;margin:4px 0 16px;scrollbar-width:thin}
.profile-dialog-options .profile-option{width:100%;border-radius:6px}
.profile-dialog-options .profile-option>span:not(.profile-count){overflow-wrap:anywhere;min-width:0}
.profile-no-options{font-size:14px}
.profile-frequency{display:flex;flex-wrap:wrap;gap:16px;margin:20px 0;padding:0;border:0}
.profile-frequency legend{font-size:14px;font-weight:600;margin-bottom:8px}
.profile-frequency label{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}
.profile-frequency input{appearance:auto;position:static;opacity:1;width:18px;height:18px;accent-color:var(--profile-action)}
@media(max-width:639px){
 .profile-count{font-size:14px}
 .profile-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:24px 16px max(24px,env(safe-area-inset-bottom))}
 .profile-dialog .profile-actions{margin-top:24px;flex-wrap:wrap}
 .profile-dialog-options{max-height:calc(100dvh - 300px)}
}
@media(prefers-reduced-motion:reduce){.profile-card button,.profile-dialog button{transition:none}}
/* Native filter controls, shared with the drawer; bounded cards stay equally high. */
.profile-content>fieldset{border:0;padding:0;margin:0;min-width:0}
.profile-content .range{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:4px}
.profile-content .options,.profile-content .extra-options{max-height:none;overflow:visible}
.profile-content .check{display:flex;gap:8px;align-items:center;min-height:44px;padding:8px 2px;margin:0;box-sizing:border-box;cursor:pointer;line-height:20px}
.profile-content .check:hover{background:var(--profile-tint)}
.profile-content .check input{position:static;appearance:auto;opacity:1;margin:0;width:18px;min-height:18px;height:18px;flex:0 0 18px;accent-color:var(--profile-action)}
.profile-content .check>span:not(.option-count){min-width:0;flex:1}
.profile-content .option-count,.profile-content [data-hours-count],.profile-content [data-added-count]{margin-left:auto;flex:none;font-size:13px;color:var(--profile-muted);font-variant-numeric:tabular-nums}
.profile-content .grouped-professions>label,.profile-content .option-search{margin:0 0 8px;font-size:14px;line-height:20px;color:var(--profile-ink)}
.profile-content details{border:0;border-top:1px solid var(--profile-line);padding:0}
.profile-content summary{display:flex;gap:8px;align-items:center;min-height:44px;font-size:14px;font-weight:400;cursor:pointer;list-style:none}
.profile-content summary::after{content:'+';margin-left:auto;flex:none}
.profile-content details[open]>summary::after{content:'−'}
.profile-content summary:hover{background:var(--profile-tint)}
.profile-content .note,.profile-content .option-empty{font-size:14px;line-height:20px}
.profile-content [aria-invalid=true]{border-color:var(--profile-danger)}
.profile-card .profile-actions [data-profile-expand]{margin-left:auto}
.profile-dialog.profile-choice-dialog[open]{display:block}
.profile-choice-dialog .profile-dialog-tools{display:flex;justify-content:flex-end;margin-bottom:8px}
.profile-choice-dialog [data-profile-form]{margin:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;max-height:calc(100dvh - 150px);gap:8px;min-height:0}
.profile-choice-dialog .profile-content{max-height:calc(100dvh - 300px);overscroll-behavior:contain;padding:3px}
.profile-choice-dialog [data-profile-expand]{display:none}
.profile-choice-dialog .profile-actions{margin:0}
.profile-choice-dialog .profile-message{margin:0}
.profile-choice-dialog .profile-place{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
@media(max-width:639px){.profile-content .option-count,.profile-content [data-hours-count],.profile-content [data-added-count]{font-size:14px}}
/* Search within a long list belongs in its expanded view. */
.profile-card .option-search,.profile-card .grouped-professions>label{display:none}
.profile-actions:has([data-profile-retry]:not([hidden])) [data-profile-expand]{display:none}

.profile-content [data-hours-slider]{margin:0}
