.se-hb {
    --se-hb-top: 84px;
    --se-hb-side-w: 300px;
    display: grid;
    grid-template-columns: var(--se-hb-side-w) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    width: min(1500px, calc(100% - 32px));
    margin: 20px auto 50px;
    box-sizing: border-box;
    transition: grid-template-columns 0.3s ease, gap 0.3s ease;
}
.se-hb.is-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
    gap: 0;
}

.se-hb-side {
    position: sticky;
    top: var(--se-hb-top);
    min-width: 0;
    overflow: hidden;
    max-height: calc(100vh - var(--se-hb-top) - 12px);
    transition: top 0.3s ease, visibility 0s;
}
.se-hb.is-collapsed .se-hb-side {
    visibility: hidden;
    transition: top 0.3s ease, visibility 0s 0.3s;
}

.se-hb-panel {
    width: var(--se-hb-side-w);
    max-height: calc(100vh - var(--se-hb-top) - 12px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-radius: var(--r-lg, 14px);
    background-color: rgba(4, 12, 22, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--c-border-cyan, rgba(0, 173, 238, 0.22));
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.se-hb-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px 18px;
    border-bottom: 1px solid rgba(var(--c-cyan-rgb, 0, 173, 238), 0.14);
}
.se-hb-panel-title {
    font-family: var(--f-display, 'Orbitron', sans-serif);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #eaf6ff;
}

.se-hb-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.10);
    border: 1px solid var(--c-border-cyan, rgba(0, 173, 238, 0.22));
    color: var(--c-cyan, #00adee);
    cursor: pointer;
    transition: all 0.2s ease;
}
.se-hb-iconbtn svg { width: 16px; height: 16px; display: block; }
.se-hb-iconbtn:hover {
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.22);
    box-shadow: 0 0 12px rgba(var(--c-cyan-rgb, 0, 173, 238), 0.3);
}

.se-hb-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.35) transparent;
}
.se-hb-nav::-webkit-scrollbar { width: 6px; }
.se-hb-nav::-webkit-scrollbar-thumb { background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.35); border-radius: 6px; }

.se-hb-cat { margin-bottom: 4px; }
.se-hb-cat > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--f-display, 'Orbitron', sans-serif);
    font-size: 0.76rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #eaf6ff;
    transition: background 0.2s ease;
    user-select: none;
}
.se-hb-cat > summary::-webkit-details-marker { display: none; }
.se-hb-cat > summary:hover,
.se-hb-cat[open] > summary { background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.08); }

.se-hb-cat.is-current > summary { color: var(--c-cyan, #00adee); }
.se-hb-cat.is-current .se-hb-cat-icon {
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.24);
    box-shadow: 0 0 10px rgba(var(--c-cyan-rgb, 0, 173, 238), 0.35);
}

.se-hb-cat-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.12);
    color: var(--c-cyan, #00adee);
    font-size: 13px;
}
.se-hb-cat-title { flex: 1; min-width: 0; }
.se-hb-cat-count {
    font-size: 0.64rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.10);
    color: var(--c-muted, #7a9aaa);
}
.se-hb-cat-caret {
    font-size: 0.7rem;
    color: var(--c-muted, #7a9aaa);
    transition: transform 0.25s ease;
}
.se-hb-cat[open] .se-hb-cat-caret { transform: rotate(180deg); }

.se-hb-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 10px 24px;
    padding-left: 8px;
    border-left: 1px solid rgba(var(--c-cyan-rgb, 0, 173, 238), 0.18);
}

.se-hb-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.25;
    color: #94adba;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.se-hb-link i {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--c-cyan, #00adee);
    opacity: 0.8;
}
.se-hb-link:hover { background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.08); color: #eaf6ff; }
.se-hb-link.active {
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.16);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--c-cyan, #00adee);
}
.se-hb-link.active i { opacity: 1; }
.se-hb-link-out::after {
    content: '↗';
    margin-left: auto;
    font-size: 0.85em;
    opacity: 0.5;
}
.se-hb-link-all {
    font-family: var(--f-display, 'Orbitron', sans-serif);
    font-size: 0.66rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--c-cyan, #00adee);
}

.se-hb-main { min-width: 0; }

.se-hb-bar {
    position: sticky;
    top: var(--se-hb-top);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--r-md, 12px);
    background-color: rgba(4, 12, 22, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--c-border-cyan, rgba(0, 173, 238, 0.22));
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.4);
    transition: top 0.3s ease;
}

.se-hb-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.10);
    border: 1px solid var(--c-border-cyan, rgba(0, 173, 238, 0.22));
    color: var(--c-cyan, #00adee);
    font-family: var(--f-display, 'Orbitron', sans-serif);
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}
.se-hb-toggle svg { width: 16px; height: 16px; display: block; }
.se-hb-toggle:hover {
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.20);
    box-shadow: 0 0 12px rgba(var(--c-cyan-rgb, 0, 173, 238), 0.3);
}

