/* Functional audience additions, using existing Cy colors and native top-layer popovers. */
.cy-audience-actions{display:inline-flex;align-items:center;gap:12px;position:relative;z-index:3;vertical-align:middle}
.cy-audience-add{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:28px;margin:0;padding:3px 0;border:0;background:none;color:var(--cy-tab-accent,#7197ff);font:400 16px/16px 'PingFang SC','Microsoft YaHei',sans-serif;white-space:nowrap;cursor:pointer}
.cy-audience-add:hover{text-decoration:underline}.cy-audience-add.is-added{color:var(--cy-white-55,rgba(255,255,255,.55))}
.cy-card-audience-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:4px;position:relative;z-index:3}
.dashboard .asset-card .cy-card-audience-actions>.more-metrics{margin:0}
.dashboard .asset-card .cy-card-audience-actions>.cy-audience-add{font-size:14px;line-height:14px;min-height:27px}
.bp-table td>.cy-audience-actions{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.bp-table td>.cy-audience-actions .cy-audience-add{min-height:14px;padding:0}
.a3-payment-result>.cy-audience-actions{display:flex;flex-direction:column;min-width:0;flex:1;gap:8px}
.a3-payment-result>.cy-audience-actions>.cy-audience-add{width:auto!important;height:auto!important;min-height:14px!important;background:none!important}
.a3-payment-result>.cy-audience-actions>button:not(.cy-audience-add){max-width:100%}
.cy-health-stage{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0}.cy-health-stage>.bp-health-card{width:100%}.cy-health-stage>.cy-audience-add{align-self:flex-end}
.cy-channel-audience-actions{display:block}.cy-channel-audience-actions .cy-audience-add{font-size:14px;line-height:14px;min-height:20px}
.np-source-title>[data-cy-growth-total]{align-self:flex-start}.np-sources-table [data-cy-growth]{display:flex;min-height:18px;padding:0;margin-top:4px;font-size:14px;line-height:14px}
.cy-audience-layer{position:fixed;inset:auto;margin:0;border:1px solid var(--cy-white-10,rgba(255,255,255,.1));border-radius:8px;background:var(--cy-surface,#303241);color:var(--cy-white-95,rgba(255,255,255,.95));box-shadow:none;font:400 16px/16px 'PingFang SC','Microsoft YaHei',sans-serif;letter-spacing:0px;z-index:10000;box-sizing:border-box}
.cy-audience-layer[hidden],.cy-audience-layer[popover]:not(:popover-open):not([data-fallback]){display:none!important}
.cy-audience-layer::backdrop{background:transparent;pointer-events:none}
.cy-audience-layer button,.cy-audience-layer input{font:inherit;letter-spacing:0px}.cy-audience-layer button{cursor:pointer}
.cy-audience-number{font-family:'D-DIN',Inter,sans-serif!important;font-variant-numeric:tabular-nums;white-space:nowrap}
.cy-audience-toast{display:flex;flex-direction:column;gap:12px;width:380px;max-width:calc(100vw / .75 - 24px);padding:16px}
.cy-audience-toast-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.cy-audience-toast-head strong{font:500 16px/16px 'PingFang SC',sans-serif;color:var(--cy-green,#42cf8a)}
.cy-audience-toast-head button,.cy-audience-records>header>button{display:grid;place-items:center;width:24px;height:24px;padding:5px;border:0;background:none;color:inherit}.cy-audience-layer img{display:block;flex:none}
.cy-audience-toast p{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin:0;line-height:20px}.cy-audience-toast p>span{min-width:0}
.cy-audience-toast-actions{display:flex;align-items:center;gap:12px;color:var(--cy-white-55,rgba(255,255,255,.55));font-size:14px;line-height:14px}
.cy-audience-toast-actions>span{margin-right:auto}.cy-audience-toast-actions button{min-height:28px;padding:4px 0;border:0;background:none;color:var(--cy-tab-accent,#7197ff);font-size:14px;line-height:14px}
.cy-audience-records{width:440px;max-width:calc(100vw / .75 - 24px);max-height:calc(100dvh / .75 - 24px);padding:16px;overflow:auto}
.cy-audience-records>header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}.cy-audience-records h2{margin:0 0 8px;font:500 20px/20px 'PingFang SC',sans-serif}.cy-audience-records header small{color:var(--cy-white-55,rgba(255,255,255,.55));font-size:14px;line-height:14px}
.cy-audience-record-tools{display:flex;gap:12px;margin-bottom:12px}.cy-audience-record-tools input{min-width:0;flex:1;height:36px;padding:8px 10px;border:1px solid var(--cy-white-10,rgba(255,255,255,.1));border-radius:4px;background:var(--cy-base,#202030);color:inherit;font:400 16px/16px 'PingFang SC',sans-serif}
.cy-audience-record-tools>button{padding:0 8px;border:0;background:none;color:var(--cy-white-55,rgba(255,255,255,.55));font-size:14px}
.cy-audience-records [data-record-body]{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow:auto}
.cy-audience-record-row{display:grid;grid-template-columns:minmax(0,1fr) 24px;gap:8px;align-items:center;border-radius:4px;background:var(--cy-white-5,rgba(255,255,255,.05));padding:12px}
.cy-audience-record-open{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:8px;text-align:left;padding:0;border:0;background:none;color:inherit;min-width:0}
.cy-audience-record-open>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cy-audience-record-open>small{grid-row:2;grid-column:1;color:var(--cy-white-55,rgba(255,255,255,.55));font:400 14px/14px 'PingFang SC',sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cy-audience-record-open>b{grid-column:2;grid-row:1/3;align-self:center;font-weight:400;color:var(--cy-a3,#ac8dd0);font-size:16px;line-height:16px}.cy-audience-remove{display:grid;place-items:center;width:24px;height:24px;padding:5px;border:0;background:none}
.cy-audience-records>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:16px;margin-top:16px;border-top:1px solid var(--cy-white-10,rgba(255,255,255,.1));font-size:14px;line-height:14px;color:var(--cy-white-55,rgba(255,255,255,.55))}
.cy-audience-records footer nav{display:flex;align-items:center;gap:8px}.cy-audience-records footer button{min-height:28px;padding:3px 4px;border:0;background:none;color:var(--cy-tab-accent,#7197ff);font-size:14px;line-height:14px}.cy-audience-layer button:disabled{opacity:.35;cursor:default}
.cy-audience-empty{margin:0;padding:20px 0;font-size:16px;line-height:24px;color:var(--cy-white-55,rgba(255,255,255,.55))}
.cy-audience-provenance{margin:0 0 16px;color:var(--cy-white-55,rgba(255,255,255,.55));font:400 14px/14px 'PingFang SC',sans-serif}
.cy-audience-clear-confirm{max-width:400px;padding:24px;border:1px solid var(--cy-white-10,rgba(255,255,255,.1));border-radius:8px;background:#303241;color:rgba(255,255,255,.95);font:400 16px/16px 'PingFang SC',sans-serif}.cy-audience-clear-confirm h2{font-size:20px;line-height:20px;margin:0 0 24px}.cy-audience-clear-confirm p{line-height:22px}.cy-audience-clear-confirm>div{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.cy-audience-clear-confirm button{padding:8px 14px;border:1px solid rgba(255,255,255,.1);border-radius:4px;background:none;color:inherit}.cy-audience-clear-confirm [data-confirm=yes]{background:#3d5bf6}
@keyframes cy-audience-pulse{50%{transform:scale(1.12)}}.cy-audience-count-pulse{animation:cy-audience-pulse .5s ease}
@media(prefers-reduced-motion:reduce){.cy-audience-count-pulse{animation:none}}
@media(max-width:700px){.cy-audience-records,.cy-audience-toast{max-width:calc(100vw - 24px)}.cy-audience-records{width:400px}}
.cy-audience-toast[data-tone="error"] .cy-audience-toast-head strong{color:#e15454}.cy-audience-toast[data-tone="warning"] .cy-audience-toast-head strong{color:#ea9d4d}
.business-pages .cy-audience-add{font:400 16px/16px 'PingFang SC','Microsoft YaHei',sans-serif}.cy-audience-actions>.cy-audience-add{min-height:14px;padding:0}
.dashboard .metric-list .cy-audience-add{font-size:14px;line-height:14px;opacity:0;pointer-events:none}
.dashboard .metric-list>div:hover .cy-audience-add,.dashboard .metric-list>div:focus-within .cy-audience-add{opacity:1;pointer-events:auto}
.cy-audience-records{max-height:min(560px,calc(100dvh / .75 - 24px))}
.cy-attr-source-add{margin-left:12px;font-size:14px!important;line-height:14px!important;min-height:18px;padding:0}
[data-cy-channel-drill]{margin:12px 0}

.cy-audience-toast[data-tone="duplicate"] .cy-audience-toast-head strong{color:var(--cy-red,#e15454)}

.record-trigger,.bp-record-trigger,.global-audience-records,[data-cy-records]{position:relative!important;overflow:visible}
.record-trigger>.record-count,.bp-record-trigger>.bp-record-count,.global-audience-records>.oneid-record-count,[data-cy-records]>.bp-record-count{position:absolute;inset:auto!important;top:-7px!important;right:-5px!important;display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:20px;box-sizing:border-box;padding:0 4px;border-radius:8px;background:var(--cy-red,#e15454);color:#fff;font:400 14px/14px D-DIN,Inter,sans-serif;letter-spacing:0px;z-index:1;pointer-events:none}

/* Match the existing Cy scrollbars only inside the audience record panel. */
.cy-audience-records,.cy-audience-records [data-record-body]{scrollbar-width:thin;scrollbar-color:var(--cy-white-35,rgba(255,255,255,.35)) transparent;overscroll-behavior:contain}
.cy-audience-records::-webkit-scrollbar,.cy-audience-records [data-record-body]::-webkit-scrollbar{width:6px;height:6px}
.cy-audience-records::-webkit-scrollbar-track,.cy-audience-records [data-record-body]::-webkit-scrollbar-track{background:transparent}
.cy-audience-records::-webkit-scrollbar-thumb,.cy-audience-records [data-record-body]::-webkit-scrollbar-thumb{background:var(--cy-white-35,rgba(255,255,255,.35));border-radius:3px}
.cy-audience-records::-webkit-scrollbar-thumb:hover,.cy-audience-records [data-record-body]::-webkit-scrollbar-thumb:hover{background:var(--cy-white-55,rgba(255,255,255,.55))}
.cy-audience-records::-webkit-scrollbar-button,.cy-audience-records [data-record-body]::-webkit-scrollbar-button{display:none;width:0;height:0}
.cy-audience-records::-webkit-scrollbar-corner,.cy-audience-records [data-record-body]::-webkit-scrollbar-corner{background:transparent}
html[data-theme="dark"] .cy-audience-records{color-scheme:dark}
html[data-theme="light"] .cy-audience-records{color-scheme:light}

/* Use the available viewport height; keep existing rows, gaps and panel width. */
.cy-audience-records{display:flex;flex-direction:column;max-height:calc(100dvh / var(--app-ui-scale,var(--scale,.75)) - 24px);overflow:hidden}
.cy-audience-records>header,.cy-audience-record-tools,.cy-audience-records>footer{flex:none}
.cy-audience-records [data-record-body]{flex:0 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden}
.cy-audience-record-row{flex:none}

/* Sidepanels fill the viewport; the global records entry is pinned beside them. */
#bp-activity-drawer[data-independent="true"]{z-index:90;bottom:0;width:var(--cy-sidepanel-width,520px)}

html [data-activity-global-record="true"]{position:fixed!important;top:var(--cy-record-fixed-top)!important;right:var(--cy-record-fixed-right,30px)!important;bottom:auto!important;left:auto!important;z-index:95}
/* Shared compact page controls, matching the OneID list's existing 32px style. */
.cy-audience-records>footer{gap:12px;flex-wrap:wrap}
.cy-record-pagination-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex:none}
.cy-audience-records .cy-record-page-limit{width:78px;height:36px;min-height:36px;padding:0;border:0;background:transparent;color:var(--cy-white-75);font:400 14px/14px 'PingFang SC',sans-serif}
.cy-audience-records .cy-record-page-limit.bp-select-trigger{padding:0!important;gap:4px}
.cy-audience-records footer .bp-pagination-nav{display:flex;align-items:center;gap:6px;flex:none}
.cy-audience-records footer .bp-pagination-nav>button,.cy-audience-records .bp-page-jump-select{width:32px;min-width:32px;height:36px;min-height:36px;margin:0;padding:0;border:0;border-radius:4px;background:transparent;color:var(--cy-white-55);font:400 16px/16px 'D-DIN',Inter,sans-serif}
.cy-audience-records footer .bp-pagination-nav>button[aria-current="page"],.cy-audience-records .bp-page-jump-select.is-current,.app-shell[data-page="audience"] .bp-pagination-nav .bp-page-jump-select.is-current{background:var(--cy-primary,#3d5bf6);color:var(--cy-white-95)}
.cy-audience-records .bp-page-jump-select.bp-select-trigger{justify-content:center;padding:0!important}
.cy-audience-records .bp-page-jump-select.bp-select-trigger>img{display:none}
.cy-audience-records .bp-select-menu{scrollbar-width:thin;scrollbar-color:var(--cy-white-35) transparent}

/* Reveal sidepanels and records at their final layout positions, with no travel or scale. */
@media (prefers-reduced-motion:no-preference){
  html .bp-activity-drawer[open],html .cy-audience-export-history:not([hidden]),html [data-activity-global-record="true"]{animation:cy-sidepanel-appear 120ms ease-out}
  html .cy-audience-records:popover-open,html .cy-audience-records[data-fallback]:not([hidden]){animation:cy-sidepanel-appear 100ms ease-out}
}
@media (prefers-reduced-motion:reduce){
  html .bp-activity-drawer[open],html .cy-audience-export-history:not([hidden]),html [data-activity-global-record="true"],html .cy-audience-records{animation:none}
}

/* Shared sidepanel backdrop: one layer beneath every nonmodal sidepanel and its global records entry. */
body:has(.bp-activity-drawer[open],.cy-audience-export-history:not([hidden]),.cy-audience-records:not([data-nonblocking="true"]):popover-open,.cy-audience-records:not([data-nonblocking="true"])[data-fallback]:not([hidden])):not(:has(dialog:modal))::after{
  content:"";
  position:fixed;
  inset:var(--cy-content-top,0px) 0 0 var(--cy-content-left,0px);
  z-index:80;
  background:rgb(0 0 0 / 55%);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  pointer-events:auto;
}

/* The open records trigger stays visible and clickable above the shared backdrop. */
html :is(.record-trigger,.bp-record-trigger,.global-audience-records,[data-cy-records],[data-bp="records"])[aria-expanded="true"]{z-index:10000}

/* User-selected Cy white 35% for save-status toast only; shared outside-stroke conversion remains active. */
.cy-audience-toast{border-color:var(--cy-white-35,rgba(255,255,255,.35))}

/* A requested audience is added here before its list can be opened. */
.cy-record-add-status{flex:none;margin:0 0 12px;padding:0;color:var(--cy-white-75);font:400 16px/16px 'PingFang SC',sans-serif;letter-spacing:0px;overflow-wrap:anywhere}
.cy-record-add-status[hidden]{display:none}
.cy-record-add-status[data-tone="success"]{color:var(--cy-green,#42cf8a)}
.cy-record-add-status[data-tone="duplicate"],.cy-record-add-status[data-tone="error"]{color:var(--cy-red,#e15454)}
.cy-audience-record-row.is-recent{background:var(--cy-white-10)}
.cy-audience-records[aria-busy="true"] .cy-audience-record-open{pointer-events:none}

/* Match the supplied tall, compact saved-record container. */
#cy-audience-records{width:364px;height:789px;padding:30px;border-radius:8px}
#cy-audience-records>header{align-items:center;gap:12px;margin-bottom:20px}
#cy-audience-records h2{margin:0;font-size:14px;line-height:14px;font-weight:400;color:var(--cy-white-75)}
#cy-audience-records [data-record-total]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#cy-audience-records>header>button{width:14px;height:14px;padding:0}
#cy-audience-records .cy-audience-record-tools{position:relative;display:block;flex:none;margin-bottom:10px}
#cy-audience-records .cy-audience-record-tools>img{position:absolute;left:10px;top:9px;pointer-events:none}
#cy-audience-records .cy-audience-record-tools input{display:block;width:100%;height:36px;padding:0 10px 0 30px;font-size:14px;line-height:14px}
#cy-audience-records [data-record-body]{flex:1 1 auto;gap:8px}
#cy-audience-records .cy-audience-record-row{height:46px;min-height:46px;grid-template-columns:minmax(0,1fr) 14px;gap:8px;padding:8px 12px}
#cy-audience-records .cy-audience-record-open{grid-template-rows:14px 12px;gap:4px 8px;font-size:16px;line-height:16px}
#cy-audience-records .cy-audience-record-open>b{grid-row:1/3;align-self:center;font-size:16px;line-height:16px;font-weight:700}
#cy-audience-records .cy-audience-remove{width:14px;height:14px;padding:0}
#cy-audience-records>footer{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;flex:none;gap:12px;margin-top:30px;padding:0;border:0}
#cy-audience-records>footer>[data-record-clear]{align-self:flex-end;display:grid;place-items:center;width:64px;height:36px;min-height:36px;padding:0;border:1px solid var(--cy-white-10);border-radius:4px;background:transparent;color:var(--cy-white-55);font-size:14px;line-height:14px}
#cy-audience-records .cy-record-paging-area{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:12px;font-size:14px;line-height:14px;overflow-x:auto;overflow-y:hidden}
#cy-audience-records .cy-record-pagination-controls{flex:1 0 auto;min-width:0;max-width:none;margin-left:0;justify-content:flex-start;flex-wrap:nowrap;row-gap:0}
#cy-audience-records .cy-record-add-status{font-size:14px;line-height:14px}
html[data-theme="light"] #cy-audience-records .cy-audience-record-tools>img{filter:brightness(0);opacity:1}

/* Keep the reference's top filters and sidebar outside the sidepanel backdrop. */
.workspace-header .filter-bar[hidden]{display:none!important}
body:has(.bp-activity-drawer[open],.cy-audience-export-history:not([hidden]),.cy-audience-records:popover-open)>.submenu{z-index:110}

/* Record entry uses the same neutral surface and stroke as Reset. */
/* Announce progress without inserting a banner or moving the list. */
#cy-audience-records .cy-record-add-status{height:12px;min-height:12px;max-width:100%;margin:0 0 12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cy-audience-records .cy-record-add-status[hidden]{display:block!important;visibility:hidden}
#cy-audience-records[aria-busy="true"] .cy-audience-record-open:disabled{opacity:1;cursor:progress}
#cy-audience-records .cy-audience-record-row.is-recent{background:var(--cy-white-5)}
/* Addition feedback is static, including the automatic container opening. */
html #cy-audience-records.cy-records-instant{animation:none!important}

/* Record entry remains in the original page-heading position, with Reset-neutral paint. */
#workspace-panel :is(.record-trigger,.bp-record-trigger,[data-cy-records]){background:transparent;border-color:var(--cy-white-10)}
#workspace-panel :is(.record-trigger,.bp-record-trigger,[data-cy-records]):hover:not(:disabled),.global-audience-records:hover:not(:disabled){background:var(--cy-white-5)}
html[data-theme="light"] #workspace-panel :is(.record-trigger,.bp-record-trigger,[data-cy-records]){background:#fff!important;border-color:rgb(0 0 0 / .05);outline:1px solid rgb(0 0 0 / .05);outline-offset:0}

/* A3 can continue selecting audiences while the existing nonblocking notice updates. */
.cy-audience-toast[data-tone="pending"] .cy-audience-toast-head strong{color:var(--cy-white-75)}

/* User override: sidepanel outer shells use square corners. */
html :is(.bp-activity-drawer,.cy-audience-export-history,#cy-audience-records){border-radius:0}

/* Records are an independent rounded dialog; business sidepanels keep their existing shell and content-only backdrop. */
html #cy-audience-records{border-radius:8px}
/* A popover's native backdrop is pointer-transparent, so use one document-level mask to block every background control. */
#cy-audience-records:not([data-nonblocking="true"])::backdrop{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;pointer-events:none}
body:has(#cy-audience-records:not([data-nonblocking="true"]):popover-open,#cy-audience-records:not([data-nonblocking="true"])[data-fallback]:not([hidden])):not(:has(dialog:modal))::after{
  content:"";
  inset:0;
  z-index:9999;
  background:rgb(0 0 0 / 55%);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  pointer-events:auto;

}

/* Keep range, limit and page numbers on one row; only the page-number group moves to the right. */
#cy-audience-records .cy-record-paging-area>span{flex:none;white-space:nowrap}
#cy-audience-records .cy-record-pagination-controls>.bp-pagination-nav{margin-left:auto;flex-wrap:nowrap}

/* Records use one rounded-row highlight; nested action buttons never paint a second rectangle. */
#cy-audience-records .cy-audience-record-open,#cy-audience-records .cy-audience-remove{background-image:none!important;background-color:transparent!important}
#cy-audience-records .cy-audience-record-row:hover,#cy-audience-records .cy-audience-record-row:has(>.cy-audience-record-open:focus-visible){background-color:var(--cy-white-10)!important}
#cy-audience-records .cy-audience-record-open:focus-visible{outline:none;box-shadow:none}
#cy-audience-records .cy-audience-record-row:has(>.cy-audience-record-open:focus-visible){outline:1px solid var(--cy-tab-accent)!important;outline-offset:0}

/* Record dialog: clear beside close; selected page text stays white in both themes. */
#cy-audience-records>header{min-height:32px;margin-bottom:20px}
#cy-audience-records>header>div:first-child{flex:1;min-width:0}
#cy-audience-records .cy-record-header-actions{display:flex;align-items:center;gap:12px;flex:none}
#cy-audience-records .cy-record-header-actions>[data-record-clear]{display:grid;place-items:center;width:64px;height:36px;min-height:36px;padding:0;border:1px solid var(--cy-white-10);border-radius:4px;background:transparent;color:var(--cy-white-55);font:400 14px/14px 'PingFang SC',sans-serif}
#cy-audience-records .cy-record-header-actions>[data-record-action="close"]{display:grid;place-items:center;width:14px;height:14px;padding:0;border:0;background:transparent;color:inherit;flex:none}
#cy-audience-records .cy-record-header-actions>[data-record-action="close"]>img{display:block;width:14px;height:14px}
#cy-audience-records .bp-pagination-nav>button[aria-current="page"],#cy-audience-records .bp-page-jump-select.is-current{color:rgb(255 255 255 / 95%)}

/* Approved header gap stays 20px; compact search and remove the idle status spacer. */
#cy-audience-records .cy-audience-record-tools{width:100%;max-width:100%;margin-bottom:20px}
#cy-audience-records .cy-audience-record-tools input{width:100%;max-width:100%}
#cy-audience-records .cy-record-add-status[hidden]{display:none!important}
#cy-audience-records .cy-record-add-status{margin-bottom:8px}

/* The audience tag entry is a persistent header action, including pages without filters. */
.workspace-header{position:relative;min-height:62px;background:var(--cy-white-5)}
.workspace-header .filter-bar{padding-right:188px;background:transparent}
#workspace-panel :is(.record-trigger,.bp-record-trigger,.global-audience-records,[data-cy-records]){display:none!important}
.workspace-header>#cy-top-audience-tags{position:absolute!important;inset:15px 30px auto auto!important;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;min-width:136px;width:max-content;height:32px;min-height:32px;margin:0;padding:0 16px;border:0;border-radius:4px;outline:1px solid var(--cy-record-accent-line);outline-offset:0;background:var(--cy-record-accent-fill);color:var(--cy-tab-accent,#7197ff);font:500 16px/16px 'PingFang SC',sans-serif;letter-spacing:0px;text-align:center;white-space:nowrap;cursor:pointer;z-index:2;--cy-record-accent-line:rgb(113 151 255 / .35);--cy-record-accent-fill:rgb(113 151 255 / .1)}
.workspace-header>#cy-top-audience-tags:hover:not(:disabled){background:rgb(113 151 255 / .15)}
.workspace-header>#cy-top-audience-tags:focus-visible{outline:2px solid var(--cy-tab-accent,#7197ff);outline-offset:3px}
.workspace-header>#cy-top-audience-tags>img{display:block;flex:none;width:18px;height:18px}
.workspace-header>#cy-top-audience-tags>.cy-top-audience-label{display:block;font:inherit;line-height:16px}
.workspace-header>#cy-top-audience-tags>.oneid-record-count{position:absolute;inset:-8px -8px auto auto!important;display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:22px;width:max-content;height:22px;padding:0 4px;border:0;border-radius:999px;background:var(--cy-red,#e15454);color:#fff;font:700 14px/14px D-DIN,Inter,sans-serif;letter-spacing:0px;text-align:center;pointer-events:none}
html[lang="en"] .workspace-header>#cy-top-audience-tags,html[lang="en-US"] .workspace-header>#cy-top-audience-tags{font-family:Inter,sans-serif}
html[data-theme="light"] .workspace-header>#cy-top-audience-tags{color:var(--cy-tab-accent,#3d5bf6);--cy-record-accent-line:rgb(61 91 246 / .35);--cy-record-accent-fill:rgb(61 91 246 / .1)}
html[data-theme="light"] .workspace-header>#cy-top-audience-tags:hover:not(:disabled){background:rgb(61 91 246 / .15)}

/* Preserve the emphasized entry against the light theme's shared button reset. */
html[data-theme="light"] .workspace-header>#cy-top-audience-tags{background:rgb(61 91 246 / .1)!important;color:#3d5bf6!important;outline:1px solid rgb(61 91 246 / .35)!important}
html[data-theme="light"] .workspace-header>#cy-top-audience-tags:hover:not(:disabled){background:rgb(61 91 246 / .15)!important}

/* Keep the last locked row visible and clearly selected until another audience is locked. */
#cy-audience-records [data-record-body]{padding:2px;scroll-padding-block:2px}
#cy-audience-records .cy-audience-record-row.is-recent,
#cy-audience-records .cy-audience-record-row.is-recent:hover,
#cy-audience-records .cy-audience-record-row.is-recent:has(>.cy-audience-record-open:focus-visible){background-color:color-mix(in srgb,var(--cy-primary,#3d5bf6) 14%,transparent)!important;outline:1px solid var(--cy-primary,#3d5bf6)!important;outline-offset:0}
#cy-audience-records .cy-audience-record-row.is-recent .cy-audience-record-open>span{color:var(--cy-white-95);font-weight:500}
#cy-audience-records .cy-record-add-status{height:14px;min-height:14px;font-size:14px;line-height:14px;font-weight:500;margin-bottom:12px}
#cy-audience-records .cy-record-add-status[data-tone="duplicate"]{color:var(--cy-tab-accent,#7197ff)}
.cy-audience-toast[data-tone="duplicate"] .cy-audience-toast-head strong{color:var(--cy-tab-accent,#7197ff)}



/* Keep the approved full record list; freeze its final width and remove entry-size transitions. */
html body #cy-audience-records{width:440px!important;max-width:min(440px,calc(100vw / var(--app-ui-scale,.75) - 24px))!important;animation:none!important;transition:none!important}
/* The compact result toast is fully sized and positioned before it becomes visible. */
html body #cy-audience-toast{animation:none!important;transition:none!important}
html body #cy-audience-toast.cy-audience-joined-toast{box-sizing:border-box;width:400px!important;max-width:calc(100vw / var(--app-ui-scale,.75) - 24px)!important;height:138px!important;min-height:138px!important;max-height:138px!important;overflow:hidden}
html body #cy-audience-toast.cy-audience-joined-toast p{height:20px;min-height:20px;line-height:20px;flex:none}
html body #cy-audience-toast.cy-audience-joined-toast p>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body #cy-audience-toast.cy-audience-joined-toast p>b{flex:none}

/* Joined acknowledgement is a brief, noninteractive top message; the full record list stays unchanged. */
html body #cy-audience-toast.cy-audience-joined-toast{height:64px!important;min-height:64px!important;max-height:64px!important;padding:10px 16px;gap:8px;justify-content:center;pointer-events:none}
html body #cy-audience-toast.cy-audience-joined-toast .cy-audience-toast-head{min-height:16px;height:16px;flex:none}
html body #cy-audience-toast.cy-audience-joined-toast p{height:16px;min-height:16px;line-height:16px}

/* Existing audiences receive their own red acknowledgement; new additions keep the green success title. */
html body #cy-audience-toast.cy-audience-joined-toast[data-tone="duplicate"] .cy-audience-toast-head strong{color:var(--cy-red,#e15454)}

/* Audience tags use the same red accent inside the panel; preserve text, counts and geometry. */
#cy-audience-records .cy-audience-record-tools>input[data-record-search]:is(:focus,:focus-visible){outline:2px solid color-mix(in srgb,var(--cy-red,#e15454) 35%,transparent)!important;outline-offset:0!important;box-shadow:none!important}
#cy-audience-records .cy-audience-record-row:has(>.cy-audience-record-open:focus-visible){outline:1px solid color-mix(in srgb,var(--cy-red,#e15454) 35%,transparent)!important;outline-offset:0}
#cy-audience-records .cy-audience-record-row.is-recent,
#cy-audience-records .cy-audience-record-row.is-recent:hover,
#cy-audience-records .cy-audience-record-row.is-recent:has(>.cy-audience-record-open:focus-visible){background-color:color-mix(in srgb,var(--cy-red,#e15454) 6%,transparent)!important;outline:1px solid color-mix(in srgb,var(--cy-red,#e15454) 35%,transparent)!important;outline-offset:0}

/* Audience-list amounts use a light Cy red tint for readable, restrained emphasis. */
#cy-audience-records .cy-audience-record-open>b.cy-audience-number{color:color-mix(in srgb,var(--cy-red,#e15454) 50%,var(--cy-white-95))!important}

/* Audience rows retain the same subtle Cy red on pointer hover as the approved selection. */
#cy-audience-records .cy-audience-record-row:hover{background-color:color-mix(in srgb,var(--cy-red,#e15454) 6%,transparent)!important;outline:1px solid color-mix(in srgb,var(--cy-red,#e15454) 35%,transparent)!important;outline-offset:0}

/* Keep the existing top audience trigger above its records backdrop, in its original header position. */
#workspace .workspace-header:has(>#cy-top-audience-tags[aria-expanded="true"]){z-index:10000!important}
#workspace .workspace-header>#cy-top-audience-tags[aria-expanded="true"]{z-index:10001!important;background:var(--cy-surface,#303241)!important}
/* Reapply the original mask to the rest of the lifted header, so other controls stay dimmed/blocked. */
body:has(#cy-audience-records:not([data-nonblocking="true"]):popover-open):not(:has(dialog:modal)) #workspace .workspace-header:has(>#cy-top-audience-tags[aria-expanded="true"])::before{content:"";position:absolute;inset:0;z-index:9999;background:rgb(0 0 0 / 55%);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);pointer-events:auto}

/* The audience reminder uses R4 and the selected-row Cy red35 outside stroke. */
html body #cy-audience-toast.cy-audience-joined-toast{border:0!important;border-radius:4px!important;outline:1px solid color-mix(in srgb,var(--cy-red,#e15454) 35%,transparent)!important;outline-offset:0!important;box-shadow:none!important}
