.tn-topbar-shell {
    display: grid;
    gap: 0;
}

.tn-sidebar-brand,
.tn-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: var(--bui-text-primary);
}

.tn-sidebar-brand__logo {
    width: clamp(3.1rem, 7.5vw, 4.2rem);
    height: clamp(3.1rem, 7.5vw, 4.2rem);
    border-radius: 999px;
    display: block;
}

.tn-topbar-brand__copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.tn-topbar-brand__copy strong {
    font-size: 1rem;
    line-height: 1.1;
    color: #2d201b;
}

.tn-topbar-brand__copy span {
    font-size: 0.78rem;
    line-height: 1.2;
    color: #7f6556;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tn-topbar {
    border: 1px solid rgba(111, 80, 61, 0.12);
    border-radius: 1.5rem;
    background: rgba(255, 251, 247, 0.88);
    box-shadow: 0 22px 48px rgba(73, 48, 34, 0.08);
    backdrop-filter: blur(14px);
    overflow: visible;
    padding: 0.9rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tn-topbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
}

.tn-topbar-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 1;
}

.tn-topbar-item.is-open {
    z-index: 3;
}

.tn-topbar-link,
.tn-topbar-drawer__link {
    text-decoration: none;
    color: #5f4b41;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 999px;
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.tn-topbar-link {
    padding: 0.65rem 0.9rem;
    border: 1px solid transparent;
}

.tn-topbar-link--dropdown {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.tn-topbar-link:hover,
.tn-topbar-link.active,
.tn-topbar-item.is-open > .tn-topbar-link {
    color: #2f221c;
    background: rgba(214, 179, 144, 0.16);
    border-color: rgba(150, 109, 82, 0.22);
}

.tn-topbar-link__label {
    min-width: 0;
}

.tn-topbar-link__caret,
.tn-topbar-drawer__toggle span {
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid #614b3f;
    border-bottom: 2px solid #614b3f;
    transform: rotate(45deg) translateY(-1px);
    display: block;
    flex: 0 0 auto;
}

.tn-topbar-item.is-open > .tn-topbar-link .tn-topbar-link__caret {
    transform: rotate(225deg) translateY(-1px);
}

.tn-topbar-dropdown {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    min-width: 14rem;
    padding: 0.45rem;
    border: 1px solid rgba(111, 80, 61, 0.12);
    border-radius: 1rem;
    background: rgba(255, 251, 247, 0.98);
    box-shadow: 0 18px 42px rgba(41, 26, 20, 0.14);
    display: grid;
    gap: 0.25rem;
    z-index: 50;
}

.tn-topbar-dropdown[hidden],
.tn-topbar-drawer__children[hidden] {
    display: none !important;
}

.tn-topbar-dropdown__link,
.tn-topbar-drawer__sublink {
    text-decoration: none;
    color: #5f4b41;
    font-size: 0.93rem;
    font-weight: 600;
    border-radius: 0.9rem;
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.tn-topbar-dropdown__link {
    padding: 0.7rem 0.8rem;
    border: 1px solid transparent;
}

.tn-topbar-dropdown__link:hover,
.tn-topbar-dropdown__link.active,
.tn-topbar-drawer__sublink:hover,
.tn-topbar-drawer__sublink.active {
    color: #2f221c;
    background: rgba(214, 179, 144, 0.16);
    border-color: rgba(150, 109, 82, 0.22);
}

.tn-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex: 0 0 auto;
}

.tn-sidebar-account {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--bui-border-color);
    border-radius: 999px;
    background: rgba(255, 248, 241, 0.92);
    color: var(--bui-text-primary);
    text-decoration: none;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    text-align: left;
}

.tn-sidebar-account:hover {
    background: rgba(255, 252, 249, 1);
}

.tn-sidebar-account__avatar {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    border: 1px solid var(--bui-border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bui-text-secondary);
    flex: 0 0 auto;
}

.tn-sidebar-account__avatar svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}

.tn-sidebar-account__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--bui-font-size-sm, 0.9rem);
    font-weight: 600;
}

.tn-sidebar-account__caret {
    color: var(--bui-text-secondary);
    flex: 0 0 auto;
}

.tn-topbar-burger {
    display: none;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(111, 80, 61, 0.16);
    border-radius: 999px;
    background: rgba(255, 248, 241, 0.92);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.tn-topbar-burger span {
    width: 1rem;
    height: 2px;
    border-radius: 999px;
    background: #614b3f;
    display: block;
}

.tn-topbar-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(38, 24, 18, 0.28);
    z-index: 1090;
}

.tn-topbar-drawer-overlay[hidden],
.tn-topbar-drawer[hidden] {
    display: none !important;
}

.tn-topbar-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(24rem, calc(100vw - 1.5rem));
    height: 100vh;
    padding: 1.25rem;
    background: rgba(255, 251, 247, 0.98);
    box-shadow: -18px 0 40px rgba(41, 26, 20, 0.18);
    z-index: 1100;
    display: grid;
    align-content: start;
    gap: 1rem;
}

