/* header.css: 공통 헤더/네비게이션 전용 스타일 */

/* ===== Site chrome layer (#darkthread-chrome-sticky-stack) — page CSS should not override without intent ===== */

#darkthread-chrome-sticky-stack.darkthread-site-chrome {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    margin: 0;
    padding: 0;
    isolation: isolate;
}

#darkthread-header.darkthread-chrome-header {
    position: relative;
    z-index: 2;
    overflow: visible;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(3, 3, 3, 0.85);
    color: var(--dt-fg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.darkthread-chrome-header-inner,
.darkthread-header-inner {
    position: relative;
    display: flex;
    max-width: 1980px;
    margin-inline: auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .darkthread-chrome-header-inner,
    .darkthread-header-inner {
        padding: 0.75rem 1rem;
    }
}

.darkthread-chrome-brand-shell,
.darkthread-header-brand-shell {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.darkthread-chrome-brand-area,
#darkthread-header-brand-area {
    display: flex;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.625rem;
}

.darkthread-chrome-brand-link,
#darkthread-brand {
    display: flex;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.darkthread-chrome-user-area,
#darkthread-user-area {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.darkthread-chrome-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    margin: 0;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--dt-fg-muted);
    font-size: 1rem;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

.darkthread-chrome-action-btn:hover,
.darkthread-chrome-action-btn:focus-visible {
    border-color: rgba(185, 28, 28, 0.45);
    color: #fff;
    outline: none;
}

.darkthread-chrome-action-btn--pill {
    width: auto;
    min-width: 0;
    height: 2.75rem;
    min-height: 2.75rem;
    gap: 0.5rem;
    padding: 0 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.darkthread-chrome-profile-trigger {
    display: inline-flex;
    width: auto;
    min-width: 0;
    height: 2.25rem;
    min-height: 2.25rem;
    align-items: center;
    gap: 0.375rem;
    box-sizing: border-box;
    margin: 0;
    padding: 0.125rem 0.45rem 0.125rem 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--dt-fg-muted);
    list-style: none;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

.darkthread-chrome-profile-trigger:hover,
.darkthread-chrome-profile-trigger:focus-visible {
    border-color: rgba(185, 28, 28, 0.45);
    color: #fff;
    outline: none;
}

@media (min-width: 640px) {
    .darkthread-chrome-profile-trigger {
        gap: 0.5rem;
        font-size: 1rem;
    }
}

.darkthread-chrome-profile-trigger .darkthread-profile-chevron {
    flex: 0 0 auto;
    font-size: 0.625rem;
    color: var(--dt-fg-soft);
    transition: transform 0.2s ease;
}

.darkthread-nav-link,
.darkthread-header-flyout-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.5rem 0.75rem;
    color: var(--dt-fg-muted);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    list-style: none;
    cursor: pointer;
    user-select: none;
    background: transparent;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.darkthread-header-flyout-summary::-webkit-details-marker {
    display: none;
}

.darkthread-header-flyout-chevron {
    flex-shrink: 0;
    font-size: 0.625rem;
    color: var(--dt-fg-soft);
    transition: transform 0.2s ease;
}

.darkthread-nav-link:hover,
.darkthread-header-flyout-summary:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.darkthread-header-flyout-surface {
    overflow: hidden;
    border-radius: 1rem;
    padding: 0.5rem;
}

.darkthread-header-flyout-group {
    padding: 0.5rem 0.75rem;
}

.darkthread-header-flyout-group-label {
    margin: 0;
    color: var(--dt-fg-soft);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.darkthread-header-flyout-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.darkthread-header-flyout-link {
    display: block;
    border-radius: 0.75rem;
    padding: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.darkthread-header-flyout-link:hover,
.darkthread-header-flyout-link:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
}

.darkthread-chrome-subbars,
.chrome-subbars {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 0;
    background: rgba(3, 3, 3, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.darkthread-header-nav-shell {
    pointer-events: none;
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
}

.darkthread-header-nav-viewport {
    pointer-events: auto;
    display: flex;
    min-width: 0;
    max-width: 100%;
}

body:not(.darkthread-header-nav-desktop) #darkthread-nav-drawer-open {
    display: inline-flex;
}

body.darkthread-header-nav-desktop #darkthread-nav-drawer-open {
    display: none;
}

/* drawer.css: 알림·프로필·설정·메뉴 드로어 스타일 (lines moved from header.css) */

.category-context-strip {
    display: none;
}

@media (max-width: 999px) {
    body.darkthread-has-mobile-category-strip #darkthread-header.darkthread-chrome-header {
        border-bottom-width: 0;
    }

    body.darkthread-has-mobile-category-strip #darkthread-chrome-subbars,
    body.darkthread-has-mobile-category-strip .darkthread-chrome-subbars {
        box-shadow: none;
    }
}



.darkthread-user-avatar-trigger {
    box-sizing: border-box;
    height: 2.25rem;
    gap: 0.35rem;
    padding-left: 0.3rem;
    padding-right: 0.45rem;
}

.darkthread-user-avatar-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.9rem;
    height: 1.9rem;
    overflow: hidden;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), transparent 52%),
        linear-gradient(135deg, rgba(64, 64, 64, 0.36), rgba(5, 5, 5, 0.96));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.darkthread-user-avatar-shell-menu {
    width: 1.6rem;
    height: 1.6rem;
    flex-shrink: 0;
}

