/* ListDome Category Bubble — lightweight floating discovery portal */
.ldcb {
    --ldcb-x: 24px;
    --ldcb-y: 28px;
    --ldcb-size: 58px;
    --ldcb-panel-w: 252px;
    position: fixed;
    right: var(--ldcb-x);
    bottom: var(--ldcb-y);
    z-index: 99992;
    width: var(--ldcb-size);
    height: var(--ldcb-size);
    pointer-events: none;
    font-family: inherit;
}
#ld-category-bubble.ldcb.is-left { left: var(--ldcb-x); right: auto; }
#ld-category-bubble.ldcb.is-right { right: var(--ldcb-x); left: auto; }
#ld-category-bubble .ldcb__bubble {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ldcb-size);
    height: var(--ldcb-size);
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background:
        linear-gradient(#081023,#081023) padding-box,
        linear-gradient(135deg,#A737FF 0%,#7D4BE2 52%,#38B6FF 100%) border-box;
    color: #fff;
    box-shadow: 0 12px 30px rgba(0,0,0,.38), 0 0 18px rgba(167,55,255,.22), 0 0 12px rgba(56,182,255,.14);
    cursor: grab;
    pointer-events: auto;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
#ld-category-bubble .ldcb__bubble:hover, 
#ld-category-bubble .ldcb__bubble:focus-visible, 
#ld-category-bubble.ldcb.is-open .ldcb__bubble {
    transform: translateY(-2px) scale(1.035);
    box-shadow: 0 15px 36px rgba(0,0,0,.44), 0 0 24px rgba(167,55,255,.32), 0 0 17px rgba(56,182,255,.22);
    outline: none;
}
#ld-category-bubble.ldcb.is-dragging .ldcb__bubble { cursor: grabbing; transform: scale(1.06); }
#ld-category-bubble .ldcb__halo {
    position: absolute;
    inset: 5px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: inset 0 0 18px rgba(56,182,255,.08);
    pointer-events: none;
}
#ld-category-bubble .ldcb__icon { display:flex; flex-direction:column; gap:4px; width:24px; }
#ld-category-bubble .ldcb__icon span { display:block; height:3px; border-radius:999px; background:#F5F7FB; box-shadow:0 0 8px rgba(56, 182, 255, .28); }
#ld-category-bubble .ldcb__icon span:nth-child(2) { width:18px; align-self:center; background:linear-gradient(90deg, #A737FF, #38B6FF); }
#ld-category-bubble .ldcb__badge {
    position:absolute;
    top:-5px;
    right:-5px;
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:22px;
    height:22px;
    padding:0 5px;
    border:2px solid #081023;
    border-radius:999px;
    background:linear-gradient(135deg,#A737FF,#38B6FF);
    color:#fff;
    font-size:10px;
    font-weight:700;
    line-height:1;
    box-shadow:0 4px 12px rgba(0,0,0,.30);
}
#ld-category-bubble .ldcb__panel {
    position: absolute;
    display:flex;
    flex-direction:column;
    width: min(var(--ldcb-panel-w), calc(100vw - 28px));
    max-height: min(var(--ldcb-panel-max-h, 70vh), 590px);
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 18px;
    background: linear-gradient(#081023,#081023) padding-box, linear-gradient(135deg,#A737FF 0%,#7D4BE2 48%,#38B6FF 100%) border-box;
    color:#F5F7FB;
    box-shadow:0 24px 64px rgba(0,0,0,.50),0 0 28px rgba(167,55,255,.16),0 0 18px rgba(56,182,255,.10);
    pointer-events:auto;
    opacity:0;
    transform:translateY(10px) scale(.975);
    transform-origin:bottom right;
    transition:opacity .16s ease, transform .16s ease;
}
#ld-category-bubble .ldcb__panel[hidden] { display:none !important; }
#ld-category-bubble.ldcb.is-open .ldcb__panel { opacity:1; transform:translateY(0) scale(1); }
#ld-category-bubble.ldcb.is-right .ldcb__panel { right:0; }
#ld-category-bubble.ldcb.is-left .ldcb__panel { left:0; }
#ld-category-bubble.ldcb.is-open-up .ldcb__panel { bottom:calc(var(--ldcb-size) + 12px); top:auto; }
#ld-category-bubble.ldcb.is-open-down .ldcb__panel { top:calc(var(--ldcb-size) + 28px); bottom:auto; }
#ld-category-bubble.ldcb.is-right.is-open-up .ldcb__panel { transform-origin:bottom right; }
#ld-category-bubble.ldcb.is-left.is-open-up .ldcb__panel { transform-origin:bottom left; }
#ld-category-bubble.ldcb.is-right.is-open-down .ldcb__panel { transform-origin:top right; }
#ld-category-bubble.ldcb.is-left.is-open-down .ldcb__panel { transform-origin:top left; }
#ld-category-bubble.ldcb.is-open-down .ldcb__panel { transform:translateY(-10px) scale(.975); }
#ld-category-bubble.ldcb.is-open.is-open-down .ldcb__panel { transform:translateY(0) scale(1); }
#ld-category-bubble .ldcb__head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-height:64px;
    padding:10px 10px 10px 14px;
    background:linear-gradient(115deg,#A737FF 0%,#7D4BE2 52%,#38B6FF 100%);
    box-shadow:inset 0 -1px 0 rgba(255,255,255,.14);
}
#ld-category-bubble .ldcb__eyebrow { font-size:10px; line-height:1.1; letter-spacing:.12em; text-transform:uppercase; color:rgba(255, 255, 255, .78); }
#ld-category-bubble .ldcb__title { margin-top:3px; font-size:16px; font-weight:700; line-height:1.15; color:#fff; }
#ld-category-bubble .ldcb__close {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 32px;
    width:32px;
    height:32px;
    padding:0;
    border:1px solid rgba(255,255,255,.28);
    border-radius:999px;
    background:#081023;
    color:#fff;
    font-size:21px;
    line-height:1;
    cursor:pointer;
    box-shadow:0 5px 14px rgba(0,0,0,.24);
}
#ld-category-bubble .ldcb__body {
    display:flex;
    flex:1 1 auto;
    min-height:0;
    flex-direction:column;
    gap:4px;
    max-height:none;
    overflow:auto;
    padding:8px;
    scrollbar-width:thin;
    scrollbar-color:rgba(56,182,255,.55) rgba(255,255,255,.04);
}
#ld-category-bubble .ldcb__body::-webkit-scrollbar { width:5px; }
#ld-category-bubble .ldcb__body::-webkit-scrollbar-track { background:rgba(255, 255, 255, .04); }
#ld-category-bubble .ldcb__body::-webkit-scrollbar-thumb { border-radius:999px; background:linear-gradient(180deg, #A737FF, #38B6FF); }
#ld-category-bubble .ldcb__link {
    display:grid;
    grid-template-columns:18px minmax(0,1fr);
    align-items:center;
    gap:8px;
    min-height:32px;
    padding:6px 9px;
    border:1px solid rgba(56,182,255,.13);
    border-radius:10px;
    background:#101a33;
    color:#F5F7FB;
    font-size:13px;
    font-weight:500;
    line-height:1.2;
    text-decoration:none !important;
    border-bottom:none !important;
    transition:transform .14s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease;
}
#ld-category-bubble .ldcb__link:visited {
    border-color:rgba(56,182,255,.13);
    background:#101a33;
    color:#F5F7FB;
    box-shadow:none;
    transform:none;
}
#ld-category-bubble .ldcb__link:hover, 
#ld-category-bubble .ldcb__link:focus-visible, 
#ld-category-bubble .ldcb__link:active {
    transform:translateX(2px);
    border-color:rgba(167,55,255,.58);
    background:linear-gradient(90deg,rgba(167,55,255,.22),rgba(56,182,255,.12)),#142447;
    color:#fff;
    box-shadow:inset 3px 0 0 #A737FF,0 5px 14px rgba(0,0,0,.18);
    outline:none;
}
#ld-category-bubble .ldcb__link.is-current, 
#ld-category-bubble .ldcb__link[aria-current="page"] {
    border-color:rgba(255,255,255,.22);
    background:linear-gradient(115deg,#A737FF 0%,#7D4BE2 58%,#38B6FF 100%);
    color:#fff;
    box-shadow:0 6px 16px rgba(125,75,226,.28);
}
#ld-category-bubble .ldcb__link, #ld-category-bubble .ldcb__link *, #ld-category-bubble .ldcb__link:visited, #ld-category-bubble .ldcb__link:hover, #ld-category-bubble .ldcb__link:focus-visible, #ld-category-bubble .ldcb__link:active { text-decoration:none !important; }
#ld-category-bubble .ldcb__globe { color:#38B6FF; font-size:14px; line-height:1; text-align:center; }
#ld-category-bubble .ldcb__link.is-current .ldcb__globe { color:#fff; }
#ld-category-bubble .ldcb__foot {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:8px 12px 9px;
    border-top:1px solid rgba(255,255,255,.07);
    background:#0b1429;
    color:#8EA5C9;
    font-size:10.5px;
}
#ld-category-bubble .ldcb__brand-dot { width:8px; height:8px; border-radius:999px; background:linear-gradient(135deg, #A737FF, #38B6FF); box-shadow:0 0 9px rgba(56, 182, 255, .35); }

