/* Match the neutral scrollbars in the shared Sorty UI. */
* { scrollbar-width:thin; scrollbar-color:var(--sorty-scroll-thumb) transparent; }
*::-webkit-scrollbar { width:4px; height:4px; }
*::-webkit-scrollbar-thumb { border-radius:999px; background:var(--sorty-scroll-thumb); }
*::-webkit-scrollbar-track { background:transparent; }

#irs-profile-results .irs-results-table-panel {
  --irs-table-scrollbar-height:6px;
  --irs-table-scrollbar-thumb:var(--sorty-scroll-thumb);
  --irs-table-scrollbar-hover:light-dark(#939397,#747479);
}

/* Opt in only while a visible scrollbar is required (see scroll-layout.js). */
[data-vault-scroll-layout] {
  scrollbar-width:auto !important;
  scrollbar-color:auto !important;
  scrollbar-gutter:stable;
}
[data-vault-scroll-layout]::-webkit-scrollbar { width:6px !important; height:6px !important; }
[data-vault-scroll-layout]::-webkit-scrollbar-thumb { background:var(--sorty-scroll-thumb); border:0; border-radius:999px; }
[data-vault-scroll-layout]::-webkit-scrollbar-track { background:transparent; }
[data-vault-scroll-layout]::-webkit-scrollbar-button { display:none; width:0; height:0; }