.darkthread-user-avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.darkthread-user-avatar-image.hidden {
    display: none;
}

.darkthread-user-avatar-fallback {
    color: var(--dt-fg);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

body.darkthread-profile-open .darkthread-profile-chevron {
    transform: rotate(180deg);
}

.darkthread-skip-link {
    position: absolute;
    left: -9999px;
    top: 0.75rem;
    z-index: 50;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #7f1d1d;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(127, 29, 29, 0.5);
}

.darkthread-skip-link:focus {
    left: 1rem;
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

.darkthread-brand-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #fff;
}

.darkthread-brand-logo {
    display: block;
    height: 3.25rem;
    width: auto;
    max-width: min(17.5rem, 60vw);
    object-fit: contain;
}

@media (min-width: 640px) {
    .darkthread-brand-logo {
        height: 4.25rem;
        max-width: 26rem;
    }
}

.darkthread-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    padding: 0.25rem 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(8, 8, 8, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.darkthread-language-switcher-label {
    padding-inline: 0.25rem 0.15rem;
    color: var(--dt-fg-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.darkthread-language-switcher-link {
    border-radius: 999px;
    padding: 0.35rem 0.45rem;
    color: var(--dt-fg-muted);
    text-decoration: none;
    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        color 0.15s ease;
}

.darkthread-language-switcher-link:hover {
    color: #fff;
}

.darkthread-language-switcher-link.is-active {
    background: rgba(127, 29, 29, 0.42);
    color: var(--dt-fg);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.18);
}

.darkthread-language-switcher-divider {
    display: none;
}

.darkthread-language-switcher-link-mobile {
    display: none;
}

.darkthread-mobile-header-title {
    display: none;
}

#darkthread-nav-drawer-open,
#darkthread-notification-open,
#darkthread-settings-open {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    font-size: 1.12rem;
}

#darkthread-profile-open {
    flex: 0 0 auto;
    width: auto;
    min-width: 3.7rem;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0.28rem 0.62rem 0.28rem 0.34rem;
    font-size: 1rem;
    gap: 0.45rem;
    box-sizing: border-box;
}

#darkthread-profile-open .darkthread-user-avatar-shell {
    width: 2rem;
    height: 2rem;
}

#darkthread-profile-open .darkthread-profile-chevron {
    flex: 0 0 auto;
}

.darkthread-header-app-install {
    min-height: 2.75rem;
    padding-inline: 1rem;
    white-space: nowrap;
}

.darkthread-header-app-install .fa-buromobelexperte {
    font-size: 1.45rem;
    line-height: 1;
}