@media (max-width:767px) {
    .ldcb { --ldcb-size:52px; --ldcb-panel-w:244px; --ldcb-x:14px; }
    #ld-category-bubble .ldcb__panel { max-height:min(var(--ldcb-panel-max-h, 72vh), 540px); border-radius:16px; }
    #ld-category-bubble .ldcb__head { min-height:58px; padding:9px 9px 9px 12px; }
    #ld-category-bubble .ldcb__title { font-size:14px; }
    #ld-category-bubble .ldcb__close { width:29px; height:29px; flex-basis:29px; font-size:19px; }
    #ld-category-bubble .ldcb__body { gap:3px; padding:7px; max-height:none; }
    #ld-category-bubble .ldcb__link { min-height:33px; padding:6px 8px; border-radius:9px; font-size:12.25px; }
    #ld-category-bubble .ldcb__badge { min-width:20px; height:20px; font-size:9px; }
}
@media (prefers-reduced-motion:reduce) {
    #ld-category-bubble .ldcb__bubble, #ld-category-bubble .ldcb__panel, #ld-category-bubble .ldcb__link { transition:none !important; }
}

/* Bubble-enabled Home compatibility guard: preserve the established white AI Search input visual state.
   This is intentionally limited to the known ListDome AI Search input and does not alter layout or result geometry. */