.tn-topbar-drawer__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.tn-topbar-drawer__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    color: #90654d;
}

.tn-topbar-drawer__title {
    margin-top: 0.35rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.9rem;
    color: #2e1f1a;
}

.tn-topbar-drawer__close {
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(111, 80, 61, 0.14);
    border-radius: 999px;
    background: rgba(255, 248, 241, 0.92);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.tn-topbar-drawer__nav,
.tn-topbar-drawer__section {
    display: grid;
    gap: 0.5rem;
}

.tn-topbar-drawer__group {
    display: grid;
    gap: 0.45rem;
}

.tn-topbar-drawer__group-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: stretch;
}

.tn-topbar-drawer__link {
    padding: 0.8rem 0.9rem;
    background: rgba(255, 248, 241, 0.92);
    border: 1px solid rgba(111, 80, 61, 0.1);
}

.tn-topbar-drawer__link:hover,
.tn-topbar-drawer__link.active,
.tn-topbar-drawer__toggle:hover {
    color: #2f221c;
    border-color: rgba(150, 109, 82, 0.2);
    background: rgba(255, 252, 249, 1);
}

.tn-topbar-drawer__toggle {
    width: 3rem;
    border: 1px solid rgba(111, 80, 61, 0.1);
    border-radius: 1rem;
    background: rgba(255, 248, 241, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tn-topbar-drawer__toggle[aria-expanded="true"] span {
    transform: rotate(225deg) translateY(-1px);
}

.tn-topbar-drawer__children {
    display: grid;
    gap: 0.4rem;
    padding-left: 0.65rem;
}

.tn-topbar-drawer__sublink {
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(111, 80, 61, 0.08);
    background: rgba(255, 251, 247, 0.98);
}

.tn-topbar-drawer__account {
    color: #5e4b40;
    font-weight: 600;
}

.tn-drawer-open {
    overflow: hidden;
}

.tn-account-popover {
    position: fixed;
    width: min(300px, calc(100vw - 16px));
    border: 1px solid var(--bui-border-color);
    border-radius: var(--bui-border-radius-md, 10px);
    background: var(--bui-bg-primary, #ffffff);
    box-shadow: var(--bui-shadow-lg, 0 10px 25px rgba(0, 0, 0, 0.15));
    padding: 0.65rem 0.75rem;
    z-index: 2000;
    opacity: 1;
}

.tn-account-popover__title {
    font-size: var(--bui-font-size-xs, 0.75rem);
    color: var(--bui-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.45rem;
}

.tn-account-popover__line {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--bui-text-secondary);
    font-size: var(--bui-font-size-sm, 0.9rem);
    margin-bottom: 0.35rem;
}

.tn-account-popover__line strong {
    color: var(--bui-text-primary);
    text-align: right;
}

.tn-account-popover__logout {
    width: 100%;
    margin-top: 0.35rem;
}

.widget-post-list,
.widget-archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-post-item,
.widget-comment {
    margin-bottom: var(--bui-space-md);
    padding-bottom: var(--bui-space-md);
    border-bottom: 1px solid var(--bui-border-color);
}

.widget-post-item:last-child,
.widget-comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-post-link,
.widget-archive-link {
    text-decoration: none;
    transition: var(--bui-transition);
}

.widget-post-link {
    color: inherit;
    display: block;
}

.widget-post-link:hover,
.widget-archive-link:hover {
    color: var(--bui-primary);
}

.widget-post-title,
.widget-comment-author {
    font-size: var(--bui-font-size-sm);
    font-weight: 600;
    margin-bottom: var(--bui-space-xs);
}

.widget-post-date,
.widget-comment-date {
    font-size: var(--bui-font-size-xs);
}

.widget-tag {
    cursor: pointer;
    transition: var(--bui-transition);
}

.widget-tag:hover {
    transform: scale(1.05);
}

.widget-comment-text,
.widget-archive-link {
    font-size: var(--bui-font-size-sm);
}

.widget-comment-text {
    margin-bottom: var(--bui-space-xs);
}

.widget-archive-item {
    margin-bottom: var(--bui-space-sm);
}

.widget-archive-link {
    color: var(--bui-text-secondary);
}

.tnblog-loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tnblog-loader__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--bui-primary);
    border-radius: 50%;
    animation: tnblog-spin 1s linear infinite;
}

@keyframes tnblog-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .tn-topbar {
        padding: 0.75rem 0.9rem;
    }

    .tn-topbar-nav,
    .tn-topbar-theme-toggle,
    .tn-topbar-account {
        display: none;
    }

    .tn-topbar-burger {
        display: inline-flex;
    }

    .tn-topbar-brand__copy span {
        display: none;
    }
}

@media (min-width: 1025px) {
    .tn-topbar-drawer,
    .tn-topbar-drawer-overlay,
    .tn-topbar-burger {
        display: none !important;
    }
}

@media (max-width: 720px) {
    .tn-topbar-brand__copy strong {
        font-size: 0.92rem;
    }
}