@media (max-width: 1079px) {
    body.darkthread-has-mobile-tab-bar #darkthread-header-brand-area,
    body.darkthread-has-mobile-tab-bar #darkthread-app-install,
    body.darkthread-has-mobile-tab-bar #darkthread-profile-open,
    body.darkthread-has-mobile-tab-bar #darkthread-notification-open {
        display: none !important;
    }

    body.darkthread-has-mobile-tab-bar .darkthread-header-inner {
        justify-content: space-between;
        gap: 0.55rem;
    }

    body.darkthread-has-mobile-tab-bar #darkthread-status-bar:not(.status-bar--promo-active) {
        display: none !important;
    }

    body.darkthread-has-mobile-tab-bar .darkthread-mobile-header-title {
        position: absolute;
        left: 50%;
        top: 50%;
        display: block;
        width: min(48vw, 18rem);
        overflow: hidden;
        color: rgba(248, 250, 252, 0.96);
        font-size: 1rem;
        font-weight: 800;
        line-height: 1.25;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
        pointer-events: none;
        transform: translate(-50%, -50%);
    }

    body.darkthread-has-mobile-tab-bar .darkthread-mobile-header-tip-link {
        pointer-events: auto;
        color: rgba(252, 165, 165, 0.98);
        text-decoration: none;
    }

    body.darkthread-has-mobile-tab-bar .darkthread-mobile-header-tip-link:hover {
        color: #fecaca;
    }

    body.darkthread-has-mobile-tab-bar .darkthread-mobile-header-tip-link:focus-visible {
        outline: 2px solid rgba(248, 113, 113, 0.85);
        outline-offset: 3px;
    }

    body.darkthread-has-mobile-tab-bar .darkthread-header-brand-shell {
        flex: 0 0 auto;
    }

    body.darkthread-has-mobile-tab-bar #darkthread-user-area {
        flex: 1 1 auto;
        justify-content: flex-end;
        margin-left: auto;
        min-width: 0;
    }

    body.darkthread-has-mobile-tab-bar #darkthread-chrome-sticky-stack {
        transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
        will-change: transform;
        backface-visibility: hidden;
    }

    body.darkthread-has-mobile-tab-bar.darkthread-chrome-scroll-hidden {
        --darkthread-sticky-header-presence-offset: 0px;
    }

    body.darkthread-has-mobile-tab-bar.darkthread-chrome-scroll-hidden #darkthread-chrome-sticky-stack {
        transform: translate3d(0, calc(-1 * var(--darkthread-chrome-stack-offset, 0px)), 0);
        pointer-events: none;
    }
}

@media (max-width: 639px) {
    #darkthread-header {
        --darkthread-mobile-header-action-size: 2.5rem;
    }

    .darkthread-header-inner {
        gap: 0.55rem;
        padding-block: 0.55rem;
    }

    #darkthread-header-brand-area {
        gap: 0.45rem;
    }

    #darkthread-user-area {
        flex: 0 0 auto;
        gap: 0.45rem;
    }

    #darkthread-header-brand-area .darkthread-language-switcher,
    .darkthread-pseudonym-control-desktop {
        display: none !important;
    }

    .darkthread-brand-logo {
        height: 3rem;
        max-width: 15.25rem;
    }

    #darkthread-nav-drawer-open,
    .darkthread-notification-trigger,
    #darkthread-settings-open {
        width: var(--darkthread-mobile-header-action-size);
        height: var(--darkthread-mobile-header-action-size);
        min-width: var(--darkthread-mobile-header-action-size);
        min-height: var(--darkthread-mobile-header-action-size);
        max-height: var(--darkthread-mobile-header-action-size);
        box-sizing: border-box;
        font-size: 1.08rem;
    }

    .darkthread-user-avatar-trigger {
        width: auto;
        min-width: 3.25rem;
        height: var(--darkthread-mobile-header-action-size);
        min-height: var(--darkthread-mobile-header-action-size);
        max-height: var(--darkthread-mobile-header-action-size);
        box-sizing: border-box;
        justify-content: center;
        gap: 0.35rem;
        padding: 0.125rem 0.45rem 0.125rem 0.25rem;
        line-height: 1;
    }

    .darkthread-user-avatar-trigger .darkthread-user-avatar-shell {
        width: 1.75rem;
        height: 1.75rem;
    }

    .darkthread-language-switcher-link-desktop,
    .darkthread-language-switcher-divider-desktop {
        display: none;
    }

    .darkthread-language-switcher-link-mobile {
        display: inline-block;
        position: relative;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(248, 113, 113, 0.22);
    }

    .darkthread-language-switcher-link-mobile::after {
        content: "";
        position: absolute;
        inset: -0.5rem -0.4rem;
    }
}

.darkthread-notification-trigger {
    position: relative;
    cursor: pointer;
}