body.home input.ai-search-input,
body.home input.ai-search-input:focus,
body.home input.ai-search-input:active,
body.home input.ai-search-input:-webkit-autofill,
body.home input.ai-search-input:-webkit-autofill:hover,
body.home input.ai-search-input:-webkit-autofill:focus {
    background: #fff !important;
    background-color: #fff !important;
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
}

/* v0.1.186: shared ListDome NIGHT / DAY theme for Category Bubble */
#ld-category-bubble .ldcb__bubble,
#ld-category-bubble .ldcb__panel,
#ld-category-bubble .ldcb__close,
#ld-category-bubble .ldcb__link,
#ld-category-bubble .ldcb__foot,
#ld-category-bubble .ldcb__theme-toggle,
#ld-category-bubble .ldcb__theme-toggle span {
    transition: background .32s ease, color .28s ease, border-color .28s ease, box-shadow .32s ease, transform .18s ease;
}
#ld-category-bubble .ldcb__theme-row {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex:0 0 auto;
    padding:7px 9px 6px;
    border-bottom:1px solid rgba(255,255,255,.06);
    background:#0b1429;
}
#ld-category-bubble .ldcb__theme-toggle {
    display:grid;
    grid-template-columns:1fr 1fr;
    align-items:center;
    flex:0 0 112px;
    min-width:112px;
    min-height:28px;
    padding:3px;
    border:1px solid rgba(56,182,255,.20);
    border-radius:999px;
    background:rgba(4,12,27,.62);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
    cursor:pointer;
    font:inherit;
}
#ld-category-bubble .ldcb__theme-toggle span {
    display:grid;
    place-items:center;
    min-height:20px;
    padding:0 5px;
    border-radius:999px;
    color:#7086A9;
    font-size:8px;
    font-weight:800;
    letter-spacing:.02em;
    white-space:nowrap;
}
#ld-category-bubble[data-theme="night"] .ldcb__theme-toggle .is-night,
#ld-category-bubble[data-theme="day"] .ldcb__theme-toggle .is-day {
    color:#fff;
    background:linear-gradient(100deg,#7D4BE2,#A737FF 52%,#38B6FF);
    box-shadow:0 3px 9px rgba(125,75,226,.24);
}