.se-hb-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14.5px;
    color: var(--c-muted, #7a9aaa);
    white-space: nowrap;
    overflow: hidden;
}
.se-hb-crumbs a { color: #94adba; text-decoration: none; transition: color 0.2s ease; }
.se-hb-crumbs a:hover { color: var(--c-cyan, #00adee); }
.se-hb-sep { opacity: 0.5; }
.se-hb-crumb-current { color: #eaf6ff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

.se-hb-content { min-width: 0; }

.se-hb-read { display: none; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.se-hb.has-reader .se-hb-read { display: inline-flex; }
.se-hb-rbtn, .se-hb-rsize {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid var(--c-border-cyan, rgba(0, 173, 238, 0.30));
    color: var(--c-text-dim, #8fb8cc);
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.se-hb-rbtn svg { width: 16px; height: 16px; display: block; }
.se-hb-rbtn:hover, .se-hb-rsize:hover { color: var(--c-cyan, #00adee); border-color: var(--c-cyan, #00adee); }
.se-hb-rbtn[aria-pressed="true"] {
    color: var(--c-cyan, #00adee);
    background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.15);
    border-color: var(--c-cyan, #00adee);
}
.se-hb-rsize { padding: 6px 10px; min-width: 38px; justify-content: center; }
.se-hb:not(.is-reading) .se-hb-rsize { display: none; }
.se-hb-rbtn:focus-visible, .se-hb-rsize:focus-visible { outline: 2px solid var(--c-cyan, #00adee); outline-offset: 2px; }

.se-hb.is-reading { --rm-fs: 1.125rem; }
.se-hb.is-reading[data-rfs="0"] { --rm-fs: 1rem; }
.se-hb.is-reading[data-rfs="2"] { --rm-fs: 1.25rem; }
.se-hb.is-reading[data-rfs="3"] { --rm-fs: 1.375rem; }
.se-hb.is-reading .se-hb-content .cardPic { display: none; }
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) {
    flex-basis: 100%;
    width: auto !important;
    max-width: 46em;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 28px clamp(18px, 4vw, 48px);
    font-size: var(--rm-fs);
    background: var(--c-bg2, #07121d);
    border: 1px solid var(--c-border, rgba(255, 255, 255, 0.10));
    box-shadow: none;
}
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) :is(p, li, td) {
    font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--rm-fs);
    line-height: 1.75;
    letter-spacing: normal;
    text-align: left !important;
    text-shadow: none;
    color: var(--c-text-hi, #e0f4ff);
}
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) :is(h1, h2, h3) {
    display: block;
    margin: 1.6em 0 0.5em;
    font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    text-shadow: none;
    color: var(--c-cyan-hi, #33c4f2);
}
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) h1 { font-size: 1.45em; }
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) h2 { font-size: 1.3em; }
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) h3 { font-size: 1.15em; }
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) h2::before,
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) h2::after { display: none; }
.se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) > :is(h1, h2, h3):first-child { margin-top: 0; }

.se-hb-overlay { display: none; }

@media (max-width: 900px) {
    .se-hb {
        display: block;
        width: calc(100% - 20px);
        margin-top: 12px;
    }

    .se-hb-side {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(88vw, 340px);
        max-height: none;
        z-index: 900;
        transform: translateX(-102%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0s 0.3s;
    }
    .se-hb.is-open .se-hb-side {
        transform: none;
        visibility: visible;
        transition: transform 0.3s ease, visibility 0s;
    }
    .se-hb.is-collapsed .se-hb-side { visibility: hidden; }
    .se-hb.is-collapsed.is-open .se-hb-side { visibility: visible; }

    .se-hb-panel {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0 var(--r-lg, 14px) var(--r-lg, 14px) 0;
    }

    .se-hb-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 890;
        background: rgba(0, 0, 0, 0.65);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .se-hb.is-open .se-hb-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .se-hb-bar { margin-bottom: 14px; padding: 8px 10px; }
}

html.se-hb-lock { overflow: hidden; }

@media (max-width: 600px) {
    .se-hb-rbtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .se-hb-rbtn { padding: 6px 9px; }
    .se-hb-rsize { min-width: 32px; padding: 6px 7px; }
    .se-hb.is-reading .se-hb-content .texcontainer { padding: 0 6px; }
    .se-hb.is-reading .se-hb-content :is(.transpcardText, .cardText) { padding: 20px 14px; margin-top: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .se-hb, .se-hb-side, .se-hb-bar, .se-hb-overlay { transition: none !important; }
}