.darkthread-notification-badge {
    position: absolute;
    right: -0.2rem;
    top: -0.2rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #b91c1c;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(5, 8, 22, 0.92);
}


body:not(.darkthread-header-nav-desktop) #darkthread-navigation {
    display: none;
}

body.darkthread-header-nav-desktop #darkthread-navigation {
    display: flex;
}

body.darkthread-header-nav-desktop .darkthread-header-inner {
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(0, 8fr) minmax(11rem, 1fr);
    column-gap: 1rem;
    align-items: center;
}

body.darkthread-header-nav-desktop .darkthread-header-brand-shell {
    grid-column: 1;
    min-width: 0;
    flex: none;
    justify-content: flex-start;
}

body.darkthread-header-nav-desktop #darkthread-header-brand-area,
body.darkthread-header-nav-desktop #darkthread-brand {
    min-width: 0;
    max-width: 100%;
}

body.darkthread-header-nav-desktop .darkthread-brand-logo {
    max-width: 100%;
}

body.darkthread-header-nav-desktop #darkthread-user-area {
    grid-column: 3;
    min-width: 0;
    flex: none;
    justify-content: flex-end;
}

body.darkthread-header-nav-desktop #darkthread-nav-drawer-open,
body.darkthread-header-nav-desktop #darkthread-nav-drawer-root {
    display: none;
}

body:not(.darkthread-header-nav-desktop) #darkthread-nav-drawer-open {
    display: inline-flex;
}

body:not(.darkthread-header-nav-desktop) #darkthread-nav-drawer-root {
    display: block;
}

.darkthread-header-nav-measure {
    position: absolute;
    left: 0;
    top: 0;
    visibility: hidden;
    pointer-events: none;
    white-space: nowrap;
    /*
     * 자식(.darkthread-header-nav-cluster 등)이 max-content로 매우 넓어도
     * 문서 scrollWidth에 잡히지 않도록 상자를 0으로 두고 overflow로 가림.
     * scrollWidth/getBoundingClientRect 측정은 자식 노드에 직접 호출하므로 JS 레이아웃 계산은 유지됨.
     */
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
    overflow: hidden;
    contain: strict;
}

.darkthread-header-nav-shell {
    left: var(--darkthread-header-nav-left, 0px);
    right: var(--darkthread-header-nav-right, 0px);
}

body.darkthread-header-nav-desktop .darkthread-header-nav-shell {
    position: static;
    inset: auto;
    grid-column: 2;
    width: 100%;
    min-width: 0;
    align-self: stretch;
}