#ld-category-bubble[data-theme="day"] .ldcb__bubble {
    background:
        linear-gradient(145deg,rgba(255,255,255,.98),rgba(234,247,255,.98)) padding-box,
        linear-gradient(135deg,#A737FF 0%,#7D4BE2 48%,#38B6FF 100%) border-box;
    color:#081023;
    box-shadow:0 10px 26px rgba(31,82,119,.18),0 0 18px rgba(167,55,255,.14),0 0 14px rgba(56,182,255,.18);
}
#ld-category-bubble[data-theme="day"] .ldcb__bubble:hover,
#ld-category-bubble[data-theme="day"] .ldcb__bubble:focus-visible,
#ld-category-bubble[data-theme="day"].is-open .ldcb__bubble {
    box-shadow:0 13px 30px rgba(31,82,119,.22),0 0 23px rgba(167,55,255,.20),0 0 18px rgba(56,182,255,.22);
}
#ld-category-bubble[data-theme="day"] .ldcb__halo {
    border-color:rgba(8,16,35,.08);
    box-shadow:inset 0 0 18px rgba(56,182,255,.10);
}
#ld-category-bubble[data-theme="day"] .ldcb__icon span {
    background:#233653;
    box-shadow:0 0 7px rgba(56,182,255,.18);
}
#ld-category-bubble[data-theme="day"] .ldcb__icon span:nth-child(2) {
    background:linear-gradient(90deg,#A737FF,#38B6FF);
}
#ld-category-bubble[data-theme="day"] .ldcb__badge {
    border-color:#EEF8FF;
    box-shadow:0 4px 12px rgba(31,82,119,.18);
}
#ld-category-bubble[data-theme="day"] .ldcb__panel {
    background:
        linear-gradient(145deg,rgba(255,255,255,.98),rgba(239,248,255,.98)) padding-box,
        linear-gradient(135deg,#A737FF 0%,#7D4BE2 48%,#38B6FF 100%) border-box;
    color:#081023;
    box-shadow:0 22px 58px rgba(31,82,119,.22),0 0 24px rgba(167,55,255,.12),0 0 18px rgba(56,182,255,.12);
}
#ld-category-bubble[data-theme="day"] .ldcb__head {
    background:linear-gradient(112deg,#7D4BE2 0%,#A737FF 46%,#38B6FF 100%);
}
#ld-category-bubble[data-theme="day"] .ldcb__close {
    border-color:rgba(255,255,255,.62);
    background:rgba(255,255,255,.90);
    color:#142447;
    box-shadow:0 4px 12px rgba(31,82,119,.16);
}
#ld-category-bubble[data-theme="day"] .ldcb__body {
    scrollbar-color:rgba(56,182,255,.55) rgba(8,16,35,.05);
}
#ld-category-bubble[data-theme="day"] .ldcb__body::-webkit-scrollbar-track {
    background:rgba(8,16,35,.05);
}
#ld-category-bubble[data-theme="day"] .ldcb__link,
#ld-category-bubble[data-theme="day"] .ldcb__link:visited {
    border-color:rgba(56,182,255,.17);
    background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(235,247,255,.92));
    color:#13213B;
    box-shadow:none;
}
#ld-category-bubble[data-theme="day"] .ldcb__link:hover,
#ld-category-bubble[data-theme="day"] .ldcb__link:focus-visible,
#ld-category-bubble[data-theme="day"] .ldcb__link:active {
    border-color:rgba(167,55,255,.46);
    background:linear-gradient(90deg,rgba(167,55,255,.12),rgba(56,182,255,.12)),#F4FAFF;
    color:#081023;
    box-shadow:inset 3px 0 0 #A737FF,0 5px 14px rgba(31,82,119,.10);
}
#ld-category-bubble[data-theme="day"] .ldcb__link.is-current,
#ld-category-bubble[data-theme="day"] .ldcb__link[aria-current="page"] {
    border-color:rgba(125,75,226,.35);
    background:linear-gradient(115deg,#A737FF 0%,#7D4BE2 58%,#38B6FF 100%);
    color:#fff;
    box-shadow:0 6px 16px rgba(125,75,226,.22);
}
#ld-category-bubble[data-theme="day"] .ldcb__foot {
    border-top-color:rgba(56,182,255,.15);
    background:linear-gradient(110deg,#F4FBFF,#F2EFFF);
    color:#61758D;
}
#ld-category-bubble[data-theme="day"] .ldcb__theme-row {
    border-bottom-color:rgba(56,182,255,.14);
    background:linear-gradient(110deg,#F4FBFF,#F2EFFF);
}
#ld-category-bubble[data-theme="day"] .ldcb__theme-toggle {
    border-color:rgba(56,182,255,.28);
    background:rgba(255,255,255,.72);
}
#ld-category-bubble[data-theme="day"] .ldcb__theme-toggle span {
    color:#687A91;
}