/* Vault page framing only. Results and player styles live in styles.css. */
#vault-scroll-top { position:fixed; z-index:41; display:grid; place-items:center; box-sizing:border-box; width:44px; height:44px; padding:0; border:1px solid var(--sp-border); border-radius:50%; background:var(--sp-panel); color:var(--sp-accent); box-shadow:0 4px 16px #0003; cursor:pointer; }
#vault-scroll-top[hidden] { display:none; }
#vault-scroll-top:hover { background:var(--sp-raised); border-color:var(--sp-accent); }
#vault-scroll-top:focus-visible { outline:3px solid var(--sp-accent); outline-offset:4px; }
.vault-access-screen { max-width:620px; margin:12vh auto !important; padding:32px; border:1px solid var(--sp-border,#d1d1d6); border-radius:24px; background:var(--sp-panel,#fff); color:var(--sp-ink,#2c2c2e); }
.vault-access-screen button { margin:12px 12px 0 0; padding:12px 16px; border-radius:10px; border:1px solid #1c1c1e; background:#1c1c1e; color:#fff; cursor:pointer; font:inherit; }
.vault-access-screen button:hover { background:#2c2c2e; }
.scan-icon-filled { display:none; }
[aria-selected=true] .scan-icon-filled, [aria-current=page] .scan-icon-filled, [aria-checked=true] .scan-icon-filled, .scan-icon-active .scan-icon-filled { display:initial; }
[aria-selected=true] .scan-icon-outline, [aria-current=page] .scan-icon-outline, [aria-checked=true] .scan-icon-outline, .scan-icon-active .scan-icon-outline { display:none; }
#category-tabs button, #library-sidebar .sidebar-project-menu button[data-project-category] { display:flex; align-items:center; gap:7px; }
#category-tabs .irs-metric-icon, .sidebar-project-menu .irs-metric-icon, .vault-header-trigger .irs-metric-icon, .vault-header-menu .irs-metric-icon { width:18px; height:18px; flex-shrink:0; }
.vault-header-trigger { display:flex; align-items:center; gap:7px; min-width:0; padding:10px 0; border:0; background:transparent; color:var(--sp-text); font:inherit; font-size:13px; font-weight:650; cursor:pointer; }
.vault-header-trigger span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vault-chevron { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; line-height:1; }
.vault-chevron svg { display:block; }
.vault-platform-icon { display:block;flex-shrink:0; }
.vault-platform-trigger { align-items:center;justify-content:center; }
#vault-creators-trigger { min-width:0; max-width:220px; }
#vault-creators-trigger .vault-creators-label { min-width:0; }
#vault-creators-trigger[aria-expanded=true] .scan-icon-outline { display:none; }
#vault-creators-trigger[aria-expanded=true] .scan-icon-filled { display:initial; }
.vault-creator-menu { width:280px; }
.vault-creator-menu .vault-creator-option { display:flex; align-items:center; gap:8px; min-height:42px; padding:0 12px 0 0; border-radius:6px; }
.vault-creator-menu .vault-creator-option[data-selected=true] { background:var(--popout-hover); color:var(--popout-accent); }
.vault-creator-menu .vault-creator-main { flex:1; min-width:0; width:auto; padding:7px 12px; border-radius:6px; color:inherit; }
.vault-creator-menu .vault-creator-main:is(:hover,:focus-visible) { background:var(--popout-hover); color:var(--popout-accent); }
.vault-creator-menu .vault-creator-main img { flex:0 0 28px; width:28px; height:28px; border-radius:50%; object-fit:cover; }
.vault-creator-menu .vault-creator-main span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vault-creator-menu .vault-creator-select { position:relative; display:grid; place-items:center; flex:0 0 24px; width:24px; height:24px; min-height:24px; padding:0; border:1px solid var(--sp-muted); border-radius:50%; background:var(--sp-panel); color:var(--sp-ink); }
.vault-creator-menu .vault-creator-select:is(:hover,:focus-visible) { border-color:var(--popout-accent); background:var(--popout-hover); color:var(--popout-accent); box-shadow:0 0 0 3px var(--popout-hover); }
.vault-creator-menu .vault-creator-select svg { visibility:hidden; }
.vault-creator-menu .vault-creator-select[aria-checked=true] { background:var(--sp-accent); border-color:var(--sp-accent); color:var(--sp-ink); }
.vault-creator-menu .vault-creator-select[aria-checked=true] svg { visibility:visible; }
.vault-creator-menu .vault-creator-select[aria-checked=true]:is(:hover,:focus-visible) { background:var(--sp-accent); color:var(--sp-ink); }
.vault-creator-menu button:focus-visible { outline:2px solid var(--popout-accent); outline-offset:-2px; }
.vault-creators-all-row { display:flex; align-items:center; border-radius:6px; }
.vault-creators-all-row:has([data-all-creators][aria-checked=true]) { background:var(--popout-hover); }
.vault-creator-menu .vault-creators-all-row > [data-all-creators] { flex:1; width:auto; min-width:0; min-height:36px; box-sizing:border-box; padding:9px 12px; border-radius:6px; line-height:18px; }
.vault-creator-menu .vault-creators-all-row > [data-all-creators]:is(:hover,:focus-visible,[aria-checked=true]) { background:var(--popout-hover); color:var(--popout-accent); }
.project-header-picker .vault-header-trigger { width:100%; }
.sidebar-project-trigger > .irs-metric-icon { width:18px; height:18px; color:inherit; }
#page-heading { --heading-sticky-top:18px; position:sticky; top:var(--heading-sticky-top); z-index:38; }
/* Keep the original short top fade, but cover the 20px upper corner radius
   before fading so scrolling section borders cannot peek beside the corners. */
#page-heading::before { content:""; position:fixed; z-index:-2; inset:0 0 auto; height:calc(var(--heading-sticky-top) + 20px + 24px); background:linear-gradient(to bottom,var(--sp-bg) 0,var(--sp-bg) calc(var(--heading-sticky-top) + 20px),transparent 100%); pointer-events:none; }
#page-heading::after { content:""; position:absolute; z-index:-1; inset:-1px; border:1px solid var(--sp-border); border-radius:inherit; background:var(--sp-panel); pointer-events:none; }
@media(max-width:1000px) { #page-heading { --heading-sticky-top:60px; } }
#page-heading #subtitle .vault-header-trigger { padding:10px; border:1px solid var(--sp-border); border-radius:10px; background:var(--sp-raised); }
.vault-header-menu { position:fixed; inset:auto; margin:0; padding:0; min-width:190px; max-width:calc(100vw - 24px); max-height:calc(100vh - 24px); overflow:auto; border:1px solid var(--sp-border); border-radius:9px; background:var(--sp-raised); color:var(--sp-text); box-shadow:0 16px 38px #0005; scrollbar-width:thin; scrollbar-color:var(--sorty-scroll-thumb) transparent; }
.vault-header-menu button { display:flex; align-items:center; gap:8px; width:100%; padding:10px 12px; border:0; background:transparent; color:var(--sp-text); font:inherit; font-size:12px; text-align:left; cursor:pointer; }
.vault-header-menu button:hover, .vault-header-menu button[aria-checked=true] { background:var(--sp-panel); color:var(--sp-accent); }
.vault-header-menu button:focus-visible, .vault-header-trigger:focus-visible { outline:2px solid var(--sp-accent); outline-offset:-2px; }
.vault-project-dialog { box-sizing:border-box; width:440px; max-width:calc(100vw - 32px); max-height:calc(100vh - 32px); padding:24px; border:1px solid var(--sp-border); border-radius:20px; background:var(--sp-panel); color:var(--sp-text); box-shadow:0 24px 70px rgba(0,0,0,.3); font:inherit; }
.vault-project-dialog::backdrop { background:rgba(0,0,0,.45); backdrop-filter:blur(3px); }
.vault-project-dialog h2 { margin:0 0 12px; font-size:20px; }
.vault-project-dialog p { font-size:13px; line-height:1.6; color:var(--sp-muted); overflow-wrap:anywhere; }
.vault-project-dialog label { display:grid; gap:8px; font-size:12px; font-weight:650; }
.vault-project-dialog input { box-sizing:border-box; width:100%; padding:10px 12px; border:1px solid var(--sp-border); border-radius:8px; background:var(--sp-raised); color:var(--sp-text); font:inherit; }
.vault-dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
.vault-dialog-actions button { padding:9px 14px; border:1px solid var(--sp-border); border-radius:8px; background:var(--sp-raised); color:var(--sp-text); font:inherit; font-size:12px; font-weight:650; cursor:pointer; }
.vault-dialog-actions .vault-dialog-primary { background:var(--sp-accent); border-color:var(--sp-accent); color:var(--sp-ink); }
.vault-dialog-actions .vault-dialog-danger { background:rgba(254,0,4,.14); border-color:rgba(254,0,4,.45); }
.vault-dialog-actions .vault-dialog-danger:hover { background:#fe0004; color:white; }
.vault-dialog-actions button:disabled { opacity:.55; cursor:wait; }
.vault-project-dialog :focus-visible { outline:2px solid var(--sp-accent); outline-offset:3px; }
.vault-project-dialog .vault-dialog-error { color:#e35255; margin-bottom:0; }
.vault-dialog-error:empty { display:none; }
:root { color-scheme: dark; --sp-bg:#0d0f14; --sp-panel:#1c1c1e; --sp-raised:#2c2c2e; --sp-text:#f5f5f7; --sp-muted:#a1a1a6; --sp-border:rgba(161,161,166,.2); --sp-accent:#f5f5f7; --sp-ink:#1c1c1e; }
#project-browser { margin:0 0 16px; }
#project-browser * { box-sizing:border-box; }
.project-combined { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; padding:14px; border:1px solid var(--sp-border); border-radius:20px; background:var(--sp-panel); }
#project-browser .project-picker { display:none; }
#project-browser .project-combined > .project-section { min-width:0; margin:0; padding:14px; }
#project-browser .project-combined > .project-picker { display:none; }
.project-picker-actions { display:flex; gap:8px; min-width:0; }
#project-switch { min-width:0; flex:1; width:100%; padding:10px; border:1px solid var(--sp-border); border-radius:10px; background:var(--sp-raised); color:var(--sp-text); font:inherit; font-weight:650; text-overflow:ellipsis; }
#project-switch:focus-visible { outline:2px solid var(--sp-accent); outline-offset:2px; }
.project-folder-tile { display:flex; flex:1; min-height:120px; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:12px; border:1px solid var(--sp-border); border-radius:14px; background:var(--sp-raised); color:var(--sp-accent); }
.project-folder-tile svg { width:58px; height:58px; }
#project-browser .project-folder-tile h2 { font-size:14px; text-align:center; color:var(--sp-text); overflow-wrap:anywhere; }
@media(max-width:760px) { .project-combined { grid-template-columns:minmax(0,1fr); } .project-folder-tile { min-height:80px; } }
.project-section { border:1px solid var(--sp-border); background:var(--sp-panel); border-radius:18px; padding:20px; margin-bottom:14px; }
.project-section:first-child { display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.project-section h2 { font-size:18px; margin:0; }
#project-browser button { cursor:pointer; border:1px solid var(--sp-border); border-radius:10px; padding:10px 16px; background:var(--sp-raised); color:var(--sp-text); font:inherit; font-weight:650; }
#project-browser button:hover { border-color:var(--sp-accent); }
#project-browser button:focus-visible { outline:2px solid var(--sp-accent); outline-offset:3px; }
#project-browser button[aria-pressed=true], #project-browser button[aria-selected=true] { background:var(--sp-accent); color:var(--sp-ink); border-color:var(--sp-accent); }
#project-browser button:disabled { opacity:.5; cursor:default; }
.project-list { display:flex; gap:12px; overflow-x:auto; flex:1; min-width:180px; padding:4px; }
#project-browser .project-tile { min-width:170px; max-width:260px; display:flex; gap:12px; align-items:center; min-height:76px; text-align:left; flex-shrink:0; }
.project-tile span { font-size:30px; }
.project-tile strong { overflow-wrap:anywhere; }
#category-tabs { display:flex; gap:10px; flex-wrap:wrap; }
.scan-types-toolbar { display:flex; align-items:flex-start; gap:12px; }
.scan-types-toolbar #category-tabs { flex:1; min-width:0; }
#project-browser[hidden] { display:none; }
#project-browser > .project-combined { transform-origin:top left; }
.project-creators { display:flex; gap:12px; overflow-x:auto; padding:14px 2px 2px; }
.creator-strip { display:flex; align-items:center; gap:12px; }
.creator-strip .project-creators { flex:1; min-width:0; }
#next-projects { flex-shrink:0; }
#project-browser .project-creator { position:relative; flex:0 0 150px; min-width:0; border:1px solid var(--sp-border); border-radius:10px; background:transparent; }
#project-browser .project-creator-main, #project-browser #project-all { display:flex; flex-direction:column; align-items:center; gap:3px; width:100%; min-width:0; padding:12px; background:transparent; color:var(--sp-text); }
#project-browser .project-creator-main { border:0; height:100%; }
#project-browser .project-creator-main[aria-pressed=true] { background:transparent; color:var(--sp-text); }
#project-browser .project-creator:hover { border-color:var(--sp-accent); }
#project-browser .project-creator[data-selected=true], #project-browser #project-all[aria-pressed=true] { background:transparent; color:var(--sp-text); border-color:var(--sp-accent); box-shadow:inset 0 0 0 1px var(--sp-accent); }
.project-creator img { width:68px; height:68px; border-radius:50%; object-fit:cover; }
.project-creator img, .project-all-icon { margin-bottom:6px; }
.project-all-icon { display:grid; place-items:center; box-sizing:border-box; width:68px; height:68px; border:1px solid var(--sp-border); border-radius:50%; background:var(--sp-raised); color:var(--sp-accent); }
.project-creator strong { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:20px; }
.project-creator-count, #project-empty { color:var(--sp-muted); font-size:12px; line-height:18px; }
#project-browser .project-creator-select { position:absolute; top:6px; right:6px; width:24px; height:24px; padding:0; border-radius:50%; display:grid; place-items:center; background:var(--sp-panel); border-color:var(--sp-muted); }
/* Expand the selection hit target across the corner without enlarging the circle. */
.project-creator-select::before { content:""; position:absolute; top:-7px; right:-7px; width:40px; height:40px; }
#project-browser .project-creator-select[hidden] { display:none; }
.project-creator-select svg { visibility:hidden; }
#project-browser .project-creator-select[aria-checked=true] { background:var(--sp-accent); color:var(--sp-ink); border-color:var(--sp-accent); }
.project-creator-select[aria-checked=true] svg { visibility:visible; }
.project-create-popout { width:320px; min-width:0; }
.project-create-popout form { display:grid; gap:12px; padding:10px; }
.project-create-popout label { display:grid; gap:6px; font-size:12px; }
.project-create-popout input { width:100%; }
.project-create-popout [role=status] { margin:0; color:#fe0004; font-size:12px; }
.project-create-actions { display:flex; justify-content:flex-end; gap:8px; }
.project-create-actions button { width:auto; padding:8px 12px; border:1px solid var(--sp-border); border-radius:8px; background:var(--sp-raised); color:var(--sp-text); font:inherit; font-size:12px; cursor:pointer; }
.project-create-actions button[type=submit] { background:var(--sp-accent); border-color:var(--sp-accent); color:var(--sp-ink); font-weight:650; }
@media(prefers-color-scheme:light) { :root { color-scheme:light; --sp-bg:#fff; --sp-panel:#fff; --sp-raised:#f2f2f7; --sp-text:#1c1c1e; --sp-muted:#68686e; --sp-border:rgba(28,28,30,.17); --sp-accent:#1c1c1e; --sp-ink:#fff; } }
@media(max-width:600px) { .project-section { padding:14px; } .project-list { flex-basis:100%; order:2; } #category-tabs button { flex:1 1 40%; } }
main, #page-heading, #export-panel, #export-panel * { box-sizing: border-box; }
/* Keep every Saved route aligned whether or not the page needs to scroll. */
html { scrollbar-gutter:stable; }
body { margin: 0; background: var(--sp-bg); color: #f5f5f7; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
main { max-width: 1600px; margin: 24px auto; padding: 0 18px 50px; }
/* Result columns use the shared Published-date-safe container breakpoints. */
#irs-profile-results .irs-profile-results-header { min-height:0; padding:16px 20px; }
/* Cap the entire library frame, including sidebar, gap and outer padding. */
.has-library-sidebar { --library-gutter:max(18px, calc((100% - 1600px) / 2 + 18px)); --library-width:clamp(250px,calc(15.625vw + 70px),295px); }
.has-library-sidebar main { max-width:1249px; margin:18px var(--library-gutter) 24px calc(var(--library-gutter) + var(--library-width) + 20px); padding:0 0 50px; min-width:0; }
#library-sidebar { box-sizing:border-box; position:fixed; top:18px; bottom:18px; left:var(--library-gutter,18px); width:var(--library-width,295px); z-index:40; overflow:auto; padding:22px 14px; border:1px solid var(--sp-border); border-radius:20px; background:var(--sp-panel); color:var(--sp-text); box-shadow:0 16px 40px rgba(0,0,0,.12); }
#library-brand-header { display:none; box-sizing:border-box; position:fixed; top:18px; left:var(--library-gutter,18px); width:var(--library-width,295px); height:72px; padding:14px 16px; align-items:center; gap:9px; border:1px solid var(--sp-border); border-radius:20px; background:var(--sp-panel); color:var(--sp-text); box-shadow:0 16px 40px rgba(0,0,0,.12); z-index:40; }
.has-library-sidebar #library-brand-header { display:flex; }
.library-brand-mark { display:grid; place-items:center; flex:0 0 31px; height:31px; border:1px solid currentColor; border-radius:8px; color:light-dark(#16885b,#5ee6a8); background:var(--sp-raised); font-size:16px; font-weight:850; letter-spacing:-1px; }
.library-brand-wordmark { min-width:0; }
.library-brand-wordmark strong { display:block; font-size:17px; font-weight:850; letter-spacing:-.4px; line-height:1; }
.library-brand-wordmark > span { display:block; margin-top:3px; color:var(--sp-muted); font-size:10px; font-weight:650; line-height:1; }
.library-plan-badge { margin-left:auto; padding:5px 8px; border:1px solid var(--sp-border); border-radius:6px; color:var(--sp-text); background:var(--sp-raised); font-size:10px; font-weight:800; line-height:1; }
.has-library-sidebar #library-sidebar { top:102px; }
#library-sidebar h2 { font-size:12px; text-transform:uppercase; letter-spacing:.1em; color:var(--sp-muted); margin:24px 10px 8px; }
#library-sidebar h3 { font-size:14px; margin:18px 10px 8px; }
#library-sidebar button, #library-sidebar summary { box-sizing:border-box; width:100%; padding:10px 12px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--sp-text); font:inherit; text-align:left; cursor:pointer; overflow-wrap:anywhere; }
#library-sidebar summary { font-weight:650; }
#library-sidebar details { margin:4px 0; }
#library-sidebar details button { padding-left:30px; }
#library-sidebar button:hover, #library-sidebar summary:hover { background:var(--sp-raised); border-color:var(--sp-border); }
#library-sidebar button[aria-current=page] { color:var(--sp-accent); background:var(--sp-raised); border-color:var(--sp-accent); }
#library-sidebar :focus-visible, #library-menu:focus-visible { outline:2px solid var(--sp-accent); outline-offset:2px; }
#library-menu { display:none; }
.has-library-sidebar #library-sidebar { bottom:auto; height:calc(100vh - 342px); min-height:280px; }
@media(max-width:1000px) {
  .has-library-sidebar { --library-width:min(325px,calc(100vw - 24px)); }
  .has-library-sidebar #library-sidebar { height:calc(100vh - 378px); }
}
.has-library-sidebar #project-list, .has-library-sidebar #next-projects { display:none; }
.has-library-sidebar .project-section:first-child { justify-content:space-between; }
#library-view { min-height:300px; padding:24px; border:1px solid var(--sp-border); border-radius:20px; background:var(--sp-panel); }
#library-view h1 { margin-top:0; }
.library-watchlist-header { padding-bottom:13px; border-bottom:1px solid var(--sp-border); font-size:16px; font-weight:850; letter-spacing:-.25px; }
.library-watchlist-tabs { display:flex; gap:6px; margin:14px 0 12px; }
.library-watchlist-tabs button { flex:1; min-height:32px; padding:6px 8px; border:1px solid var(--sp-border); border-radius:8px; background:var(--sp-raised); color:var(--sp-text); font-size:11px; font-weight:750; cursor:pointer; }
.library-watchlist-tabs button[aria-selected=true] { background:var(--sp-accent); border-color:var(--sp-accent); color:var(--sp-ink); }
.library-watchlist { display:grid; gap:8px; align-content:start; padding:2px 1px 12px; }
.library-watch-card { display:grid; grid-template-columns:45px minmax(0,1fr); column-gap:9px; padding:10px; border:1px solid var(--sp-border); border-radius:10px; background:var(--sp-panel); min-width:0; }
.library-watch-card img, .library-keyword-avatar { width:45px; height:45px; border-radius:50%; object-fit:cover; }
.library-watch-avatar { position:relative; width:45px; height:45px; }
.library-watch-platform { position:absolute; right:-2px; top:-2px; width:14px; height:14px; padding:1px; border:0; border-radius:50%; background:linear-gradient(35deg,#ffce54,#ed2675,#8f35d3); color:#fff; }
.library-watch-platform svg { display:block; width:100%; height:100%; }
.library-keyword-avatar { display:grid; place-items:center; font-size:19px; background:var(--sp-raised); color:var(--sp-accent); }
.library-watch-details { min-width:0; }
.library-watch-details a, .library-watch-details strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--sp-text); text-decoration:none; font-size:12px; font-weight:800; }
.library-watch-meta { margin-top:3px; color:var(--sp-muted); font-size:10px; }
.library-watch-actions { display:flex; gap:5px; grid-column:2; margin-top:8px; }
.library-watch-actions button { min-height:27px; padding:5px 8px; border:1px solid var(--sp-border); border-radius:7px; background:var(--sp-raised); color:var(--sp-text); font-size:10px; font-weight:750; cursor:pointer; }
.library-watch-actions button:hover { background:var(--sp-accent); border-color:var(--sp-accent); color:var(--sp-ink); }
.library-watch-actions .library-watch-delete { color:#b99093; border-color:rgba(185,144,147,.24); }
.library-watch-actions .library-watch-delete:hover { color:#fff; background:#fe0004; border-color:#fe0004; }
#library-view :focus-visible { outline:2px solid var(--sp-accent); outline-offset:2px; }
#page-heading, .library-page-header { box-sizing:border-box; height:72px; display:flex; align-items:center; gap:16px; padding:12px 18px; margin-bottom:12px; border:1px solid var(--sp-border); border-radius:20px; background:var(--sp-panel); color:var(--sp-text); box-shadow:0 16px 40px rgba(0,0,0,.08); }
#page-heading { background:transparent; border-color:transparent; box-shadow:0 4px 12px rgba(0,0,0,.05); }
#page-heading #title, .library-page-header h1 { flex-shrink:0; }
.project-header-picker { display:flex; align-items:center; gap:8px; min-width:80px; max-width:300px; border:1px solid var(--sp-border); border-radius:10px; padding:0 10px; background:var(--sp-raised); color:var(--sp-accent); }
.project-header-picker svg { flex-shrink:0; }
.project-header-picker #project-switch { border:0; padding:10px 0; }
#page-heading #subtitle { white-space:nowrap; }
#page-heading #title, .library-page-header h1 { margin:0; font-size:24px; line-height:1.3; padding:0; border:0; }
#page-heading #subtitle { display:flex; align-items:center; gap:8px; margin:0; color:var(--sp-muted); font-size:13px; }
#page-heading #subtitle:empty { display:none; }
#page-heading #subtitle > span { display:flex; color:var(--sp-accent); }
#library-view { padding:0; border:0; background:transparent; }
.library-page-header .library-watchlist-tabs { margin:0; flex:1; max-width:400px; min-width:0; }
@media(max-width:600px) {
 #page-heading, .library-page-header { gap:8px; padding:10px; }
 #page-heading #title, .library-page-header h1 { font-size:17px; }
 #page-heading #subtitle { display:none; }
 .project-header-picker { flex:1; padding:0 6px; gap:4px; }
 .project-header-picker #project-switch { font-size:11px; }
}
.library-watch-add { display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.library-watch-add input { flex:1; min-width:0; height:42px; box-sizing:border-box; padding:10px 12px; border:1px solid var(--sp-border); border-radius:10px; background:var(--sp-panel); color:var(--sp-text); font:inherit; font-size:13px; }
.library-watch-add-button { width:42px; height:42px; flex-shrink:0; border:1px solid var(--sp-accent); border-radius:10px; background:var(--sp-accent); color:var(--sp-ink); font-size:26px; font-weight:750; cursor:pointer; }
.library-watchlist { grid-template-columns:repeat(4,minmax(0,1fr)); }
.library-watch-card { grid-template-columns:64px minmax(0,1fr); align-items:center; }
.library-watch-card img, .library-watch-avatar, .library-keyword-avatar { width:64px; height:64px; }
.library-watch-details { height:64px; display:flex; flex-direction:column; justify-content:space-between; }
.library-watch-meta { margin:0; line-height:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.library-watch-actions { margin:0; }
.library-watch-actions button { min-height:24px; height:24px; padding:3px 7px; }
.library-watch-clear { margin-top:12px; padding:10px 14px; border:1px solid rgba(185,144,147,.3); border-radius:9px; color:#b99093; background:var(--sp-panel); cursor:pointer; }
.library-watch-clear:hover { color:#fff; background:#fe0004; border-color:#fe0004; }
@media(max-width:1250px) { .library-watchlist { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:520px) { .library-watchlist { grid-template-columns:minmax(0,1fr); } }
@media(max-width:1000px) {
  .has-library-sidebar #library-brand-header { display:none; top:60px; left:12px; width:var(--library-width); }
  .library-menu-open #library-brand-header { display:flex; }
  .has-library-sidebar #library-sidebar { top:144px; }
  .has-library-sidebar main { margin:70px 12px 24px; }
  #library-menu { display:block; position:fixed; top:12px; left:12px; z-index:42; padding:10px 14px; border:1px solid var(--sp-border); border-radius:10px; background:var(--sp-panel); color:var(--sp-text); cursor:pointer; }
  #library-sidebar { top:60px; left:12px; bottom:12px; width:var(--library-width); display:none; }
  #library-sidebar.is-open { display:block; }
}
.brand { color: #f5f5f7; letter-spacing: 2px; font-size: 11px; font-weight: 800; }
#page-heading h1 { font-size: 32px; margin: 10px 0 5px; letter-spacing: -.8px; }
#page-heading p, .muted { color: #a1a1a6; }
#export-panel { max-width: 720px; padding: 28px; background: #2c2c2e; border: 1px solid #48484a; border-radius: 16px; margin-top: 30px; }
#export-panel button, #export-panel .button { border: 1px solid #f5f5f7; border-radius: 10px; background: #f5f5f7; color: #1c1c1e; padding: 11px 17px; font-weight: 750; cursor: pointer; text-decoration: none; }
#export-panel a { color: #f5f5f7; }
progress { width: 100%; height: 12px; accent-color: #f5f5f7; }
#export-links { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
#status { color: #ffb7a9; overflow-wrap: anywhere; }
#scan-panel .irs-profile-sortbar { flex-wrap: wrap; }
#scan-panel .saved-sort-sticky .irs-profile-sortbar { position:sticky; top:var(--saved-sort-top,90px); z-index:37; background:var(--irs-profile-surface); box-shadow:0 6px 12px var(--irs-profile-shadow); }
.saved-card-creator {
  position:relative;
  pointer-events:auto;
  flex:0 0 auto;
  box-sizing:border-box;
  width:var(--irs-card-metric-height);
  height:var(--irs-card-metric-height);
  border-radius:50%;
  overflow:visible;
  order:2;
}
.saved-card-creator img { display:block; width:100%; height:100%; object-fit:cover; border-radius:50%; }
/* The badge overlaps the avatar on its upper-right diagonal.
   The card inset leaves room for the badge overhang. */
.saved-card-platform { position:absolute; top:calc(50% - (var(--irs-card-metric-height) - 1px) * .353553 - 2.5456px); left:calc(50% + (var(--irs-card-metric-height) - 1px) * .353553 + 2.5456px); transform:translate(-50%, -50%); display:grid; place-items:center; width:18px; height:18px; box-sizing:border-box; border:0; border-radius:50%; color:#fff; background:linear-gradient(35deg, #f9ce34, #ee2a7b 50%, #6228d7); }
.saved-card-platform svg { display:block; width:14px; height:14px; }
[hidden] { display: none !important; }
/* Keep the scroll track inset from each floating panel's rounded shell. */
#library-sidebar { display:flex; flex-direction:column; overflow:hidden; padding:8px; }
#library-sidebar > .library-panel-scroll { padding:8px 6px; overflow:hidden; }
#library-sidebar h2 { margin:12px 10px 4px; }
#library-sidebar h3 { margin:10px 10px 4px; }
#library-sidebar button { padding:8px 10px; }
#library-sidebar .sidebar-project-trigger { display:flex; align-items:center; gap:8px; overflow:hidden; white-space:nowrap; }
.sidebar-project { display:flex; align-items:center; gap:4px; }
.sidebar-project-box { display:flex;align-items:center;gap:4px;flex:1;min-width:0;padding:4px;border:1px solid transparent;border-radius:9px; }
.sidebar-project-box:has(.sidebar-project-trigger[aria-current=page]) { border-color:var(--sp-accent);background:var(--sp-raised);color:var(--sp-accent); }
#library-sidebar .sidebar-project-box .sidebar-project-trigger { padding:4px 6px;border:0;background:transparent; }
.sidebar-project-arrow { display:grid;place-items:center;flex:0 0 10px;cursor:pointer; }
#library-sidebar .sidebar-project-trigger { flex:1; min-width:0; }
#library-sidebar .sidebar-project-settings { flex:0 0 28px; width:28px; padding:5px; display:grid; place-items:center; color:var(--sp-muted); }
#library-sidebar .sidebar-project-settings svg { display:block; width:16px; height:16px; min-width:16px; aspect-ratio:1; }
#library-sidebar .sidebar-project-platform { flex:0 0 28px;width:28px;height:28px;padding:5px;display:grid;place-items:center;border:1px solid var(--sp-border);border-radius:8px;color:var(--sp-muted); }
#library-sidebar .sidebar-project-platform svg { width:16px;height:16px; }
#library-sidebar .sidebar-project-platform:hover, #library-sidebar .sidebar-project-platform[aria-pressed=true] { border-color:var(--sp-accent);color:var(--sp-accent); }
.sidebar-project-trigger svg { flex-shrink:0; color:var(--sp-accent); }
.sidebar-project-trigger span:first-of-type { flex:1; overflow:hidden; text-overflow:ellipsis; }
#sidebar-location { margin:6px 10px 0; padding-top:6px; border-top:1px solid var(--sp-border); color:var(--sp-muted); font-size:10px; line-height:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#library-sidebar .sidebar-project-pager { display:flex; align-items:center; justify-content:space-between; gap:8px; height:30px; color:var(--sp-muted); font-size:11px; }
#library-sidebar .sidebar-project-pager button { width:30px; padding:2px; }
#library-sidebar .sidebar-project-menu { position:fixed; inset:auto; margin:0; padding:0; width:190px; max-width:calc(100vw - 24px); border:1px solid var(--sp-border); border-radius:9px; background:var(--sp-raised); color:var(--sp-text); box-shadow:0 16px 38px rgba(0,0,0,.42); }
#library-sidebar .sidebar-project-menu button { display:block; width:100%; padding:10px 12px; border:0; border-radius:0; font-size:12px; font-weight:400; }
#library-sidebar .sidebar-project-menu button:hover, #library-sidebar .sidebar-project-menu button:focus-visible { background:var(--sp-panel); color:var(--sp-accent); }
#library-sidebar .sidebar-project-menu::backdrop { background:transparent; }
.library-panel-scroll { box-sizing:border-box; min-height:0; min-width:0; overflow-y:auto; overflow-x:hidden; flex:0 1 auto; scrollbar-width:thin; scrollbar-color:var(--sorty-scroll-thumb) transparent; }
.library-panel-scroll::-webkit-scrollbar { width:4px; }
.library-panel-scroll::-webkit-scrollbar-thumb { border-radius:999px; background:var(--sorty-scroll-thumb); }
/* Arrow-controlled strips retain touch/wheel scrolling, without a visible bar. */
#project-browser .project-creators, #project-browser .project-list { scrollbar-width:none; }
#project-browser .project-creators::-webkit-scrollbar, #project-browser .project-list::-webkit-scrollbar { display:none; width:0; height:0; }
@media(max-width:1000px) { #library-sidebar { display:none; } #library-sidebar.is-open { display:flex; } }
@media(max-width:540px) { main { padding: 0 8px; } }
@media (prefers-color-scheme: light) {
  body { background: var(--sp-bg); color: #1c1c1e; }
  #status { color: #963c29; }
  #export-panel { background: #fff; border-color: #d1d1d6; }
  .muted, #page-heading p { color: #68686e; }
  #export-panel a { color: #1c1c1e; }
}
/* Project chooser uses the same surface hierarchy and tabs as Results. */
@media(max-height:700px) {
 .project-creator img,.project-all-icon { width:52px; height:52px; margin-bottom:3px; }
 #project-browser .project-creator-main,#project-browser #project-all { padding:9px; }
 .project-creators { padding-top:10px; gap:10px; }
}
@media(min-width:1001px) and (max-width:1279px) {
 #page-heading { gap:10px; }
 .project-header-picker { max-width:180px; }
 #page-heading #subtitle { min-width:0; }
 #page-heading #subtitle .vault-header-trigger { min-width:0; }
}
/* Short laptop windows keep the tools reachable; only the menu content scrolls
   if its navigation cannot fit, rather than pushing Select below the viewport. */
@media(max-height:700px) {
 .has-library-sidebar #library-sidebar { min-height:0; }
 #library-sidebar > .library-panel-scroll { overflow-y:auto; }
 #library-sidebar h2 { margin-top:6px; }
 #library-sidebar button { padding-top:6px; padding-bottom:6px; }
}
@media(max-height:700px) and (max-width:1000px) {
 .has-library-sidebar #library-sidebar { height:calc(100vh - 384px); }
}
#project-browser { --project-bg:#1c1c1e; --project-soft:#3a3a3c; --project-strong:rgba(209,209,214,.38); --project-shadow:rgba(0,0,0,.38); }
#project-browser .project-combined { padding:10px; border-radius:24px; background:var(--project-bg); box-shadow:0 24px 70px var(--project-shadow); }
#project-browser .project-combined > .project-section { border-radius:16px; background:var(--sp-panel); }
#category-tabs { gap:7px; }
#project-browser #category-tabs button { height:34px; min-height:34px; padding:7px 11px; border-radius:8px; background:var(--sp-raised); color:var(--sp-muted); font-size:12px; box-shadow:none; }
#project-browser #category-tabs button:hover { background:var(--project-soft); color:var(--sp-text); border-color:var(--project-strong); }
#project-browser #category-tabs button[aria-selected=true] { background:var(--sp-accent); color:var(--sp-ink); border-color:var(--sp-accent); box-shadow:0 0 0 3px rgba(245,245,247,.09); }
#project-browser .project-creator { background:var(--sp-panel); }
#project-browser .project-creator:hover { background:var(--project-soft); border-color:var(--project-strong); }
#project-browser .project-creator[data-selected=true], #project-browser #project-all[aria-pressed=true] { background:var(--sp-raised); }
@media(prefers-color-scheme:light) {
 #project-browser { --project-bg:#e5e5ea; --project-soft:#e5e5ea; --project-strong:rgba(28,28,30,.4); --project-shadow:rgba(28,28,30,.14); }
}
/* One sidebar model at every viewport: expanded panels or an icon rail. */
body.has-library-sidebar { --library-expanded-width:clamp(250px,calc(15.625vw + 70px),295px); --library-width:var(--library-expanded-width); }
body.has-library-sidebar main { max-width:calc(1564px - var(--library-width) - 20px); margin:18px var(--library-gutter) 24px calc(var(--library-gutter) + var(--library-width) + 20px); padding:0 0 50px; }
body.has-library-sidebar #page-heading { --heading-sticky-top:18px; }
body.has-library-sidebar #library-brand-header { display:flex; top:18px; left:var(--library-gutter); width:var(--library-width); }
body.has-library-sidebar #library-sidebar { display:flex; top:102px; left:var(--library-gutter); width:var(--library-width); height:calc(100vh - 342px); }
#sidebar-collapse { margin-left:auto; display:grid; place-items:center; width:30px; height:30px; padding:4px; border:0; border-radius:7px; color:var(--sp-muted); background:transparent; cursor:pointer; }
#sidebar-collapse:hover { color:var(--sp-accent); background:var(--sp-raised); }
#rail-brand { display:contents; border:0; padding:0; color:inherit; background:transparent; }
#rail-brand .library-brand-mark { width:31px; min-width:31px; }
#library-rail { display:none; }
/* Visualization borrows one row from Menu; Filters and Select retain their size. */
body.has-library-sidebar.has-result-tools:not(.sidebar-collapsed) #library-sidebar { height:calc(100vh - 396px); }
body.has-library-sidebar.has-result-tools:not(.sidebar-collapsed) #library-rail { display:flex; position:fixed; left:var(--library-gutter); top:max(340px,calc(100vh - 282px)); width:var(--library-width); z-index:40; }
body:not(.sidebar-collapsed) #library-rail > button:not(#rail-visualization) { display:none; }
body:not(.sidebar-collapsed) #library-rail #rail-visualization { flex:1 1 auto; width:100%; display:flex; justify-content:flex-start; align-items:center; gap:8px; padding:0 14px; font-size:12px; font-weight:700; }
body.sidebar-collapsed #rail-visualization span { display:none; }
body.sidebar-collapsed { --library-width:56px; }
body.sidebar-collapsed #library-brand-header { padding:0; justify-content:center; border:0; border-radius:0; background:transparent; box-shadow:none; }
body.sidebar-collapsed #library-brand-header :is(.library-brand-wordmark,#sidebar-collapse) { display:none; }
body.sidebar-collapsed #rail-brand { display:grid; place-items:center; box-sizing:border-box; width:44px; height:44px; border:1px solid var(--sp-border); border-radius:12px; background:var(--sp-panel); cursor:pointer; }
body.sidebar-collapsed #rail-brand:hover { border-color:var(--sp-accent); background:var(--sp-raised); }
body.sidebar-collapsed #library-rail { display:flex; flex-direction:column; align-items:center; gap:8px; position:fixed; top:102px; bottom:18px; left:var(--library-gutter); width:56px; z-index:40; }
#library-rail button { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border:1px solid var(--sp-border); border-radius:12px; background:var(--sp-panel); color:var(--sp-muted); cursor:pointer; }
#library-rail button svg { width:20px; height:20px; }
#library-rail button:is(:hover,[aria-expanded=true]) { border-color:var(--sp-accent); color:var(--sp-accent); background:var(--sp-raised); }
#library-rail button:disabled { opacity:.35; cursor:not-allowed; }
#library-rail :is(#rail-filter,#rail-select) { position:relative; }
body.sidebar-collapsed.has-result-tools:has(.saved-result-tools :is(#irs-filter-custom,#irs-filter-days)[aria-pressed=true]) #rail-filter::after,
body.sidebar-collapsed.has-result-tools:has(.saved-result-tools #irs-selection-switch[aria-checked=true]) #rail-select::after { content:""; position:absolute; top:6px; right:6px; width:6px; height:6px; border-radius:50%; background:var(--sorty-neutral-text); pointer-events:none; }
#library-rail #sidebar-expand { margin-top:auto; }
body.sidebar-collapsed #library-rail #vault-account-menu-button { margin-top:auto; border-radius:50%; }
body.sidebar-collapsed #library-rail #vault-account-menu-button:not([hidden]) + #sidebar-expand { margin-top:0; }
body.sidebar-collapsed #library-sidebar { position:fixed; inset:auto; margin:0; width:min(295px,calc(100vw - 24px)); min-height:0; max-height:calc(100vh - 36px); overflow:visible; z-index:45; animation:sorty-popout-in 170ms cubic-bezier(.22,.8,.24,1); height:min(470px,calc(100vh - 36px)); }
body.sidebar-collapsed #library-sidebar > .library-panel-scroll { overflow-y:auto; }
body.sidebar-collapsed #library-sidebar:not(:popover-open) { display:none; }
.sidebar-brand-popout { width:190px; }
.sidebar-brand-popout strong,.sidebar-brand-popout span { display:block; padding:6px 10px; }
body.sidebar-collapsed #library-sidebar::backdrop { background:transparent; }
@media(prefers-reduced-motion:reduce) { body.sidebar-collapsed #library-sidebar { animation:none; } }

/* Account-connected workspace: authenticate before revealing any private UI. */
#vault-workspace[hidden], .vault-locked > :not(#vault-access-gate):not(script) { display:none !important; }
/* Reserve the sidebar's layout while the first route and dock anchor load. */
.vault-initializing :is(#vault-sidebar-shell,#library-rail) { visibility:hidden; pointer-events:none; }
.vault-access-screen { width:min(440px,calc(100vw - 40px)); margin:18vh auto 40px; padding:28px; border:1px solid var(--sp-border); border-radius:22px; background:var(--sp-panel); color:var(--sp-text); box-sizing:border-box; }
.vault-access-screen h1 { font-size:25px; line-height:1.25; letter-spacing:-.5px; margin:24px 0 8px; }
.vault-access-screen p { margin:0; font-size:14px; line-height:1.5; color:var(--sp-muted); }
.vault-gate-brand { display:flex; align-items:center; gap:12px; font-size:15px; }
.vault-gate-brand small { display:block; font-size:11px; font-weight:500; color:var(--sp-muted); }
#vault-access-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; align-items:center; }
#vault-access-actions button { border:0; padding:10px 14px; border-radius:10px; background:var(--sp-accent); color:var(--sp-ink); font:inherit; cursor:pointer; }
#vault-access-actions a { color:var(--sp-accent); font-size:13px; }
#vault-access-actions.signin a { display:block; box-sizing:border-box; width:100%; min-height:44px; padding:12px 16px; border-radius:10px; background:var(--sp-accent); color:var(--sp-ink); text-align:center; text-decoration:none; font-size:14px; font-weight:650; }
#vault-access-actions.signin a:focus-visible { outline:2px solid var(--sp-accent); outline-offset:4px; }
.library-vault-wordmark { flex:1; min-width:0; margin-left:auto; text-align:right; }
#library-brand-header > .library-brand-wordmark:not(.library-vault-wordmark) { flex-shrink:0; }
body.sidebar-collapsed #library-brand-header .library-vault-wordmark { display:none; }
#vault-folder-location { display:flex; justify-content:flex-end; align-items:center; gap:4px; min-width:0; color:var(--sp-muted); }
#vault-folder-location svg { flex:0 0 12px; }
#vault-folder-location-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
#vault-folder-location:focus-visible { outline:2px solid var(--sp-accent); outline-offset:4px; border-radius:3px; }
body.sidebar-collapsed #vault-folder-location { display:none; }
#library-sidebar > .library-panel-scroll { flex:1; min-height:0; overflow-y:auto; }
#vault-sidebar-footer { position:fixed; left:var(--library-gutter,18px); bottom:18px; width:var(--library-width,295px); height:56px; box-sizing:border-box; display:flex; align-items:center; gap:10px; padding:10px 16px; border:1px solid var(--sp-border); border-radius:20px; background:var(--sp-panel); color:var(--sp-text); box-shadow:0 16px 40px rgba(0,0,0,.12); z-index:40; }
body.has-library-sidebar:not(.sidebar-collapsed) #library-sidebar { height:calc(100vh - 188px); min-height:0; }
body.has-library-sidebar.has-result-tools:not(.sidebar-collapsed) #library-sidebar { height:calc(100vh - 464px); }
body.has-library-sidebar.has-result-tools:not(.sidebar-collapsed) #library-rail { top:max(272px,calc(100vh - 350px)); }
#vault-sidebar-footer #sidebar-collapse { width:30px; height:30px; flex:0 0 30px; padding:4px; }
body.sidebar-collapsed #vault-sidebar-footer { display:none; }
#vault-connection-status { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color:var(--sp-muted); }
#vault-connection-status > span { width:6px; height:6px; border-radius:50%; background:var(--sp-accent); }
#vault-sidebar-footer #vault-account-menu-button { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; padding:5px; border:1px solid var(--sp-border); border-radius:50%; background:var(--sp-raised); color:var(--sp-text); cursor:pointer; }
#vault-account-menu-button:hover { border-color:var(--sp-accent); }
#vault-account-menu { position:fixed; inset:auto; margin:0; padding:8px; width:min(280px,calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow:auto; border:1px solid var(--sp-border); border-radius:14px; background:var(--sp-panel); color:var(--sp-text); box-shadow:0 12px 40px #0003; }
#vault-account-menu p { margin:4px 8px 8px; padding-bottom:10px; border-bottom:1px solid var(--sp-border); font-size:12px; color:var(--sp-muted); overflow-wrap:anywhere; }
#vault-account-menu a, #vault-account-menu button { display:block; width:100%; box-sizing:border-box; padding:11px 10px; border:0; border-radius:8px; background:transparent; text-decoration:none; color:var(--sp-text); text-align:left; font:inherit; font-size:13px; cursor:pointer; }
#vault-account-menu :is(a,button):hover { background:var(--sp-raised); }
#vault-account-menu #vault-sign-out { color:#e98996; }
@media(prefers-color-scheme:light) { #vault-account-menu #vault-sign-out { color:#b42336; } }
#vault-access-gate[aria-busy="true"] { width:min(420px,calc(100vw - 48px)); margin:calc(50svh - 50px) auto 24px; padding:28px 20px; border-radius:24px; font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
#vault-access-gate[aria-busy="true"] .vault-opening-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
#vault-access-gate[aria-busy="true"] .vault-gate-brand { flex-shrink:0; font-size:20px; gap:12px; }
#vault-access-gate[aria-busy="true"] .vault-gate-brand small { font-size:12px; }
#vault-access-gate[aria-busy="true"] .library-brand-mark { width:44px; height:44px; flex:0 0 44px; border:0; border-radius:14px; background:linear-gradient(135deg,#59ef9d,#25c775); color:#09140f; font-size:16px; font-weight:900; box-shadow:0 12px 40px #59ef9d3d; }
#vault-access-gate[aria-busy="true"] h1 { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin:0; font-size:20px; font-weight:700; letter-spacing:normal; white-space:nowrap; text-align:right; }
#vault-access-gate[aria-busy="true"] h1::before { content:""; flex:0 0 1em; width:1em; height:1em; box-sizing:border-box; border:3px solid currentColor; border-right-color:transparent; border-radius:50%; animation:vault-opening 1s linear infinite; }
#vault-access-gate[aria-busy="true"] #vault-access-message { display:none; }
@keyframes vault-opening { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { #vault-access-gate[aria-busy="true"] h1::before { animation:none; } }
@media(max-width:440px) { #vault-access-gate[aria-busy="true"] { padding:24px 16px; } #vault-access-gate[aria-busy="true"] .vault-opening-row { gap:10px; } #vault-access-gate[aria-busy="true"] .vault-gate-brand { gap:8px; font-size:16px; } #vault-access-gate[aria-busy="true"] .library-brand-mark { width:32px; height:32px; flex-basis:32px; font-size:20px; } #vault-access-gate[aria-busy="true"] .vault-gate-brand small { font-size:10px; } #vault-access-gate[aria-busy="true"] h1 { font-size:16px; gap:6px; } }

/* Keep the sidebar's scroll area and content width stable in both states.
   Only the right track is reserved; overflow:auto still controls visibility. */
#library-sidebar > .library-panel-scroll {
  margin-inline:-8px;
  width:calc(100% + 16px);
  max-width:none;
  padding-inline:14px;
  scrollbar-gutter:stable;
  scrollbar-width:auto;
  scrollbar-color:auto;
}
#library-sidebar > .library-panel-scroll::-webkit-scrollbar { width:6px; height:6px; }
#library-sidebar > .library-panel-scroll::-webkit-scrollbar-thumb { background:var(--sorty-scroll-thumb); border:0; border-radius:999px; }
#library-sidebar > .library-panel-scroll::-webkit-scrollbar-track { background:transparent; }
#library-sidebar > .library-panel-scroll::-webkit-scrollbar-button { display:none; width:0; height:0; }

/* Reach the containing shell without changing the controls' usable width. */
.saved-result-tools .library-panel-scroll[data-vault-scroll-layout],
#irs-profile-results .irs-save-project-menu .irs-project-choices[data-vault-scroll-layout] {
  margin-left:calc(-1 * var(--vault-scroll-outset-start));
  margin-right:calc(-1 * var(--vault-scroll-outset-end));
  width:calc(100% + var(--vault-scroll-outset-start) + var(--vault-scroll-outset-end));
  max-width:none;
  padding-left:var(--vault-scroll-padding-start);
  padding-right:var(--vault-scroll-padding-end);
}

/* Creator Watchlist: one independent list per social platform. */
.library-watchlist-columns { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; align-items:start; }
.library-watch-column { min-width:0; padding:12px; border:1px solid var(--sp-border); border-radius:14px; background:var(--sp-panel); }
.library-watch-column h2 { display:flex; align-items:center; gap:8px; margin:0 0 14px; font-size:14px; line-height:22px; }
.library-watch-column h2 > svg { flex:none; }
.library-watch-column-count { margin-left:auto; min-width:22px; padding:0 5px; border-radius:6px; background:var(--sp-raised); color:var(--sp-muted); text-align:center; font-size:11px; font-weight:600; }
.library-watch-column-cards { display:grid; gap:8px; }
.library-watch-column .library-watch-card { grid-template-columns:44px minmax(0,1fr); gap:9px; padding:10px 8px; }
.library-watch-column .library-watch-avatar, .library-watch-column .library-watch-card img { width:44px; height:44px; }
.library-watch-column .library-watch-details { height:64px; }
.library-watch-column-empty, .library-watch-column-note { margin:0; color:var(--sp-muted); font-size:12px; line-height:1.6; }
.library-watch-column-empty { padding:18px 0; }
.library-watch-column-note { margin-top:12px; padding-top:12px; border-top:1px solid var(--sp-border); font-size:10px; }
.library-watch-platform[data-platform=TK] { background:#151515; }
.library-watch-platform[data-platform=YT] { background:#e62117; }
.library-watch-platform[data-platform=FB] { background:#1877f2; }
.library-watch-actions button:disabled { opacity:.45; cursor:not-allowed; background:var(--sp-raised); border-color:var(--sp-border); color:var(--sp-muted); }
.library-watch-search-button { width:auto; padding:0 18px; font-size:13px; }
.library-watch-suggestions { margin:0 0 16px; padding:12px; border:1px solid var(--sp-border); border-radius:12px; background:var(--sp-raised); }
.library-suggestions-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; font-size:12px; font-weight:650; color:var(--sp-muted); }
.library-suggestions-heading button { width:26px; height:26px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--sp-muted); font-size:20px; cursor:pointer; }
.library-suggestions-heading button:hover { background:var(--sp-panel); }
.library-suggestion-results { display:flex; gap:16px; flex-wrap:wrap; max-height:220px; overflow:auto; padding:4px; }
.library-suggestion-card { display:flex; flex-direction:column; align-items:center; gap:5px; width:110px; min-width:0; }
.library-suggestion-avatar { position:relative; width:56px; height:56px; }
.library-suggestion-avatar img { width:100%; height:100%; border-radius:50%; object-fit:cover; }
.library-suggestion-add { position:absolute; inset:0; display:grid; place-items:center; border:0; border-radius:50%; background:#111113a8; color:white; font-size:33px; line-height:1; font-weight:400; cursor:pointer; opacity:0; transition:opacity 150ms ease; }
.library-suggestion-card:hover .library-suggestion-add, .library-suggestion-add:focus-visible { opacity:1; }
.library-suggestion-add:disabled { opacity:1; color:#f5f5f7; cursor:default; }
.library-suggestion-avatar .library-watch-platform { pointer-events:none; }
.library-suggestion-card strong { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.library-suggestion-card > span { color:var(--sp-muted); font-size:10px; }
.library-suggestion-status { margin:0; color:var(--sp-muted); font-size:12px; }
@media(max-width:1050px) { .library-watchlist-columns { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 .library-watchlist-columns { grid-template-columns:minmax(0,1fr); }
 .library-page-header { height:auto; min-height:96px; flex-direction:column; align-items:stretch; justify-content:center; gap:10px; }
 .library-page-header h1 { padding-right:48px; }
 .library-page-header .library-watchlist-tabs { flex:none; max-width:none; }
}
@media(hover:none) { .library-suggestion-add { opacity:1; } }
@media(prefers-reduced-motion:reduce) { .library-suggestion-add { transition:none; } }

/* Keep scan-page styling only on the approved creator columns and cards. */
.library-watch-page .library-watchlist-columns {
 box-sizing:border-box; padding:10px; gap:12px; border:1px solid var(--irs-profile-border); border-radius:24px;
 background:var(--irs-profile-bg); color:var(--irs-profile-text); box-shadow:0 24px 70px var(--irs-profile-shadow);
}
.library-watchlist-columns *, .library-watchlist-columns *::before, .library-watchlist-columns *::after { box-sizing:border-box; }
.library-watch-page .library-watch-column { padding:14px; border-radius:16px; background:var(--irs-profile-surface); }
.library-watch-page .library-watch-column h2 { margin-bottom:14px; }
.library-watch-page .library-watch-column-count { padding:3px 7px; border:1px solid var(--irs-profile-border); border-radius:5px; background:var(--irs-profile-surface-soft); color:var(--irs-profile-muted); }
.library-watch-page .library-watch-column-cards { gap:6px; }
.library-watch-page .library-watch-column .library-watch-card {
 grid-template-columns:40px minmax(0,1fr) 22px; height:66px; gap:8px; padding:6px 8px; border:0; border-radius:10px;
 background:var(--irs-profile-surface-soft); box-shadow:inset 0 0 0 1px var(--irs-profile-border-strong);
}
.library-watch-page .library-watch-column .library-watch-avatar,
.library-watch-page .library-watch-column .library-watch-card img { width:40px; height:40px; }
.library-watch-page .library-watch-column .library-watch-details { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:14px 14px; height:auto; gap:2px; align-content:center; }
.library-watch-page .library-watch-column .library-watch-details > a,
.library-watch-page .library-watch-column .library-watch-meta { margin:0; line-height:14px; }
.library-watch-page .library-watch-column .library-watch-actions { grid-column:3; display:flex; flex-direction:column; gap:4px; margin:0; align-items:center; justify-content:center; }
.library-watch-page .library-watch-column .library-watch-actions button { display:grid; place-items:center; flex:none; width:22px; min-height:22px; height:22px; padding:3px; }
/* Place the badge center on the avatar's circumference at 45 degrees. */
.library-watch-page .library-watch-column .library-watch-platform { right:auto; left:85.355%; top:14.645%; transform:translate(-50%,-50%); width:18px; height:18px; border-color:var(--irs-profile-surface-soft); }
@media(prefers-color-scheme:light) {
 .library-watch-page .library-watch-column .library-watch-card { background:var(--sp-bg); box-shadow:0 2px 8px #00000014; }
 .library-watch-page .library-watch-column .library-watch-platform { border-color:var(--sp-bg); }
 .library-watch-page .library-watch-column-count { background:#fff; }
}
@media(max-width:450px) {
 .library-watch-page .library-watchlist-columns { padding:8px; }
 .library-watch-page .library-watch-column { padding:10px; }
}


/* Keep the document still for modal dialogs, including the shared shadow-root
   confirmations and creator scan panel. Nested modals keep this rule active
   until the last one closes, without overwriting the player's scroll lock. */
html:has(dialog:modal,.sorty-dialog-host,[data-sorty-modal-open]) {
  overflow:hidden !important;
  overscroll-behavior:none;
}