.darkthread-header-nav-viewport {
    display: flex;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

/* ——— 데스크톱 헤더: 중앙 nav 클러스터 — 조상 #darkthread-navigation 에 transform 금지 (fixed 패널 기준) ——— */
.darkthread-header-nav-cluster {
    width: max-content;
    max-width: none;
}

body.darkthread-header-nav-desktop .darkthread-header-nav-cluster,
body .darkthread-header-nav-measure .darkthread-header-nav-cluster {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
}

body.darkthread-header-nav-desktop .darkthread-header-nav-viewport {
    justify-content: center;
}

body.darkthread-header-nav-desktop .darkthread-header-flyout-summary,
body.darkthread-header-nav-desktop .darkthread-nav-link,
body .darkthread-header-nav-measure .darkthread-header-flyout-summary,
body .darkthread-header-nav-measure .darkthread-nav-link {
    white-space: nowrap;
    font-family: "NanumSquareRound", sans-serif;
    font-size: 1rem;
    line-height: 1.2;
}

@media (min-width: 1440px) {
    body.darkthread-header-nav-desktop .darkthread-header-flyout-summary,
    body.darkthread-header-nav-desktop .darkthread-nav-link,
    body .darkthread-header-nav-measure .darkthread-header-flyout-summary,
    body .darkthread-header-nav-measure .darkthread-nav-link {
        font-size: 1.05rem;
    }
}

@media (min-width: 1720px) {
    body.darkthread-header-nav-desktop .darkthread-header-flyout-summary,
    body.darkthread-header-nav-desktop .darkthread-nav-link,
    body .darkthread-header-nav-measure .darkthread-header-flyout-summary,
    body .darkthread-header-nav-measure .darkthread-nav-link {
        font-size: 1.1rem;
    }
}

body.darkthread-header-nav-desktop .darkthread-header-flyout-summary:focus-visible,
body.darkthread-header-nav-desktop .darkthread-nav-link:focus-visible,
.darkthread-header-flyout-panel a:focus-visible {
    outline: 2px solid rgba(248, 113, 113, 0.72);
    outline-offset: 2px;
}

body.darkthread-header-nav-desktop .darkthread-header-flyout.is-current > .darkthread-header-flyout-summary,
body.darkthread-header-nav-desktop .darkthread-nav-link[aria-current="page"],
.darkthread-header-flyout-panel a[aria-current="page"] {
    color: #fecaca;
    background: transparent;
}

body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow {
    position: relative;
    z-index: 0;
    isolation: isolate;
    background: transparent;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #c55f76;
    text-shadow:
        0 0 0.35rem rgba(92, 20, 36, 0.58),
        0 0 0.94rem rgba(70, 14, 28, 0.46),
        0 0 1.5rem rgba(50, 10, 21, 0.34);
}

body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow::before {
    content: "";
    position: absolute;
    inset: 0.18rem -0.24rem 0.12rem;
    z-index: -1;
    border-radius: 999px;
    background:
        radial-gradient(95% 136% at 18% 55%, rgba(182, 42, 58, 0.44) 0%, rgba(128, 26, 41, 0.28) 52%, rgba(128, 26, 41, 0) 100%),
        radial-gradient(86% 118% at 84% 44%, rgba(152, 33, 50, 0.36) 0%, rgba(104, 21, 35, 0.22) 54%, rgba(104, 21, 35, 0) 100%),
        radial-gradient(58% 76% at 49% 46%, rgba(212, 76, 92, 0.18) 0%, rgba(212, 76, 92, 0) 100%);
    filter: blur(7px) saturate(102%);
    opacity: 0.9;
    transform: rotate(-1.8deg);
    pointer-events: none;
}

body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow:hover,
body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow:focus-visible {
    background: transparent;
    color: #dd8aa0;
    text-shadow:
        0 0 0.42rem rgba(110, 28, 44, 0.66),
        0 0 1.04rem rgba(79, 18, 33, 0.54),
        0 0 1.74rem rgba(56, 12, 24, 0.42);
}

body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow:hover::before,
body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow:focus-visible::before {
    opacity: 1;
    filter: blur(8px) saturate(110%);
}

/* ——— 데스크톱 헤더: details + summary 네이티브 토글 (플러그인 JS 불필요) ——— */
.darkthread-header-flyout {
    position: relative;
}

.darkthread-header-flyout > summary {
    list-style: none;
}

.darkthread-header-flyout > summary::-webkit-details-marker {
    display: none;
}

.darkthread-header-flyout-panel {
    /* 인라인 스크립트가 fixed + top/left 설정; 미적용 시 아래값으로 summary 아래 표시 */
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    min-width: 16rem;
    width: 16rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.darkthread-header-flyout-surface {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(64, 64, 64, 0.95);
    background: rgba(6, 6, 6, 0.98);
    color: var(--dt-fg);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.darkthread-header-flyout-surface::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 36%);
    pointer-events: none;
}

.darkthread-header-flyout[open] .darkthread-header-flyout-chevron {
    transform: rotate(180deg);
}

/* ===== Chrome theme: v2 라이트/다크 (html 클래스 — 페이지 CSS와 분리) ===== */

html.darkthread-board-list-v2-theme-light #darkthread-chrome-sticky-stack.darkthread-site-chrome {
    border-color: #e5e7eb;
    background: #ffffff;
    color: var(--dt-fg);
    box-shadow: 0 1px 0 #e5e7eb;
    /* backdrop-filter 금지: 스택이 자식 fixed(배회 바)의 containing block이 되어 뷰포트 고정이 깨짐 */
}

html.darkthread-board-list-v2-theme-light #darkthread-header.darkthread-chrome-header {
    border-color: #e5e7eb;
    background: #ffffff;
    color: var(--dt-fg);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html.darkthread-board-list-v2-theme-light .darkthread-chrome-subbars,