@media (max-width:767px) {
    #ld-category-bubble .ldcb__theme-row { padding:6px 8px 5px; }
    #ld-category-bubble .ldcb__theme-toggle { flex-basis:104px; min-width:104px; min-height:26px; }
    #ld-category-bubble .ldcb__theme-toggle span { min-height:19px; font-size:7.5px; padding:0 4px; }
    #ld-category-bubble .ldcb__drag-hint { font-size:9.5px; }
}


/* Discovery hint: visually anchored below the bubble, never intercepts input. */
#ld-category-bubble .ldcb__learn-hint {
    position:absolute;
    top:calc(100% + 5px);
    left:50%;
    transform:translateX(-50%);
    box-sizing:border-box;
    display:block;
    padding:2px 6px;
    border:1px solid rgba(56,182,255,.62);
    border-radius:7px;
    background:#122149;
    color:#F5F7FB;
    -webkit-text-fill-color:#F5F7FB;
    font-family:inherit;
    font-size:10px;
    font-weight:500;
    line-height:11px;
    white-space:nowrap;
    pointer-events:none;
    user-select:none;
}
#ld-category-bubble .ldcb__learn-hint::before {
    content:"";
    position:absolute;
    width:5px;
    height:5px;
    top:-4px;
    left:50%;
    transform:translateX(-50%) rotate(45deg);
    background:#122149;
    border-top:1px solid rgba(56,182,255,.62);
    border-left:1px solid rgba(56,182,255,.62);
}
#ld-category-bubble[data-theme="day"] .ldcb__learn-hint {
    background:#F4FAFF;
    color:#122149;
    -webkit-text-fill-color:#122149;
    border-color:rgba(125,75,226,.55);
}
#ld-category-bubble[data-theme="day"] .ldcb__learn-hint::before {
    background:#F4FAFF;
    border-color:rgba(125,75,226,.55);
}

/* Category-specific HOT badge — shared DAY/NIGHT. */
#ld-category-bubble .ldcb__link .ldcb__hot {
    display:inline-block;
    vertical-align:middle;
    margin-inline-start:2px;
    padding:2px 4px;
    border-radius:4px;
    background:#A737FF;
    color:#fff;
    font-size:9px;
    font-weight:700;
    line-height:1;
    white-space:nowrap;
}
