.person-tags{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.person-tag{display:inline-flex;align-items:center;gap:5px;background:#18362c;border:1px solid #315548;color:#d7e7de;border-radius:4px;font-size:.78rem;padding:3px 8px;max-width:100%;overflow-wrap:anywhere}.person-tag form{display:inline;margin:0}.person-tag button{background:transparent;border:0;color:#d7e7de;padding:1px 4px;min-height:28px;font-size:1rem}.person-tags-section{padding:8px 0 16px;border-bottom:1px solid #343c3e;margin-bottom:18px}.person-tags-section h2{font-size:1rem}.tag-search{min-width:0;max-width:320px}.tag-search summary{cursor:pointer}.tag-search-options{max-height:230px;overflow:auto;display:flex;flex-wrap:wrap;gap:10px;padding-top:10px}.tag-search-options label{display:flex;align-items:center;gap:6px;font-size:.85rem;overflow-wrap:anywhere}.tag-search-options input{width:auto}.tag-form{max-width:760px;margin:24px auto;padding:24px}.tag-form select,.tag-form input{width:100%;max-width:100%}.tag-form .actions{margin-top:24px;flex-wrap:wrap}.tag-create{margin-top:24px}.tag-create summary{cursor:pointer;margin-bottom:14px}.tag-manage-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:18px}.tag-manage-row form{display:flex;gap:12px;align-items:center;flex-wrap:wrap;min-width:0}.tag-manage-row label{min-width:0}.tag-manage-row input{max-width:100%}.addressbook:not(.visits) .ab-operation-bar{flex-wrap:wrap}.has-people-selection:has(.addressbook:not(.visits)) main{padding-bottom:160px}@media(max-width:600px){.tag-search{max-width:100%}.tag-form{padding:18px;margin:18px 0}.tag-manage-row{align-items:stretch;flex-direction:column}.tag-manage-row form{align-items:stretch;flex-direction:column}.tag-manage-row input{width:100%}.addressbook:not(.visits) .ab-operation-bar{gap:7px}.addressbook:not(.visits) .ab-operation-bar button{padding:9px 10px;font-size:.82rem}.has-people-selection:has(.addressbook:not(.visits)) main{padding-bottom:220px}}

/* Address-book search: keyword row above a full-width tag section. */
.addressbook:not(.visits)>.ab-search.ab-tag-search{display:block}
.ab-tag-search .ab-keyword-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:end}
.ab-tag-search .ab-keyword-row>div{min-width:0}
.ab-tag-search .tag-search{width:100%;max-width:none;margin-top:16px;padding-top:14px;border-top:1px solid #354044}
.ab-tag-search .tag-search>summary{cursor:pointer;padding:4px 0;border:0;border-radius:0;overflow-wrap:anywhere}
.ab-tag-search .tag-filter-count{color:#a5c9b7;font-size:.85rem;font-weight:400}
.ab-tag-search .tag-search-options{max-height:none;overflow:visible;display:flex;flex-wrap:wrap;gap:8px;padding-top:4px}
.ab-tag-search .tag-filter-chip{display:inline-flex;align-items:center;gap:8px;min-height:40px;max-width:100%;margin:0;padding:8px 12px;box-sizing:border-box;background:#242b2d;border:1px solid #4b5753;border-radius:5px;color:#edf1ee;font-size:.85rem;cursor:pointer;transition:background-color 150ms,border-color 150ms}
.ab-tag-search .tag-filter-chip:hover{background:#2d3733;border-color:#6b8075}
.ab-tag-search .tag-filter-chip:has(input:checked){background:#183d30;border-color:#42876a}
.ab-tag-search .tag-filter-chip:focus-within{outline:2px solid #4c9676;outline-offset:2px}
.ab-tag-search .tag-filter-chip span{min-width:0;overflow-wrap:anywhere}
.ab-tag-search .tag-filter-chip input[type=checkbox]{width:16px;height:16px;min-height:0;flex:none;margin:0;accent-color:#26805b}
@media(max-width:760px){.ab-tag-search .ab-keyword-row{grid-template-columns:minmax(0,1fr);gap:10px}.ab-tag-search .ab-keyword-row>button{width:100%}.ab-tag-search .tag-search{margin-top:14px}.ab-tag-search .tag-filter-chip{min-height:42px}}

@media(max-width:760px){.addressbook:not(.visits) .ab-operation-bar button{flex:0 1 auto;min-width:100px;white-space:nowrap}.addressbook:not(.visits) .ab-operation-bar{gap:7px}}