html.darkthread-board-list-v2-theme-light .chrome-subbars {
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html.darkthread-board-list-v2-theme-light .darkthread-header-flyout-summary,
html.darkthread-board-list-v2-theme-light .darkthread-nav-link {
    color: var(--dt-fg);
}

html.darkthread-board-list-v2-theme-light .darkthread-chrome-action-btn,
html.darkthread-board-list-v2-theme-light .darkthread-header-app-install,
html.darkthread-board-list-v2-theme-light #darkthread-settings-open,
html.darkthread-board-list-v2-theme-light #darkthread-notification-open,
html.darkthread-board-list-v2-theme-light #darkthread-profile-open,
html.darkthread-board-list-v2-theme-light #darkthread-nav-drawer-open {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: var(--dt-fg);
}

html.darkthread-board-list-v2-theme-light #darkthread-profile-open {
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f8fafc;
}

html.darkthread-board-list-v2-theme-light #darkthread-profile-open .darkthread-user-avatar-shell {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.85), transparent 52%),
        linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    box-shadow:
        inset 0 0 0 1px rgba(100, 116, 139, 0.45),
        0 0 0 1px rgba(148, 163, 184, 0.35);
}

html.darkthread-board-list-v2-theme-light #darkthread-profile-open .darkthread-user-avatar-fallback {
    color: var(--dt-fg);
}

html.darkthread-board-list-v2-theme-light #darkthread-profile-open .darkthread-profile-chevron {
    color: var(--dt-fg-soft);
}

html.darkthread-board-list-v2-theme-light .darkthread-header-flyout-summary:hover,
html.darkthread-board-list-v2-theme-light .darkthread-nav-link:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--dt-fg-strong);
}

html.darkthread-board-list-v2-theme-light body.darkthread-header-nav-desktop .darkthread-header-flyout.is-current > .darkthread-header-flyout-summary,
html.darkthread-board-list-v2-theme-light body.darkthread-header-nav-desktop .darkthread-nav-link[aria-current="page"],
html.darkthread-board-list-v2-theme-light .darkthread-header-flyout-panel a[aria-current="page"] {
    background: rgba(153, 27, 27, 0.1);
    color: var(--dt-fg-nav-current);
    font-weight: 650;
}

html.darkthread-board-list-v2-theme-light .darkthread-header-flyout-link[aria-current="page"] {
    background: rgba(153, 27, 27, 0.1);
    color: var(--dt-fg-nav-current);
    font-weight: 600;
}

html.darkthread-board-list-v2-theme-light .darkthread-nav-drawer-link[aria-current="page"],
html.darkthread-board-list-v2-theme-light .darkthread-nav-drawer-sublink[aria-current="page"],
html.darkthread-board-list-v2-theme-light .darkthread-nav-drawer-details.is-current > .darkthread-nav-drawer-summary {
    color: var(--dt-fg-nav-current) !important;
    background: rgba(153, 27, 27, 0.08) !important;
    text-shadow: none !important;
    font-weight: 650;
}

html.darkthread-board-list-v2-theme-light .darkthread-header-flyout-surface {
    border-color: #e5e7eb;
    background: #fff;
    color: var(--dt-fg);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

html.darkthread-board-list-v2-theme-light .darkthread-header-flyout-link {
    color: var(--dt-fg);
}

html.darkthread-board-list-v2-theme-light .darkthread-header-flyout-link:hover {
    background: #f1f5f9;
    color: var(--dt-fg-strong);
}

body.darkthread-board-list-v2-page:has(#dtV2ThemeLight:checked) #darkthread-chrome-sticky-stack,
body.darkthread-board-list-v2-page.darkthread-board-list-v2-theme-light #darkthread-chrome-sticky-stack {
    background: #ffffff;
    color: var(--dt-fg);
}

body.darkthread-board-list-v2-page.darkthread-board-list-v2-theme-dark #darkthread-chrome-sticky-stack,
body.darkthread-board-list-v2-page:not(.darkthread-board-list-v2-theme-light) #darkthread-chrome-sticky-stack {
    background:
        linear-gradient(180deg, rgba(9, 10, 12, 0.98) 0%, rgba(9, 11, 14, 0.91) 66%, rgba(10, 12, 15, 0.72) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.035),
        0 18px 48px rgba(0, 0, 0, 0.52),
        0 42px 82px rgba(0, 0, 0, 0.32);
}

body.darkthread-board-list-v2-page.darkthread-board-list-v2-theme-dark #darkthread-header.darkthread-chrome-header,
body.darkthread-board-list-v2-page:not(.darkthread-board-list-v2-theme-light) #darkthread-header.darkthread-chrome-header {
    border-bottom-color: rgba(255, 255, 255, 0.055);
    background: rgba(8, 9, 11, 0.9);
    box-shadow:
        inset 0 -1px 0 rgba(255, 255, 255, 0.025),
        0 12px 34px rgba(0, 0, 0, 0.34);
}

body.darkthread-board-list-v2-page.darkthread-board-list-v2-theme-dark .darkthread-chrome-subbars,
body.darkthread-board-list-v2-page:not(.darkthread-board-list-v2-theme-light) .darkthread-chrome-subbars {
    background:
        linear-gradient(180deg, rgba(13, 15, 18, 0.9) 0%, rgba(16, 19, 23, 0.78) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.025),
        0 16px 42px rgba(0, 0, 0, 0.42),
        0 34px 76px rgba(0, 0, 0, 0.24);
}

body.darkthread-board-list-v2-page .darkthread-header-flyout-panel {
    z-index: 120;
}

html.darkthread-board-list-v2-theme-light .status-bar__daily-promo {
    color: var(--dt-fg);
    border-bottom: 1px solid rgb(148 163 184 / 0.25);
    background: linear-gradient(180deg, rgb(248 250 252 / 0.72) 0%, rgb(241 245 249 / 0.7) 100%);
}

html.darkthread-board-list-v2-theme-light .status-bar__daily-promo-text {
    color: var(--dt-fg);
}

html.darkthread-board-list-v2-theme-light .status-bar__daily-promo-link {
    color: #b91c1c;
}

html.darkthread-board-list-v2-theme-light .status-bar__daily-promo-link:hover,
html.darkthread-board-list-v2-theme-light .status-bar__daily-promo-link:focus-visible {
    color: var(--dt-fg-danger-hover);
}

html.darkthread-board-list-v2-theme-light .status-bar__daily-promo-inline-icon {
    color: #dc2626;
}

html.darkthread-board-list-v2-theme-light .status-bar__daily-promo-close {
    color: var(--dt-fg-soft);
}

html.darkthread-board-list-v2-theme-light .status-bar__daily-promo-close:hover,
html.darkthread-board-list-v2-theme-light .status-bar__daily-promo-close:focus-visible {
    background: rgb(148 163 184 / 0.18);
    color: #0f172a;
}

html.darkthread-board-list-v2-theme-light body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow,
html.darkthread-board-list-v2-theme-light .darkthread-nav-drawer-link.darkthread-nav-link--subscription-glow {
    color: #3f3a44;
    font-weight: 900;
    letter-spacing: 0.015em;
    text-shadow:
        0 0 0.2rem rgba(63, 58, 68, 0.2),
        0 0 0.64rem rgba(55, 50, 61, 0.16);
}

html.darkthread-board-list-v2-theme-light body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow::before,
html.darkthread-board-list-v2-theme-light .darkthread-nav-drawer-link.darkthread-nav-link--subscription-glow::before {
    background:
        radial-gradient(95% 140% at 24% 53%, rgba(70, 63, 76, 0.28) 0%, rgba(52, 47, 58, 0.16) 48%, rgba(52, 47, 58, 0) 100%),
        radial-gradient(72% 110% at 82% 46%, rgba(82, 74, 87, 0.24) 0%, rgba(60, 53, 66, 0.12) 54%, rgba(60, 53, 66, 0) 100%),
        radial-gradient(45% 70% at 50% 50%, rgba(98, 90, 104, 0.16) 0%, rgba(98, 90, 104, 0) 100%);
    filter: blur(6px) saturate(90%);
    opacity: 0.94;
    transform: rotate(-1.2deg);
}

html.darkthread-board-list-v2-theme-light body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow:hover,
html.darkthread-board-list-v2-theme-light body.darkthread-header-nav-desktop .darkthread-nav-link--subscription-glow:focus-visible,
html.darkthread-board-list-v2-theme-light .darkthread-nav-drawer-link.darkthread-nav-link--subscription-glow:hover {
    color: #2d2931;
}


