/*
Theme Name: LangYuPro
Theme URI: https://www.langyunet.com/
Author: Zuoer
Author URI: https://www.langyunet.com/
Description: 一个极简的主题
Version: 1.0.1
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: langyupro
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --langyu-primary: #111111;
    --langyu-primary-hover: #2b2b2b;
    --langyu-secondary: #666666;
    --langyu-text: #222222;
    --langyu-muted: #7a7a7a;
    --langyu-border: #d9d9d9;
    --langyu-soft-bg: #f5f5f5;
    --langyu-surface: #ffffff;
    --langyu-button-bg: #111111;
    --langyu-button-text: #ffffff;
}

/* ==========================================================================
   Tag Archive & Masonry Styles
   ========================================================================== */

.langyu-tag-header {
    position: relative;
    margin-bottom: 24px;
    padding: 40px 32px;
    background: var(--langyu-surface);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    justify-content: space-between;
}

.tag-header-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--langyu-soft-bg);
    padding: 4px;
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

.tag-action-btn {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--langyu-muted);
    background: transparent;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag-action-btn.active {
    background: var(--langyu-surface);
    color: var(--langyu-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tag-bg-hash {
    position: absolute;
    top: -30px;
    left: -10px;
    font-size: 160px;
    font-weight: 900;
    line-height: 1;
    color: var(--langyu-border);
    opacity: 0.3;
    pointer-events: none;
    font-family: Arial, sans-serif;
    z-index: 1;
}

.tag-header-content {
    position: relative;
    z-index: 2;
}

.tag-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: var(--langyu-text);
}

.tag-description {
    font-size: 14px;
    color: var(--langyu-muted);
}

.langyu-masonry-list {
    column-count: 4;
    column-gap: 20px;
    margin-bottom: 32px;
}

.langyu-masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--langyu-surface);
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.langyu-masonry-item:hover {
    transform: translateY(-4px);
}

.masonry-thumbnail a {
    display: block;
    width: 100%;
}

.masonry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0 !important;
}

.masonry-content {
    padding: 12px 8px;
}

.masonry-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.masonry-title a {
    color: var(--langyu-text);
    text-decoration: none;
    transition: color 0.2s;
}

.masonry-title a:hover {
    color: var(--langyu-primary);
}

.masonry-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--langyu-muted);
}

.masonry-author-link {
    display: flex;
    align-items: center;
    color: var(--langyu-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.masonry-author-link:hover {
    color: var(--langyu-text);
}

.masonry-avatar-wrapper {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.masonry-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 0 !important;
}

.masonry-author-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.masonry-likes {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 1200px) {
    .langyu-masonry-list {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .langyu-masonry-list {
        column-count: 2;
        column-gap: 12px;
    }
    
    .langyu-masonry-item {
        margin-bottom: 12px;
    }
    
    .masonry-content {
        padding: 12px;
    }
    
    .masonry-title {
        font-size: 14px;
    }
}

/* ==========================================================================
   Header User Menu & Dropdown
   ========================================================================== */
.langyu-user-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.langyu-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.langyu-user-avatar-link .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.langyu-user-avatar-link {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.langyu-user-menu-wrapper.is-active .langyu-header-avatar {
    border-color: var(--langyu-primary);
    transform: scale(1.02);
}

.langyu-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: -4px;
    width: min(288px, calc(100vw - 20px));
    background: #f7f7f8;
    border: 1px solid #e8e8ec;
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(17, 19, 24, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.26s ease, visibility 0.26s ease, transform 0.26s ease;
    z-index: 1000;
    overflow: hidden;
}

.langyu-user-dropdown-menu::before {
    content: none;
}

.langyu-user-menu-wrapper.is-active .langyu-user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.langyu-user-menu-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px;
    color: #111111;
    text-decoration: none;
    background: #f7f7f8;
}

.langyu-user-menu-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 40px;
}

.langyu-user-menu-profile-image,
.langyu-user-menu-profile-avatar .avatar {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

.langyu-user-menu-profile-text {
    min-width: 0;
    flex: 1 1 auto;
}

.langyu-user-menu-profile-name {
    display: block;
    color: #111111;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.langyu-user-menu-profile-arrow {
    color: #111111;
    flex: 0 0 auto;
}

.langyu-user-menu-section {
    padding: 7px 0;
    border-top: 1px solid #e3e3e8;
    background: #f7f7f8;
}

.langyu-user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #111111;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.langyu-user-menu-item:hover {
    background: rgba(17, 17, 17, 0.04);
    color: #111111;
}

.langyu-user-menu-item-icon {
    width: 20px;
    height: 20px;
    color: #111111;
    flex: 0 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.langyu-user-menu-item-label {
    flex: 1 1 auto;
}

.langyu-user-menu-bottom {
    border-top: 1px solid #e3e3e8;
    background: #f7f7f8;
    display: grid;
    padding: 8px 10px 12px;
    min-height: 76px;
}

.langyu-theme-mode-sheet {
    grid-area: 1 / 1;
    padding: 0;
    opacity: 0;
    overflow: visible;
    transform-origin: left center;
    transform: scaleX(0.08);
    clip-path: inset(0 100% 0 0 round 16px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1), clip-path 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.langyu-user-menu-wrapper.is-theme-panel-open .langyu-theme-mode-sheet {
    opacity: 1;
    transform: scaleX(1);
    clip-path: inset(0 0 0 0 round 16px);
    pointer-events: auto;
}

.langyu-user-menu-wrapper.is-theme-panel-open .langyu-user-menu-footer {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}

.langyu-theme-mode-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    background: #ececef;
    border-radius: 16px;
}

.langyu-theme-mode-option {
    border: none;
    background: transparent;
    color: #74757d;
    border-radius: 12px;
    padding: 9px 5px 10px;
    min-height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.langyu-theme-mode-option:hover {
    color: #111111;
}

.langyu-theme-mode-option.is-active {
    background: #ffffff;
    color: #111111;
    box-shadow: 0 4px 12px rgba(17, 19, 24, 0.08);
}

.langyu-theme-mode-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.langyu-theme-mode-label {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
}

.langyu-user-menu-footer {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 0;
    background: transparent;
    transition: opacity 0.18s ease, transform 0.22s ease;
}

.langyu-user-menu-footer-item {
    border: none;
    background: transparent;
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 58px;
    padding: 6px 8px;
    border-radius: 12px;
    color: #7b7d84;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.langyu-user-menu-footer-item:hover,
.langyu-user-menu-footer-item[aria-expanded="true"] {
    background: rgba(17, 17, 17, 0.04);
    color: #111111;
}

.langyu-user-menu-footer-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.langyu-user-menu-footer-label {
    line-height: 1.2;
    text-align: center;
}

html.is-dark-mode .langyu-user-dropdown-menu {
    background: #1c1d21;
    border-color: #2a2c31;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
}

html.is-dark-mode .langyu-user-menu-profile,
html.is-dark-mode .langyu-user-menu-section,
html.is-dark-mode .langyu-user-menu-bottom,
html.is-dark-mode .langyu-user-menu-footer {
    background: #1c1d21;
}

html.is-dark-mode .langyu-user-menu-profile,
html.is-dark-mode .langyu-user-menu-profile-name,
html.is-dark-mode .langyu-user-menu-profile-arrow,
html.is-dark-mode .langyu-user-menu-item,
html.is-dark-mode .langyu-user-menu-item-icon {
    color: #f4f5f7;
}

html.is-dark-mode .langyu-user-menu-section {
    border-top-color: #2b2d33;
}

html.is-dark-mode .langyu-user-menu-bottom {
    border-top-color: #2b2d33;
}

html.is-dark-mode .langyu-user-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

html.is-dark-mode .langyu-theme-mode-panel,
html.is-dark-mode .langyu-user-menu-footer-item {
    background: #26282d;
}

html.is-dark-mode .langyu-theme-mode-option,
html.is-dark-mode .langyu-user-menu-footer-item {
    color: #a8aeb8;
}

html.is-dark-mode .langyu-theme-mode-option:hover,
html.is-dark-mode .langyu-user-menu-footer-item:hover {
    color: #ffffff;
}

html.is-dark-mode .langyu-theme-mode-option.is-active {
    background: #34363d;
    color: #ffffff;
    box-shadow: none;
}

html.is-dark-mode .langyu-user-menu-footer-item:hover,
html.is-dark-mode .langyu-user-menu-footer-item[aria-expanded="true"] {
    background: #2f3238;
}

/* Mobile User Menu */
.langyu-mobile-user-profile {
    padding: 16px 0;
}

.mobile-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--langyu-border);
    margin-bottom: 8px;
}

.mobile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-username {
    font-size: 16px;
    font-weight: 600;
    color: var(--langyu-text);
}

.mobile-user-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-user-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--langyu-muted);
    font-size: 15px;
    text-decoration: none;
}

.mobile-user-menu a:active {
    background: var(--langyu-soft-bg);
}

.logout-link {
    color: #dc3545 !important;
}

.logout-link svg {
    color: #dc3545 !important;
}

/* ==========================================================================
   User Interactions (Like, Favorite, Follow)
   ========================================================================== */
.langyu-post-interactions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
}

.langyu-post-actions-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.langyu-post-actions-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.langyu-post-actions-right .interaction-btn {
    width: 36px;
    height: 36px;
}

.langyu-charge-btn {
    min-width: 100px;
    height: 45px;
    padding: 0 18px;
    gap: 12px;
    border-radius: 999px;
    background: #f2f2f2 !important;
    color: #7a7a7a;
    box-shadow: none;
    transform: none;
}

.langyu-charge-btn:hover {
    color: #5f5f5f;
    transform: none;
    opacity: 0.95;
}

.langyu-charge-btn:active {
    transform: none;
}

.langyu-charge-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
}

.langyu-charge-btn .count {
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.01em;
}

.langyu-charge-btn.active.action-like {
    background: #ffc400 !important;
    color: #ffffff;
}

.langyu-charge-btn.active.action-like svg {
    fill: currentColor;
    stroke: none;
}

.langyu-charge-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.langyu-charge-avatars {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding-left: 6px;
}

.langyu-charge-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid #f3f3f3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -6px;
    background: #fff;
}

.langyu-charge-avatar:first-child {
    margin-left: 0;
}

.langyu-charge-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px !important;
    display: block;
}

.langyu-charge-text {
    font-size: 12px;
    color: #707174;
    line-height: 1.45;
    white-space: normal;
    overflow: hidden;
    text-overflow: unset;
    max-width: 680px;
    word-break: break-word;
}

.langyu-charge-text strong {
    color: #000000;
    font-weight: 400;
}

html.is-dark-mode .langyu-charge-text strong {
    color: var(--langyu-text);
}

.langyu-post-actions-right .langyu-report-trigger {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--langyu-muted);
}

.langyu-post-actions-right .langyu-report-trigger:hover {
    color: #d14b4b;
}

@media (max-width: 640px) {
    .langyu-charge-info {
        display: none;
    }
}

.interaction-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent !important;
    border-radius: 0;
    font-size: 14px;
    color: var(--langyu-muted);
    cursor: pointer;
    transition: color 0.24s ease, transform 0.24s ease, opacity 0.24s ease;
    outline: none;
}

.interaction-btn:hover {
    color: var(--langyu-primary);
    transform: translateY(-1px);
    background: transparent !important;
}

.interaction-btn:active {
    background: transparent !important;
}

.interaction-btn.langyu-charge-btn {
    background: #f2f2f2 !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #7a7a7a;
    border-radius: 999px;
    transform: none;
}

.interaction-btn.langyu-charge-btn:hover,
.interaction-btn.langyu-charge-btn:active {
    background: #ededed !important;
    color: #5f5f5f;
}

.interaction-btn.langyu-charge-btn.active.action-like {
    background: #ffc400 !important;
    border-color: transparent;
    color: #ffffff;
}

.interaction-btn.active.action-like {
    color: #f53f3f;
    background: transparent !important;
}

.interaction-btn.active.action-favorite {
    color: #f7b500;
    background: transparent !important;
}

.interaction-btn.langyu-charge-btn.active.action-like {
    color: #ffffff;
}

@keyframes langyu-icon-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.interaction-btn.is-animating svg {
    animation: langyu-icon-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.interaction-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.interaction-icon-btn svg {
    display: block;
    fill: none;
    stroke: currentColor;
    transition: fill 0.24s ease, stroke 0.24s ease, color 0.24s ease;
}

.interaction-btn.active.action-like svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

.interaction-btn.active.action-favorite svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

.langyu-report-trigger {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--langyu-muted);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.24s ease;
}

.langyu-report-trigger:hover {
    color: #d14b4b;
}

.langyu-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.langyu-report-modal {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: none;
}

.langyu-report-modal.is-active {
    display: block;
}

.langyu-report-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(4px);
}

.langyu-report-dialog {
    position: relative;
    width: min(92vw, 520px);
    margin: 10vh auto 0;
    padding: 24px;
    border-radius: 16px;
    background: var(--langyu-surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
}

.langyu-report-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    color: var(--langyu-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.langyu-report-title {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--langyu-text);
}

.langyu-report-desc {
    margin: 0 0 16px;
    color: var(--langyu-muted);
    font-size: 14px;
    line-height: 1.7;
}

.langyu-report-input {
    width: 100%;
    min-height: 140px;
    padding: 14px 16px;
    border: 1px solid var(--langyu-border);
    border-radius: 12px;
    background: var(--langyu-surface);
    color: var(--langyu-text);
    font: inherit;
    line-height: 1.7;
    box-sizing: border-box;
    resize: vertical;
}

.langyu-report-input:focus {
    outline: none;
    border-color: var(--langyu-primary);
    box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.08);
}

.langyu-report-feedback {
    min-height: 22px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--langyu-muted);
}

.langyu-report-feedback.is-error {
    color: #d14b4b;
}

.langyu-report-feedback.is-success {
    color: #1e8e5a;
}

.langyu-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.langyu-report-cancel,
.langyu-report-submit {
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.24s ease;
}

.langyu-report-cancel {
    border: 1px solid var(--langyu-border);
    background: transparent;
    color: var(--langyu-muted);
}

.langyu-report-submit {
    border: 1px solid var(--langyu-primary);
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
}

.langyu-report-submit:hover {
    background: var(--langyu-primary-hover);
    border-color: var(--langyu-primary-hover);
}

.langyu-report-submit.loading,
.langyu-report-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .langyu-post-interactions {
        gap: 16px;
        margin: 32px 0;
    }

    .langyu-post-actions-left {
        gap: 16px;
    }

    .langyu-report-dialog {
        width: min(94vw, 520px);
        margin-top: 7vh;
        padding: 22px 18px 18px;
    }
}

.author-actions {
    margin-top: 16px;
}

.author-follow-btn {
    background: #056de8;
    color: var(--langyu-button-text);
    border: 1px solid #056de8;
    padding: 6px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.author-follow-btn:hover {
    background: #045bbd;
    border-color: #045bbd;
}

.author-follow-btn.active {
    background: #edf4ff;
    border-color: #edf4ff;
    color: #056de8;
}

.author-follow-btn.active:hover {
    background: #dfeeff;
    border-color: #dfeeff;
}

.langyupro-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    line-height: 1;
    vertical-align: -0.08em;
    white-space: nowrap;
    flex: 0 0 auto;
}

.langyupro-verified-badge-icon {
    display: block;
    width: 100%;
    height: 100%;
}

html.is-dark-mode .langyupro-verified-badge {
    opacity: 0.98;
}

.author-edit-btn {
    display: inline-block;
    background: transparent;
    color: var(--langyu-muted);
    border: 1px solid #d3dbe3;
    padding: 5px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-edit-btn:hover {
    color: var(--langyu-muted);
    border-color: var(--langyu-muted);
    background: var(--langyu-soft-bg);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--langyu-surface);
    color: var(--langyu-text);
}

/* ==========================================================================
   Header Styles (InfoQ 1:1)
   ========================================================================== */

.langyu-header {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    height: 60px;
    display: flex;
    align-items: center;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--langyu-surface);
    transition: box-shadow 0.28s ease;
    box-shadow: none;
}

.langyu-header.is-stuck {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

@media (min-width: 992px) {
    .langyu-header:not(.is-editor-header) {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
    }

    body:not(.admin-bar) .langyu-container {
        margin-top: calc(40px + 60px);
    }

    body.admin-bar .langyu-container {
        margin-top: calc(40px + 60px + 32px);
    }

    body:not(.admin-bar) .langyu-author-main.sspai-layout {
        padding-top: calc(40px + 60px);
    }

    body.admin-bar .langyu-author-main.sspai-layout {
        padding-top: calc(40px + 60px + 32px);
    }

    body.admin-bar .langyu-header:not(.is-editor-header) {
        top: 32px;
    }
}

.langyu-author-mobile-nav {
    display: none;
}

.langyu-header-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.langyu-header.is-editor-header .langyu-header-inner {
    gap: 24px;
}

.langyu-editor-header-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.langyu-editor-save-state {
    font-size: 13px;
    color: var(--langyu-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Logo */
.langyu-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.langyu-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
    margin-right: 40px;
    transition: opacity 0.2s ease;
}

.langyu-logo img {
    display: block;
    max-height: 34px;
    width: auto;
}

html.is-dark-mode .langyu-logo .langyu-logo-light {
    display: none !important;
}

html.is-dark-mode .langyu-logo .langyu-logo-dark {
    display: block !important;
}

.langyu-mobile-actions,
.langyu-mobile-search-panel,
.langyu-mobile-menu-panel,
.langyu-mobile-drawer {
    display: none;
}

/* Main Nav */
.langyu-nav {
    flex: 1;
    overflow: hidden; /* 防止后台添加过多菜单项撑破布局 */
}

.langyu-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
    flex-wrap: nowrap; /* 强制单行显示 */
    overflow: hidden;  /* 隐藏超出的菜单项 */
}

.langyu-nav-list li {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 防止子项被过度压缩 */
}

.langyu-nav-list li a {
    color: var(--langyu-text);
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.langyu-nav-list li a:hover {
    color: var(--langyu-primary);
}

.langyu-nav-list li.current-menu-item a,
.langyu-nav-list li.current_page_item a {
    font-weight: 600;
    color: var(--langyu-text);
}

.langyu-nav-list li.menu-item-has-children a {
    gap: 4px;
}

/* Badges */
.langyu-badge {
    position: absolute;
    top: -10px;
    right: -24px;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 4px;
    border-bottom-left-radius: 0;
    color: var(--langyu-button-text);
    font-weight: 600;
    line-height: 1.2;
    transform: scale(0.85);
    transform-origin: left bottom;
}

.langyu-badge.hot {
    background-color: var(--langyu-primary);
}

.langyu-badge.new {
    background-color: var(--langyu-primary); /* In image, both look blueish */
}

/* Right Section */
.langyu-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.langyu-editor-header-actions {
    gap: 12px;
}

.langyu-editor-header-divider {
    width: 1px;
    height: 18px;
    background: #e9e9ee;
    margin: 0 2px 0 4px;
    flex-shrink: 0;
}

.langyu-editor-action {
    height: auto;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    color: var(--langyu-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.langyu-editor-action:hover:not(:disabled) {
    color: var(--langyu-primary);
}

.langyu-editor-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.langyu-editor-action-secondary {
    color: var(--langyu-muted);
}

.langyu-editor-action-secondary:hover:not(:disabled) {
    color: var(--langyu-text);
}

.langyu-editor-action-primary {
    color: var(--langyu-text);
    font-weight: 600;
}

.langyu-editor-action-primary:hover:not(:disabled) {
    color: var(--langyu-primary);
}

/* Header Icon Buttons */
.langyu-header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 16px;
}

.langyu-notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.langyu-header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--langyu-text);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.langyu-header-icon-btn:hover {
    background-color: var(--langyu-soft-bg);
    color: var(--langyu-primary);
}

.langyu-header-icon-btn svg {
    width: 20px;
    height: 20px;
}

.langyu-notification-btn {
    position: relative;
}

.langyu-notification-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    display: block;
    font-size: 0;
    line-height: 0;
    color: transparent;
    border-radius: 999px;
    background: #ff4d3d;
    box-shadow: 0 0 0 2px var(--langyu-surface);
}

.langyu-notification-btn.has-unread {
    color: var(--langyu-primary);
}

.langyu-notification-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: -6px;
    width: 304px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 1100;
}

.langyu-notification-popover::before {
    content: "";
    position: absolute;
    top: -10px;
    right: 0;
    left: 0;
    height: 10px;
}

.langyu-notification-popover-inner {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(19, 21, 26, 0.14);
    overflow: hidden;
    border: 1px solid #efeff2;
}

.langyu-notification-wrapper:hover .langyu-notification-popover,
.langyu-notification-wrapper:focus-within .langyu-notification-popover,
.langyu-notification-wrapper.is-active .langyu-notification-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

html.is-dark-mode .langyu-notification-popover-inner {
    background: #1f1f22;
    border-color: #2a2f39;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

html.is-dark-mode .langyu-notification-preview-item {
    border-bottom-color: #252a33;
}

html.is-dark-mode .langyu-notification-preview-type {
    color: #9aa3b2;
}

html.is-dark-mode .langyu-notification-preview-content {
    color: #e6eaf0;
}

html.is-dark-mode .langyu-notification-preview-time {
    color: #7f8795;
}

html.is-dark-mode .langyu-notification-preview-empty {
    color: #c7cfdb;
}

html.is-dark-mode .langyu-notification-view-all {
    border-top-color: #252a33;
    color: #e7ecf3;
    background: #111319;
}

html.is-dark-mode .langyu-notification-view-all:hover {
    background: #1a1f28;
}

.langyu-notification-preview-list {
    list-style: none;
    margin: 0;
    padding: 12px 0;
}

.langyu-notification-preview-item {
    padding: 11px 18px;
    border-bottom: 1px solid #f1f1f3;
}

.langyu-notification-preview-item:last-child {
    border-bottom: 0;
}

.langyu-notification-preview-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.langyu-notification-preview-type {
    flex: 0 0 auto;
    color: #6a6b72;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.langyu-notification-preview-content {
    flex: 1 1 auto;
    min-width: 0;
    color: #33343a;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.langyu-notification-preview-time {
    flex: 0 0 auto;
    color: #a0a1a7;
    font-size: 12px;
    line-height: 1.4;
}

.langyu-notification-preview-empty {
    padding: 20px 18px;
    color: #76777d;
    font-size: 16px;
    font-weight: 600;
    min-height: 72px;
    display: flex;
    align-items: center;
}

.langyu-notification-view-all {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    border-top: 1px solid #ededf0;
    color: #1f2024;
    font-size: 14px;
    font-weight: 700;
    background: #fff;
}

.langyu-notification-view-all:hover {
    background: #fafafb;
    color: var(--langyu-primary);
}

/* Search Dropdown Overlay */
.langyu-search-dropdown-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    backdrop-filter: blur(4px);
}

.langyu-search-form {
    position: relative;
    width: 600px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
}

.langyu-search-overlay-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--langyu-surface);
    border-radius: 30px;
    padding: 0 16px;
    height: 56px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.langyu-search-overlay-inner:focus-within {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.langyu-search-overlay-icon {
    color: var(--langyu-muted);
    margin-right: 12px;
    flex-shrink: 0;
}

.langyu-search-overlay-inner input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--langyu-text);
    outline: none;
}

.langyu-search-overlay-inner input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.langyu-search-close-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--langyu-muted);
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.langyu-search-overlay-inner input:not(:placeholder-shown) + .langyu-search-close-btn {
    display: flex;
}

.langyu-search-close-btn:hover {
    color: var(--langyu-text);
}

.langyu-search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    background: var(--langyu-surface);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    padding: 20px;
    box-sizing: border-box;
}

html.is-dark-mode .langyu-search-dropdown {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--langyu-muted);
}

.clear-history-btn {
    background: none;
    border: none;
    color: var(--langyu-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
}

.clear-history-btn:hover {
    color: var(--langyu-primary);
}

.search-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-history-list li {
    background: var(--langyu-soft-bg);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    color: var(--langyu-text);
    transition: background 0.2s, color 0.2s;
}

.search-history-list li:hover {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
}

.langyu-mobile-icon-button {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--langyu-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
}

.langyu-mobile-menu-toggle {
    display: none;
    position: relative;
    border-radius: 50%;
}

.langyu-mobile-menu-toggle-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    transition: opacity 0.22s ease, transform 0.22s ease;
    color: currentColor;
        width: 24px;
        height: 24px;
}

.langyu-mobile-menu-toggle-icon-close {
    opacity: 0;
    transform: scale(0.92);
}

.langyu-mobile-menu-toggle.is-active .langyu-mobile-menu-toggle-icon-grid {
    opacity: 0;
    transform: scale(0.92);
}

.langyu-mobile-menu-toggle.is-active .langyu-mobile-menu-toggle-icon-close {
    opacity: 1;
    transform: scale(1);
}

.langyu-btn-write {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 16px;
    background-color: var(--langyu-primary);
    color: var(--langyu-button-text);
    text-decoration: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.langyu-btn-write:hover {
    background-color: var(--langyu-primary-hover);
    color: var(--langyu-button-text);
}

.langyu-login {
    color: var(--langyu-text);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.langyu-login:hover {
    color: var(--langyu-primary);
}

/* ==========================================================================
   Home Featured Grid
   ========================================================================== */
.langyu-home-featured-wrapper {
    position: relative;
    margin: 20px auto 0;
    padding: 0 20px;
    box-sizing: border-box;
}

.langyu-home-featured-shell {
    --langyu-featured-side-width: 280px;
    --langyu-featured-gap: 36px;
    display: flex;
    align-items: stretch;
    gap: var(--langyu-featured-gap);
}

.langyu-home-featured-main {
    position: relative;
    width: 100%;
    flex: 0 0 100%;
    min-width: 0;
}

.langyu-home-top-area {
    margin-bottom: 24px;
}

.langyu-home-top-widget {
    margin: 0;
}

.langyu-home-top-mobile-badge {
    display: none;
}

.langyu-home-top-mobile-submit {
    display: none;
}

.langyu-home-top-widget + .langyu-home-top-widget {
    margin-top: 20px;
}

.langyu-home-featured-pagination {
    position: absolute;
    top: 16px;
    left: 24px;
    right: 24px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.langyu-home-featured-grid {
    position: relative;
    overflow: hidden;
    height: 420px;
    border-radius: 0;
    background: #0a0b0f;
    box-shadow: 0 22px 48px rgba(16, 20, 31, 0.22);
    cursor: grab;
    user-select: none;
}

.langyu-home-featured-grid.is-dragging {
    cursor: grabbing;
}

.langyu-home-featured-track {
    display: flex;
    gap: 0;
    height: 100%;
    touch-action: pan-y;
    will-change: transform;
}

.featured-item {
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    border-radius: 0;
    text-decoration: none;
}

.featured-large,
.featured-small {
    height: 100%;
}

.featured-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 0.5s ease;
}

.featured-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 8, 12, 0.04) 0%, rgba(6, 8, 12, 0.14) 35%, rgba(6, 8, 12, 0.76) 100%),
        linear-gradient(0deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08));
    pointer-events: none;
}

.featured-item.is-active .featured-bg,
.featured-item:hover .featured-bg {
    transform: scale(1.02);
}

.featured-content {
    position: relative;
    z-index: 1;
    padding: 24px 22px 26px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.featured-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.featured-large .featured-title {
    font-size: 16px;
}

.featured-title span {
    background: transparent;
    color: #fff;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

.featured-desc {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: break-word;
}

.featured-desc span {
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    box-sizing: border-box;
    width: 88%;
    text-align: left;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.langyu-home-featured-thumb-row {
    margin: 0;
}

.langyu-home-featured-thumb-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.langyu-home-featured-thumb-row.is-count-1 .langyu-home-featured-thumb-track {
    grid-template-columns: minmax(0, 1fr);
}

.langyu-home-featured-thumb-row.is-count-2 .langyu-home-featured-thumb-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.langyu-home-featured-thumb-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 6;
    text-decoration: none;
    background: #f2f4f7;
    box-shadow: 0 10px 28px rgba(18, 24, 39, 0.08);
    border-radius: 10px;
}

.langyu-home-featured-thumb-card.is-static {
    cursor: default;
}

.langyu-home-featured-thumb-media {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 0.5s ease;
    border-radius: 10px;
}

.langyu-home-featured-thumb-card:hover .langyu-home-featured-thumb-media {
    transform: scale(1.03);
}

.langyu-home-featured-thumb-placeholder,
.langyu-home-featured-side-placeholder {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(241, 243, 247, 0.95), rgba(228, 231, 237, 0.96)),
        linear-gradient(120deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
    box-shadow: 0 10px 28px rgba(18, 24, 39, 0.08);
}

.langyu-home-featured-thumb-placeholder::before,
.langyu-home-featured-side-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 80%);
    transform: translateX(-100%);
    animation: langyuPlaceholderShimmer 3.2s ease-in-out infinite;
}

.langyu-home-featured-thumb-placeholder {
    aspect-ratio: 16 / 6;
}

.langyu-home-featured-side-placeholder {
    width: 100%;
    flex: 1;
    min-height: 0;
    border-radius: 0;
}

.thumb-placeholder-1 {
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
        linear-gradient(135deg, #4a4f65, #b8bfd4);
}

.thumb-placeholder-2 {
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.14)),
        linear-gradient(135deg, #4f5dff, #ef9bd0);
}

.thumb-placeholder-3 {
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
        linear-gradient(135deg, #f4c062, #f0d48e);
}

@keyframes langyuPlaceholderShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@media (min-width: 992px) {
    .langyu-home-featured-pagination {
        left: 24px;
        right: 24px;
    }
}

/* Responsive */
/* ==========================================================================
   Home Author Badge Component
   ========================================================================== */
.langyu-author-badge-container {
    width: 100%;
    position: relative;
    background: transparent;
    overflow: visible;
    container-type: inline-size;
    margin-bottom: 24px;
    --badge-seam-x: 28%;
    --badge-notch-size: 18px;
    --badge-surface: #f7f7f9;
    --badge-stroke: #e7e7ed;
    --badge-cutout-bg: var(--langyu-background, #ffffff);
}

.langyu-author-badge {
    position: relative;
    width: 100%;
    aspect-ratio: 440 / 160;
    display: flex;
    perspective: 1000px;
}

.langyu-author-badge-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.56s cubic-bezier(0.4, 0, 0.2, 1);
}

.langyu-author-badge-inner.is-flipped {
    transform: rotateY(180deg);
}

.langyu-author-badge-front,
.langyu-author-badge-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--badge-surface);
    backface-visibility: hidden;
    display: flex;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: inset 0 0 0 1px var(--badge-stroke);
}

html.is-dark-mode .langyu-author-badge-front,
html.is-dark-mode .langyu-author-badge-back {
    --badge-surface: #1d1f26;
    --badge-stroke: rgba(255, 255, 255, 0.08);
    --badge-cutout-bg: var(--langyu-background, #111318);
}

.langyu-author-badge-back {
    transform: rotateY(180deg);
}

/* Common Layout */
.badge-left {
    width: 28%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 0 0 28%;
}

.badge-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(14px, 4.6cqi, 24px);
    padding: 0 clamp(16px, 5.4cqi, 24px) 0 clamp(18px, 6.8cqi, 30px);
    position: relative;
}

/* Vertical Separator & Cutouts */
.badge-left::after {
    content: "";
    position: absolute;
    right: 0;
    top: 22px;
    bottom: 22px;
    width: 1px;
    background: var(--badge-stroke);
}

html.is-dark-mode .badge-left::after {
    background: var(--badge-stroke);
}

.langyu-author-badge-front::before,
.langyu-author-badge-front::after,
.langyu-author-badge-back::before,
.langyu-author-badge-back::after {
    content: "";
    position: absolute;
    left: var(--badge-seam-x);
    width: calc(var(--badge-notch-size) * 2);
    height: calc(var(--badge-notch-size) * 2);
    background: var(--badge-cutout-bg);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 3;
    box-shadow: 0 0 0 1px var(--badge-stroke);
}

.langyu-author-badge-front::before,
.langyu-author-badge-back::before {
    top: calc(var(--badge-notch-size) * -1);
}

.langyu-author-badge-front::after,
.langyu-author-badge-back::after {
    bottom: calc(var(--badge-notch-size) * -1);
}

.langyu-desktop-author-swiper {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    padding: 0 !important;
    gap: 0 !important;
    /* Removed flex-direction: column so it can be row if needed, but wait, swiper usually needs display: block or flex */
    cursor: grab;
}

.langyu-author-badge-front.is-author-view .langyu-desktop-author-swiper {
    display: flex;
}

.langyu-author-badge-front.is-author-view .langyu-desktop-metric-container {
    display: none;
}

.langyu-author-badge-front.is-metric-view .langyu-desktop-author-swiper {
    display: none;
}

.langyu-author-badge-front.is-metric-view .langyu-desktop-metric-container {
    display: flex;
}

.langyu-desktop-author-swiper.is-dragging {
    cursor: grabbing;
}

.langyu-desktop-author-track {
    display: flex;
    flex-direction: row;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    height: 100%;
    will-change: transform;
}

.langyu-desktop-author-slide {
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    flex: 0 0 100%;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    padding: 0 clamp(16px, 5.4cqi, 24px) 0 clamp(18px, 6.8cqi, 30px);
    gap: clamp(14px, 4.6cqi, 24px);
    /* To prevent image drag issues */
    user-select: none;
}

.langyu-desktop-author-slide img {
    pointer-events: none;
}

.langyu-desktop-author-pagination {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.desktop-author-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.desktop-author-dot.is-active {
    width: 12px;
    border-radius: 2px;
    background: #111111;
}

html.is-dark-mode .desktop-author-dot {
    background: rgba(255, 255, 255, 0.2);
}

html.is-dark-mode .desktop-author-dot.is-active {
    background: #ffffff;
}

/* Front Side Elements */
.badge-toggle {
    cursor: pointer;
    color: #111111;
    transition: color 0.2s ease;
}

.langyu-author-badge-inner[data-flip-enabled="0"] .badge-toggle {
    cursor: default;
}

.badge-toggle:hover {
    color: #111111;
}

.badge-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.badge-title {
    font-size: clamp(11px, 3.4cqi, 15px);
    color: #7d7d84;
    font-weight: 400;
    line-height: 1.2;
}

.badge-name {
    font-size: clamp(14px, 5.3cqi, 24px);
    color: #111111;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.badge-avatar {
    width: clamp(44px, 12.8cqi, 56px);
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    position: relative;
    z-index: 10;
}

.langyu-desktop-author-slide .badge-avatar {
    pointer-events: auto;
}

.langyu-author-badge-front.is-metric-view .badge-avatar {
    display: none;
}

.langyu-author-badge-front.is-metric-view .badge-name {
    font-size: clamp(18px, 6cqi, 28px);
}

.langyu-author-badge-front.is-author-view .badge-avatar {
    display: block;
}

.badge-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.badge-icon {
    width: 24px;
    height: 24px;
    display: block;
    flex: 0 0 auto;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.badge-left .badge-icon {
    width: 26px;
    height: 26px;
}

/* Back Side Elements */
.badge-close-btn {
    width: clamp(42px, 13.6cqi, 54px);
    height: clamp(42px, 13.6cqi, 54px);
    border-radius: 50%;
    background: #88888d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.badge-close-icon {
    width: 18px;
    height: 18px;
    stroke-width: 1.7;
}

.badge-close-btn:hover {
    background: #7c7c82;
}

.badge-actions {
    justify-content: space-between;
    gap: 10px;
    padding: 0 clamp(14px, 4.5cqi, 20px);
}

.badge-action-icon {
    color: #111111;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    min-width: 24px;
    font-weight: 400;
    line-height: 0;
    text-decoration: none;
}

.badge-action-icon .badge-icon {
    width: 24px;
    height: 24px;
}

.badge-action-icon:hover {
    color: #111111;
    opacity: 0.88;
}

html.is-dark-mode .badge-toggle,
html.is-dark-mode .badge-name,
html.is-dark-mode .badge-action-icon {
    color: #f5f5f7;
}

html.is-dark-mode .badge-title {
    color: #b0b0b8;
}

html.is-dark-mode .badge-close-btn {
    background: #75757c;
}

.langyu-home-featured-side-placeholder {
    width: 100%;
    flex: 1 1 auto;
    min-height: 300px;
    margin-bottom: 20px;
}

@media (max-width: 991px) {
    .langyu-theme-mode-sheet {
        transform-origin: center top;
    }

    .langyu-user-menu-wrapper.is-theme-panel-open .langyu-user-menu-bottom {
        min-height: 86px;
    }

    .langyu-user-menu-wrapper.is-theme-panel-open .langyu-theme-mode-sheet {
        transform: none;
        clip-path: none;
    }

    .home .langyu-home-top-area {
        display: grid;
        grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
        grid-auto-rows: auto;
        gap: 10px;
        align-items: stretch;
        margin: -24px -16px 18px;
    }

    .home .langyu-home-top-area > .langyu-home-top-widget {
        margin-top: 0;
    }

    .home .langyu-home-top-widget.widget_langyu_home_featured_posts {
        grid-row: 1;
        grid-column: 1 / -1;
    }

    .home .langyu-home-top-mobile-badge {
        display: block;
        grid-row: 2 / span 2;
        grid-column: 2;
        min-width: 0;
        align-self: stretch;
        margin-top: 0;
        margin-right: 12px;
        overflow: hidden;
    }

    .home .langyu-home-top-mobile-submit {
        display: flex;
        grid-row: 3;
        grid-column: 1;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        min-width: 0;
        align-self: stretch;
        min-height: 0;
        padding: 12px 14px;
        border-radius: 22px;
        background: #f4f4f7;
        color: #17171a;
        text-decoration: none;
        box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.05), 0 6px 18px rgba(17, 17, 17, 0.04);
        margin-left: 12px;
    }

    .home .langyu-home-top-widget.widget_langyu_home_featured_thumbs {
        grid-row: 2;
        grid-column: 1;
        min-width: 0;
        align-self: stretch;
        margin-left: 12px;
    }

    .home .langyu-home-top-mobile-submit-icon {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #1c1d22;
        color: #ffffff;
        font-size: 24px;
        line-height: 1;
        flex: 0 0 38px;
    }

    .home .langyu-home-top-mobile-submit-content {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .home .langyu-home-top-mobile-submit-label {
        display: block;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: 0.02em;
    }

    .home .langyu-home-top-mobile-submit-subtitle {
        display: block;
        margin-top: 3px;
        font-size: 12px;
        line-height: 1.35;
        color: rgba(23, 23, 26, 0.68);
    }

    .home .langyu-home-top-mobile-badge .langyu-author-badge-container {
        display: block;
        height: auto;
        margin-bottom: 0;
    }

    .home .langyu-mobile-author-swiper {
        position: relative;
        height: 100%;
        min-height: 156px;
    }

    .home .langyu-mobile-author-card {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        min-height: 156px;
        border-radius: 28px;
        background: #f4f4f7;
        box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.05), 0 8px 20px rgba(17, 17, 17, 0.04);
        color: #17171a;
        text-decoration: none;
        overflow: hidden;
    }

    .home .langyu-mobile-author-card-dots {
        position: absolute;
        top: 12px;
        left: 50%;
        z-index: 3;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .home .langyu-mobile-author-viewport {
        display: block;
        width: 100%;
        height: 100%;
        overflow: hidden;
        border-radius: inherit;
    }

    .home .langyu-mobile-author-track {
        display: flex;
        width: 100%;
        height: 100%;
        will-change: transform;
    }

    .home .langyu-mobile-author-slide {
        position: relative;
        flex: 0 0 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 156px;
        padding: 28px 14px 14px;
        box-sizing: border-box;
        text-align: center;
        color: #17171a;
    }

    .home .langyu-mobile-author-avatar {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-bottom: 2px;
    }

    .home .langyu-mobile-author-avatar .avatar {
        width: 68px;
        height: 68px;
        border-radius: 50%;
        box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
    }

    .home .langyu-mobile-author-meta {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
        align-items: center;
    }

    .home .langyu-mobile-author-title {
        font-size: 12px;
        color: #7b7b82;
        letter-spacing: 0.02em;
        line-height: 1.25;
    }

    .home .langyu-mobile-author-year {
        color: #8b8b92;
        font-weight: 500;
    }

    .home .langyu-mobile-author-name {
        font-size: 14px;
        line-height: 1.25;
        color: #111111;
    }

    .home .langyu-mobile-author-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }

    .home .langyu-mobile-author-dot {
        width: 6px;
        height: 6px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(23, 23, 26, 0.18);
        cursor: pointer;
        transition: width 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
        opacity: 0.9;
    }

    .home .langyu-mobile-author-dot.is-active {
        width: 18px;
        background: rgba(23, 23, 26, 0.78);
    }

    .home .langyu-home-top-mobile-badge .langyu-author-badge {
        width: 100%;
        height: 100%;
        min-height: 156px;
        aspect-ratio: auto;
    }

    .home .langyu-home-top-mobile-badge .langyu-author-badge-front,
    .home .langyu-home-top-mobile-badge .langyu-author-badge-back {
        border-radius: 28px;
        background: #f4f4f7;
        box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.05), 0 8px 20px rgba(17, 17, 17, 0.04);
    }

    .home .langyu-home-top-mobile-badge .langyu-author-badge-back,
    .home .langyu-home-top-mobile-badge .badge-left {
        display: none;
    }

    .home .langyu-home-top-mobile-badge .langyu-author-badge-inner {
        transform: none !important;
    }

    .home .langyu-home-top-mobile-badge .langyu-author-badge-front {
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 18px 14px 14px;
        box-sizing: border-box;
    }

    .home .langyu-home-top-mobile-badge .langyu-author-badge-front::before,
    .home .langyu-home-top-mobile-badge .langyu-author-badge-front::after {
        display: none;
    }

    .home .langyu-home-top-mobile-badge .langyu-author-badge-front .badge-right::before {
        content: "";
        display: block;
        width: 46px;
        height: 8px;
        margin: 0 auto 10px;
        border-radius: 999px;
        background:
            radial-gradient(circle, rgba(140, 140, 148, 0.72) 2px, transparent 2.5px) 0 50% / 11px 8px repeat-x;
    }

    .home .langyu-home-top-mobile-badge .badge-right {
        width: 100%;
        padding: 0;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .home .langyu-home-top-mobile-badge .badge-name {
        font-size: 14px;
        /* font-weight: 700; */
        line-height: 1.25;
    }

    .home .langyu-home-top-mobile-badge .badge-avatar {
        order: -1;
        width: 68px;
        flex-basis: 68px;
        margin: 0 auto 2px;
        box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
    }

    .home .langyu-home-top-mobile-badge .badge-info {
        gap: 4px;
    }

    .home .langyu-home-top-mobile-badge .badge-title {
        font-size: 12px;
        color: #7b7b82;
        letter-spacing: 0.02em;
    }

    .home .langyu-home-top-mobile-badge .badge-title::after {
        content: " (2025)";
        color: #8b8b92;
        font-weight: 500;
    }

    html.is-dark-mode .home .langyu-home-top-mobile-submit {
        background: #1d1f26;
        color: #f5f5f7;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.28);
    }

    html.is-dark-mode .home .langyu-home-top-mobile-submit-icon {
        background: #f5f5f7;
        color: #16181d;
    }

    html.is-dark-mode .home .langyu-home-top-mobile-submit-subtitle {
        color: rgba(245, 245, 247, 0.62);
    }

    html.is-dark-mode .home .langyu-home-top-mobile-badge .langyu-author-badge-front,
    html.is-dark-mode .home .langyu-home-top-mobile-badge .langyu-author-badge-back {
        background: #1d1f26;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 0, 0, 0.28);
    }

    html.is-dark-mode .home .langyu-mobile-author-slide {
        color: #f5f5f7;
    }

    html.is-dark-mode .home .langyu-mobile-author-card {
        background: #1d1f26;
        color: #f5f5f7;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 0, 0, 0.28);
    }

    html.is-dark-mode .home .langyu-mobile-author-title {
        color: #b9bac1;
    }

    html.is-dark-mode .home .langyu-mobile-author-year {
        color: #969aa3;
    }

    html.is-dark-mode .home .langyu-mobile-author-name {
        color: #f3f5f7;
    }

    html.is-dark-mode .home .langyu-mobile-author-dot {
        background: rgba(245, 245, 247, 0.22);
    }

    html.is-dark-mode .home .langyu-mobile-author-dot.is-active {
        background: rgba(245, 245, 247, 0.92);
    }

    html.is-dark-mode .home .langyu-home-top-mobile-badge .badge-title {
        color: #b9bac1;
    }

    html.is-dark-mode .home .langyu-home-top-mobile-badge .badge-title::after {
        color: #969aa3;
    }

    .langyu-home-featured-side-placeholder,
    .langyu-sidebar .langyu-author-badge-container {
        display: none;
    }

    .langyu-home-featured-grid {
        height: 380px;
    }

    .langyu-home-featured-grid::-webkit-scrollbar {
        display: none;
    }

    .featured-title {
        font-size: 16px;
    }

    .featured-title span {
        font-size: 16px;
    }

    .featured-large .featured-title,
    .featured-small .featured-title {
        font-size: 16px;
    }

    .featured-desc {
        margin-top: 10px;
        font-size: 13px;
        line-height: 1.55;
    }

    .langyu-home-featured-pagination {
        left: 20px;
        right: 20px;
    }

    .langyu-home-featured-thumb-row {
        position: relative;
        height: auto;
        aspect-ratio: 3 / 1;
        overflow: hidden;
        border-radius: 12px;
    }

    .langyu-home-featured-thumb-track {
        display: flex;
        flex-direction: column;
        gap: 0;
        height: 100%;
        transition: transform 0.52s ease;
        will-change: transform;
    }

    .langyu-home-featured-thumb-card {
        flex: 0 0 100%;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 12px;
    }

    .langyu-home-featured-thumb-media {
        border-radius: 12px;
    }
}

.featured-pagination-bar {
    flex: 1;
    height: 3px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    cursor: pointer;
    pointer-events: auto;
}

.featured-pagination-bar span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.96);
    transform: scaleX(0);
    transform-origin: left center;
    transition: none;
}

.featured-pagination-bar.is-progressing span {
    transition: transform var(--featured-progress-duration, 4200ms) linear;
    transform: scaleX(1);
}

/* ==========================================================================
   Author Post List (Sspai Timeline Style)
   ========================================================================== */
.sspai-timeline-list {
    position: relative;
}

.sspai-timeline-item {
    display: flex;
    margin-bottom: 32px;
    position: relative;
}

.sspai-timeline-item:last-child {
    margin-bottom: 0;
}

.sspai-timeline-item:last-child .sspai-timeline-line {
    display: none;
}

.sspai-timeline-indicator {
    width: 40px;
    flex-shrink: 0;
    margin-right: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sspai-timeline-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--langyu-border);
    background: var(--langyu-surface);
    z-index: 2;
}

.sspai-timeline-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sspai-timeline-line {
    flex: 1;
    width: 1px;
    background: var(--langyu-border);
    margin-top: 8px;
    margin-bottom: -32px; /* 贯穿到下一个项目 */
}

.sspai-timeline-content {
    flex: 1;
    min-width: 0; /* 防止溢出 */
}

.sspai-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px; /* 和左侧头像高度对齐 */
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--langyu-muted);
}

.sspai-action-text {
    font-weight: 500;
    color: var(--langyu-text);
}

.sspai-post-card {
    display: flex;
    background: #f7f7f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    border: none;
    width: 430px;
    height: 96px;
    max-width: 100%;
}

html.is-dark-mode .sspai-post-card {
    background: #28282a;
}

.sspai-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.sspai-post-content {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sspai-post-label {
    font-size: 12px;
    color: var(--langyu-muted);
    margin-bottom: 2px;
}

.sspai-post-title {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.sspai-post-title a {
    color: var(--langyu-text);
    text-decoration: none;
}

.sspai-post-desc {
    margin: 0 0 10px;
    padding-left: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--langyu-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-type-comment .sspai-post-desc {
    text-align: left;
    max-width: 560px;
}

.sspai-post-thumbnail {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    margin: 18px 16px 18px 0;
    border-radius: 4px;
    overflow: hidden;
}

.sspai-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-posts-infinite-trigger {
    width: 100%;
    height: 1px;
}

.author-posts-infinite-loading {
    padding: 12px 0 0 56px;
    font-size: 13px;
    color: var(--langyu-muted);
}

.langyu-posts-infinite-trigger {
    width: 100%;
    height: 1px;
}

.langyu-posts-infinite-loading {
    padding: 18px 0;
    text-align: center;
    font-size: 13px;
    color: var(--langyu-muted);
}

.langyu-post-item-skeleton {
    pointer-events: none;
}

.langyu-post-item-skeleton .langyu-post-thumbnail {
    overflow: hidden;
}

.langyu-post-item-skeleton .langyu-skeleton-block,
.langyu-post-item-skeleton .langyu-skeleton-line,
.langyu-post-item-skeleton .langyu-skeleton-chip {
    position: relative;
    overflow: hidden;
    background: #eef0f4;
    border-radius: 8px;
}

.langyu-post-item-skeleton .langyu-skeleton-block::after,
.langyu-post-item-skeleton .langyu-skeleton-line::after,
.langyu-post-item-skeleton .langyu-skeleton-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    animation: langyu-skeleton-shimmer 1.15s ease infinite;
}

.langyu-post-item-skeleton .langyu-skeleton-block {
    display: block;
    width: 100%;
    height: 100%;
}

.langyu-post-item-skeleton .langyu-skeleton-line {
    height: 12px;
    margin-bottom: 10px;
}

.langyu-post-item-skeleton .langyu-skeleton-line.is-title {
    height: 16px;
    width: 92%;
}

.langyu-post-item-skeleton .langyu-skeleton-line.is-title.short {
    width: 70%;
}

.langyu-post-item-skeleton .langyu-skeleton-line.is-desc {
    width: 64%;
    margin-bottom: 14px;
}

.langyu-post-item-skeleton .langyu-skeleton-chip {
    height: 16px;
    width: 112px;
    border-radius: 999px;
}

.langyu-post-item-skeleton .langyu-skeleton-chip.is-time {
    width: 66px;
}

@keyframes langyu-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

html.is-dark-mode .langyu-post-item-skeleton .langyu-skeleton-block,
html.is-dark-mode .langyu-post-item-skeleton .langyu-skeleton-line,
html.is-dark-mode .langyu-post-item-skeleton .langyu-skeleton-chip {
    background: #242a35;
}

html.is-dark-mode .langyu-post-item-skeleton .langyu-skeleton-block::after,
html.is-dark-mode .langyu-post-item-skeleton .langyu-skeleton-line::after,
html.is-dark-mode .langyu-post-item-skeleton .langyu-skeleton-chip::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13), transparent);
}

@media (max-width: 768px) {
    .sspai-timeline-item {
        margin-bottom: 24px;
    }
    
    .sspai-timeline-indicator {
        margin-right: 12px;
    }
    
    .sspai-timeline-line {
        margin-bottom: -24px;
    }
    
    .sspai-post-card {
        width: 100%;
        max-width: none;
        flex-direction: row;
        align-items: stretch;
    }
    
    .sspai-post-thumbnail {
        order: 2;
        width: 120px;
        min-width: 120px;
        height: auto;
        margin: 0;
        border-radius: 0;
        border-left: 1px solid var(--langyu-border);
    }
    
    .sspai-post-content {
        order: 1;
        flex: 1;
        padding: 16px;
    }

    .sspai-post-desc {
        padding-left: 0;
        max-width: none;
    }
}

.langyu-container {
    max-width: 1050px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.langyu-main {
    flex: 1 1 auto;
    min-width: 0; /* 防止子元素撑破 flex 容器 */
    /* padding-top: 50px; */
}

body.single .langyu-main {
    max-width: 734px;
    margin-left: auto;
    margin-right: auto;
}

.langyu-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* 单页：左侧悬浮菜单 + 右侧文章目录 */
.langyu-floating-actions {
    position: fixed;
    top: 180px;
    left: max(12px, calc(50% - 367px - 100px - 42px));
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #9aa0a6;
    user-select: none;
}

.langyu-floating-actions .langyu-floating-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    display: grid;
    place-items: center;
    color: #9aa0a6;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.langyu-floating-actions .langyu-floating-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #61656b;
}

.langyu-floating-count {
    font-size: 13px;
    line-height: 1;
    color: #9aa0a6;
    margin-top: -6px;
    margin-bottom: 4px;
}

.langyu-floating-popover {
    position: absolute;
    left: 54px;
    top: 0;
    width: 170px;
    padding: 12px;
    border-radius: 10px;
    background: var(--langyu-surface);
    border: 1px solid var(--langyu-border);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

.langyu-floating-popover-title {
    font-size: 13px;
    color: var(--langyu-muted);
    margin-bottom: 10px;
}

.langyu-floating-qr {
    width: 146px;
    height: 146px;
    display: block;
    border-radius: 8px;
    background: var(--langyu-soft-bg);
}

/* 右侧文章导航（参考图样式：左侧短横线 + 单行省略） */
.langyu-post-toc-fixed {
    position: fixed;
    top: 180px;
    left: min(calc(100vw - 260px - 40px), calc(50% + 367px + 100px));
    width: 18px;
    z-index: 55;
    max-height: calc(100vh - 220px);
    overflow: hidden;
    padding: 0;
    transition: width 0.35s ease;
}

.langyu-post-toc-fixed:hover {
    width: 260px;
    overflow-y: auto;
}

.langyu-post-toc-title {
    display: none; /* 参考图无标题 */
}

.langyu-post-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.langyu-post-toc-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7b8088;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.langyu-post-toc-nav a::before {
    content: "";
    width: 14px;
    height: 3px;
    border-radius: 3px;
    background: #d5d8dd;
    flex: 0 0 auto;
}

.langyu-post-toc-nav a:hover {
    color: #4c4f55;
}

.langyu-post-toc-nav a.is-active {
    color: #1c1f23;
    font-weight: 600;
}

.langyu-post-toc-nav a.is-active::before {
    background: #1c1f23;
}

.langyu-post-toc-nav a.toc-level-3 { padding-left: 10px; }
.langyu-post-toc-nav a.toc-level-4 { padding-left: 20px; }

@media (max-width: 991px) {
    .langyu-floating-actions { display: none; }
    .langyu-post-toc-fixed { display: none; }
}

/* 屏幕较窄时右侧留白不足，隐藏目录避免遮挡正文 */
@media (max-width: 1200px) {
    .langyu-post-toc-fixed { display: none; }
}

.langyu-search-header,
.langyu-archive-header {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--langyu-surface);
    border-radius: 8px;
}

.langyu-search-header .page-title,
.langyu-archive-header .page-title {
    margin: 0;
    font-size: 24px;
}

.langyu-archive-header .page-title {
    margin-bottom: 10px;
}

.langyu-archive-header .archive-description {
    color: var(--langyu-muted);
    font-size: 14px;
}

.langyu-search-query {
    color: var(--langyu-primary);
}

/* Post Item */
.langyu-post-item {
    display: flex;
    align-items: flex-start;
    padding: 24px 0;
    border-bottom: 1px solid var(--langyu-border);
    gap: 24px;
}

.langyu-author-main .langyu-post-item {
    flex-direction: row-reverse;
    justify-content: space-between;
}

.langyu-post-item:first-child {
    padding-top: 0;
}

.langyu-post-item:last-child {
    border-bottom: none;
}

/* Post Thumbnail (Left Side) */
.langyu-post-thumbnail {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 0;
    overflow: hidden;
}

.langyu-author-main .langyu-post-thumbnail {
    width: 160px;
    height: 106px;
    border-radius: 8px;
}

.langyu-post-thumbnail img,
.img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.img-placeholder {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

.langyu-post-item:hover .langyu-post-thumbnail img {
    transform: scale(1.05);
}

/* Post Content (Right Side) */
.langyu-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 180px; /* 最小与左侧图片高度一致 */
}

.langyu-author-main .langyu-post-content {
    min-height: auto;
    justify-content: center;
}

.langyu-post-top-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--langyu-muted);
}

.langyu-post-tags {
    display: flex;
    gap: 8px;
}

.post-tag {
    background-color: var(--langyu-soft-bg);
    color: var(--langyu-text);
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.post-tag:hover {
    background-color: var(--langyu-border);
    color: var(--langyu-primary);
}

.langyu-post-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
}

.langyu-post-title a {
    color: var(--langyu-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.langyu-post-title a:hover {
    color: var(--langyu-primary);
}

.langyu-post-excerpt {
    font-size: 15px;
    color: var(--langyu-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    /* 多行截断效果 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.langyu-post-item.has-thumbnail .langyu-post-excerpt {
    display: none;
}

@media (min-width: 992px) {
    .langyu-post-item.has-thumbnail .langyu-post-excerpt {
        display: -webkit-box;
    }
}

.langyu-author-main .langyu-post-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    margin-bottom: 12px;
}

.langyu-post-item.no-thumbnail {
    flex-direction: column;
    height: auto;
}

.langyu-post-content.no-thumb-content {
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.no-thumb-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
}

.no-thumb-author-avatar-link {
    display: inline-flex;
    align-items: flex-start;
    text-decoration: none;
}

.no-thumb-avatar-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 999px;
}

.no-thumb-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.langyu-post-item.no-thumbnail .langyu-post-title {
    font-size: 20px;
    line-height: 1.4;
    font-weight: 500;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.langyu-post-item.no-thumbnail .no-thumb-header + .langyu-post-excerpt {
    margin-left: 62px;
    width: calc(100% - 62px);
}

.langyu-post-meta.no-thumb-meta {
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--langyu-muted);
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.meta-separator {
    width: 2px;
    height: 2px;
    background-color: #ccc;
    border-radius: 50%;
}

.langyu-post-tags-bottom {
    display: flex;
    gap: 8px;
}

.post-tag-bottom {
    background-color: var(--langyu-soft-bg);
    color: var(--langyu-text);
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.post-tag-bottom:hover {
    background-color: var(--langyu-border);
    color: var(--langyu-primary);
}

/* Post Meta */
.langyu-post-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    font-size: 13px;
    color: var(--langyu-muted);
    margin-top: auto;
}

.langyu-post-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.langyu-post-comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.author-avatar-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.langyu-list-avatar-wrapper {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

.post-author-avatar {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50% !important;
    object-fit: cover;
}

.langyu-list-avatar-wrapper img,
.langyu-post-author img.avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50% !important;
}

.langyu-post-author .meta-value {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    white-space: nowrap;
    color: var(--langyu-text);
    text-decoration: none;
}

.langyu-post-author .meta-value:hover {
    color: var(--langyu-primary);
}

body.home,
body.blog {
    background-color: #ffffff;
}

html.is-dark-mode body.home,
html.is-dark-mode body.blog {
    background-color: #121316;
}

@media (min-width: 992px) {
    body.home .langyu-post-list,
    body.blog .langyu-post-list {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    body.home .langyu-post-item,
    body.blog .langyu-post-item {
        padding: 24px 0;
        gap: 26px;
        border-bottom: 1px solid #f0f0f3;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.home .langyu-post-item:first-child,
    body.blog .langyu-post-item:first-child {
        padding-top: 0;
    }

    html.is-dark-mode body.home .langyu-post-item,
    html.is-dark-mode body.blog .langyu-post-item {
        border-bottom-color: #2a2f39;
    }

    body.home .langyu-post-item.has-thumbnail,
    body.blog .langyu-post-item.has-thumbnail {
        align-items: center;
    }

    body.home .langyu-post-thumbnail,
    body.blog .langyu-post-thumbnail {
        width: 224px;
        height: 136px;
        border-radius: 12px;
    }

    body.home .langyu-post-content,
    body.blog .langyu-post-content {
        min-height: 136px;
        justify-content: space-between;
    }

    body.home .langyu-post-title,
    body.blog .langyu-post-title {
        margin: 0 0 10px 0;
        font-size: 22px;
        line-height: 1.32;
    }

    body.home .langyu-post-meta,
    body.blog .langyu-post-meta {
        margin-top: 0;
        gap: 14px;
        font-size: 13px;
    }

    body.home .langyu-post-author,
    body.blog .langyu-post-author {
        gap: 8px;
    }

    body.home .langyu-post-item.no-thumbnail,
    body.blog .langyu-post-item.no-thumbnail {
        padding: 16px 0 18px;
        min-height: 0;
        background: transparent;
    }

    body.home .langyu-post-content.no-thumb-content,
    body.blog .langyu-post-content.no-thumb-content {
        min-height: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    body.home .no-thumb-header,
    body.blog .no-thumb-header {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: flex-start;
        gap: 10px;
    }

    body.home .no-thumb-author-avatar-link,
    body.blog .no-thumb-author-avatar-link {
        display: inline-flex;
        align-items: flex-start;
        text-decoration: none;
    }

    body.home .no-thumb-avatar-wrapper,
    body.blog .no-thumb-avatar-wrapper {
        width: 36px;
        height: 36px;
        border-radius: 999px;
    }

    body.home .no-thumb-main,
    body.blog .no-thumb-main {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    body.home .langyu-post-meta.no-thumb-meta,
    body.blog .langyu-post-meta.no-thumb-meta {
        justify-content: flex-start;
        width: 100%;
        margin: 0;
        gap: 0;
    }

    body.home .langyu-post-item.no-thumbnail .meta-left,
    body.blog .langyu-post-item.no-thumbnail .meta-left {
        gap: 6px;
        font-size: 12px;
        color: #9b9fa8;
        flex-wrap: nowrap;
        align-items: center;
        line-height: 1.2;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-title,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-title {
        margin: 0;
        width: 100%;
        font-size: 17px;
        line-height: 1.32;
        font-weight: 500;
        letter-spacing: -0.02em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-title a,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-title a {
        color: #111111;
        text-decoration: none;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-excerpt,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-excerpt {
        display: -webkit-box;
        margin: 0;
        color: #666a73;
        font-size: 15px;
        line-height: 1.5;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-author .author-link,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-author .author-link {
        color: #6b6f78;
        font-weight: 500;
        text-decoration: none;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-time,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-time {
        color: #a0a4ad;
        font-weight: 500;
        white-space: nowrap;
        letter-spacing: 0.01em;
    }

    html.is-dark-mode body.home .langyu-post-item.no-thumbnail .langyu-post-title a,
    html.is-dark-mode body.blog .langyu-post-item.no-thumbnail .langyu-post-title a,
    html.is-dark-mode body.home .langyu-post-item.no-thumbnail .langyu-post-author .author-link,
    html.is-dark-mode body.blog .langyu-post-item.no-thumbnail .langyu-post-author .author-link {
        color: #f3f5f7;
    }

    html.is-dark-mode body.home .langyu-post-item.no-thumbnail .meta-left,
    html.is-dark-mode body.blog .langyu-post-item.no-thumbnail .meta-left,
    html.is-dark-mode body.home .langyu-post-item.no-thumbnail .langyu-post-time,
    html.is-dark-mode body.blog .langyu-post-item.no-thumbnail .langyu-post-time {
        color: #9aa3b2;
    }

    html.is-dark-mode body.home .langyu-post-item.no-thumbnail .langyu-post-excerpt,
    html.is-dark-mode body.blog .langyu-post-item.no-thumbnail .langyu-post-excerpt {
        color: #b6bcc6;
    }
}

.langyu-post-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.langyu-post-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar Widget */
.langyu-widget {
    background: var(--langyu-surface);
    padding: 20px;
    border-radius: 8px;
}

.langyu-widget.widget_langyu_home_author_badge {
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.langyu-widget.widget_langyu_home_author_badge .langyu-author-badge-container {
    margin-bottom: 24px;
    margin-top: 24px;
}

.widget-title {
    margin-top: 0;
    font-size: 16px;
    color: var(--langyu-text);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

/* ==========================================================================
   Single Post Styles (Article Detail)
   ========================================================================== */

.langyu-single-post {
    background: var(--langyu-surface);
    border-bottom: none;
    padding: 0;
}

.langyu-single-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--langyu-text);
    margin: 0 0 20px 0;
}

.langyu-single-meta {
    padding-bottom: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.langyu-single-meta .langyu-post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.langyu-single-meta .langyu-avatar-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.langyu-single-meta .post-author-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
}

.langyu-single-meta .langyu-post-stats {
    display: flex;
    align-items: center;
    color: var(--langyu-muted);
    font-size: 14px;
}

.langyu-mobile-cover-hero {
    display: none;
}

@media (max-width: 991px) {
    body.single .langyu-container {
        margin-top: 0;
    }

    .langyu-mobile-cover-hero {
        display: block;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .langyu-mobile-cover-media {
        position: relative;
        height: 360px;
        background: #101114;
        overflow: hidden;
    }

    .langyu-mobile-cover-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .langyu-mobile-cover-overlay {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 22px 16px 14px;
        color: #fff;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.38) 40%, rgba(0, 0, 0, 0.7) 100%);
    }

    .langyu-mobile-cover-title {
        margin: 0 0 12px 0;
        font-size: 22px;
        font-weight: 800;
        line-height: 1.25;
        letter-spacing: -0.02em;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
    }

    .langyu-mobile-cover-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.9);
    }

    .langyu-mobile-cover-author {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .langyu-mobile-cover-avatar {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        overflow: hidden;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .langyu-mobile-cover-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 999px !important;
        display: block;
    }

    .langyu-mobile-cover-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 200px;
        font-weight: 600;
    }

    .langyu-mobile-cover-time {
        white-space: nowrap;
        color: rgba(255, 255, 255, 0.82);
        font-weight: 500;
    }

    .langyu-single-has-cover .langyu-single-header {
        display: none;
    }

    .langyu-single-post {
        background: transparent;
    }

    .langyu-single-content {
        padding: 18px 16px 0;
        background: var(--langyu-surface);
    }
}

.langyu-single-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--langyu-text);
    letter-spacing: 0.3px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.langyu-single-content p {
    margin-bottom: 1.6em;
}

.langyu-single-content h2,
.langyu-single-content h3,
.langyu-single-content h4 {
    margin: 2em 0 1em;
    font-weight: 600;
    color: var(--langyu-text);
    line-height: 1.4;
}

.langyu-single-content h2 { 
    font-size: 24px; 
}
.langyu-single-content h3 { font-size: 20px; }

.langyu-single-content code {
    background: #f4f5f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #e83e8c;
    font-family: Consolas, Monaco, "Courier New", monospace;
}

.langyu-single-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1.6em;
    overflow: hidden;
}

.langyu-single-content pre code {
    background: transparent;
    padding: 16px;
    display: block;
    overflow-x: auto;
    color: inherit;
}

.langyu-single-content img,
.langyu-single-content video,
.langyu-single-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    margin: 20px 0;
}

/* 防止文章中表格/长链接导致移动端横向溢出 */
.langyu-single-content table {
    max-width: 100%;
}

.langyu-single-content figure.wp-block-table,
.langyu-single-content .wp-block-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.langyu-single-content a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 更强的移动端防溢出兜底（长 URL / 复制粘贴内容 / Gutenberg 对齐块） */
.langyu-single-content {
    overflow-x: hidden;
}

.langyu-single-content * {
    max-width: 100%;
}

.langyu-single-content figure,
.langyu-single-content .wp-block-image,
.langyu-single-content .wp-block-embed {
    max-width: 100%;
}

.langyu-single-content .alignwide,
.langyu-single-content .alignfull {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.langyu-single-content video,
.langyu-single-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

.langyupro-code-block {
    background: #282c34;
    color: #abb2bf;
    border-radius: 8px;
    margin: 1.5em 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.6;
    font-family: Consolas, Monaco, "Courier New", monospace;
}

.langyupro-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #21252b;
    padding: 8px 16px;
    user-select: none;
    -webkit-user-select: none;
}

.langyupro-code-mac-dots {
    display: flex;
    gap: 8px;
}

.langyupro-code-mac-dots .mac-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.langyupro-code-mac-dots .mac-dot.red { background: #ff5f56; }
.langyupro-code-mac-dots .mac-dot.yellow { background: #ffbd2e; }
.langyupro-code-mac-dots .mac-dot.green { background: #27c93f; }

.langyupro-code-copy {
    background: transparent;
    border: none;
    color: #abb2bf;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.langyupro-code-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.langyupro-code-block code {
    display: block;
    padding: 16px;
    overflow-x: auto;
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Post Card Styles */
.langyu-post-card-block {
    display: flex;
    align-items: center;
    background: #f7f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: 0 auto 18px;
    width: 50%;
    min-width: 320px;
    max-width: 100%;
    text-decoration: none !important;
    color: inherit;
    transition: background 0.2s ease;
    user-select: none;
    -webkit-user-drag: element;
    clear: both;
}

@media (max-width: 768px) {
    .langyu-post-card-block {
        width: 100%;
        min-width: 0;
    }
}

/* 全站兜底：避免因个别组件/嵌入导致页面横向滚动 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

html.is-dark-mode .langyu-post-card-block {
    background: #282c34;
}

.langyu-post-card-block:hover {
    background: #f0f2f5;
}

html.is-dark-mode .langyu-post-card-block:hover {
    background: #323842;
}

.langyu-post-card-cover {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: var(--langyu-soft-bg);
    margin-right: 14px;
}

.langyu-post-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    overflow: hidden;
}

.langyu-post-card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--langyu-text);
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.langyu-post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--langyu-muted);
}

.langyu-post-card-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 6px;
}

.langyu-post-card-dot {
    margin: 0 6px;
}

.langyu-single-content .langyu-post-card-block {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none !important;
}

.langyu-single-content .langyu-post-card-cover {
    margin: 0 14px 0 0;
}

.langyu-single-content .langyu-post-card-title {
    margin: 0 0 6px 0;
    color: var(--langyu-text);
}

.langyu-single-content .langyu-post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: var(--langyu-muted);
}

.langyu-single-content .langyu-post-card-avatar {
    width: 18px;
    height: 18px;
    max-width: none;
    margin: 0 6px 0 0;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.langyu-original-declaration {
    margin: 44px 0 44px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--langyu-muted);
    font-size: 16px;
    line-height: 1.65;
    text-align: center;
}

.langyu-original-declaration-editor {
    color: var(--langyu-muted);
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 16px;
}

.langyu-original-declaration-editor-link {
    color: var(--langyu-muted);
    text-decoration: none;
    font-weight: 500;
}

.langyu-original-declaration-editor-link:hover {
    color: var(--langyu-text);
}

.langyu-original-declaration-copyright {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    color: var(--langyu-muted);
    font-size: 16px;
    line-height: 1.7;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

.langyu-original-declaration-copyright-icon {
    flex: 0 0 auto;
    line-height: 1;
    margin-top: 2px;
    opacity: 0.9;
}

.langyu-original-declaration-copyright-text {
    text-align: left;
    font-size: 12px;
}

.langyu-single-content blockquote {
    position: relative;
    margin: 24px 0;
    padding: 24px 48px;
    background: var(--langyu-soft-bg);
    border-radius: 8px;
    color: var(--langyu-text);
    font-style: italic;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.langyu-single-content blockquote::before {
    content: '\201C';
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 48px;
    color: var(--langyu-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.langyu-single-content blockquote::after {
    content: '\201D';
    position: absolute;
    bottom: -16px;
    right: 16px;
    font-size: 48px;
    color: var(--langyu-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.langyu-single-content blockquote p {
    margin-bottom: 0;
    color: inherit;
    position: relative;
    z-index: 1;
}

.langyu-single-content blockquote span {
    font-style: inherit;
}

.langyu-single-content ul,
.langyu-single-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.langyu-single-content li {
    margin-bottom: 8px;
}

.langyu-single-footer {
    margin-top: 40px;
    padding-top: 20px;
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tags-links svg {
    margin-right: -2px; /* Pull it slightly closer if needed */
}

.tags-links a {
    display: inline-block;
    background: var(--langyu-soft-bg);
    color: var(--langyu-muted);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tags-links a:hover {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
}

/* Post Navigation (Prev/Next) */
.post-navigation {
    margin: 40px 0;
    padding: 24px;
    background: var(--langyu-soft-bg);
    border-radius: 8px;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation .nav-previous, 
.post-navigation .nav-next {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-subtitle {
    font-size: 13px;
    color: var(--langyu-muted);
    margin-bottom: 6px;
}

.post-navigation .nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--langyu-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-navigation a {
    text-decoration: none;
}

.post-navigation a:hover .nav-title {
    color: var(--langyu-primary);
}

/* ==========================================================================
   Comments Area Styles
   ========================================================================== */

.comments-navigation {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--langyu-border);
}

.comments-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.comments-navigation .nav-previous a,
.comments-navigation .nav-next a {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--langyu-soft-bg);
    color: var(--langyu-text);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.comments-navigation .nav-previous a:hover,
.comments-navigation .nav-next a:hover {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
}

.comments-area {
    margin-top: 50px;
    padding-top: 40px;
}

.comments-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--langyu-text);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 0;
}

.comment-list > .comment {
    border-bottom: 1px solid var(--langyu-border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.comment-list > .comment:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.langyu-comment-body {
    display: flex;
    gap: 12px;
    padding: 20px 0 0 0;
}

.langyu-comment-avatar .avatar-img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: block;
    object-fit: cover;
}

.comments-area img.avatar,
img.langyu-avatar {
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
}

.langyu-comment-content-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.langyu-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.langyu-comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.langyu-comment-author .author-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: var(--langyu-primary);
    text-decoration: none;
}

.langyu-comment-author .author-badge {
    font-size: 10px;
    background: #ff8a00;
    color: var(--langyu-button-text);
    padding: 2px 4px;
    border-radius: 2px;
    line-height: 1;
}

.langyu-comment-time {
    font-size: 12px;
    color: var(--langyu-muted);
}

.langyu-comment-text {
    font-size: 14px;
    color: var(--langyu-text);
    line-height: 1.6;
    word-break: break-word;
    margin-top: 2px;
}

.langyu-comment-text p {
    margin-top: 0;
    margin-bottom: 8px;
}

.langyu-comment-text p:last-child {
    margin-bottom: 0;
}

.langyu-comment-footer {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.langyu-comment-reply-to {
    margin: 0;
    color: var(--langyu-muted);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.langyu-comment-reply-to .reply-target-link {
    color: var(--langyu-primary);
    text-decoration: none;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--langyu-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.comment-reply-link:hover {
    color: var(--langyu-primary);
}

.comment-reply-link .reply-icon {
    display: flex;
    align-items: center;
}

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 52px;
}

.comment.depth-1 > .children {
    margin-top: 14px;
    padding: 6px 0 0 30px;
    background: transparent;
    background-color: transparent !important;
    border-radius: 0;
    position: relative;
}

.comment.depth-1 > .children::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 10px;
    left: 12px;
    width: 2px;
    background: #f2f2f2;
}

.comment.depth-1 > .children > .comment {
    border-bottom: none;
    position: relative;
}

.comment.depth-1 > .children > .comment:last-child {
    border-bottom: none;
}

.comment.depth-1 > .children > .comment > .langyu-comment-body {
    position: relative;
}

.comment.depth-1 > .children > .comment > .langyu-comment-body::after {
    content: "";
    position: absolute;
    left: 56px;
    right: 8px;
    bottom: 0;
    height: 1px;
    background: var(--langyu-border);
}

.comment.depth-1 > .children > .comment:last-child > .langyu-comment-body::after {
    display: none;
}

.comment.depth-2 > .langyu-comment-body {
    padding: 8px 0 10px;
}

.langyu-children-toggle {
    border: 1px solid var(--langyu-border);
    background: transparent;
    color: var(--langyu-muted);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    margin-left: 8px;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.langyu-children-toggle:hover {
    color: var(--langyu-text);
    border-color: var(--langyu-primary);
}

.comment.depth-1.is-children-collapsed > .children {
    display: none;
}

.langyu-view-all-replies-wrap {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.langyu-view-all-replies-btn {
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #f2f2f2;
    color: #222222;
    border-radius: 999px;
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
    line-height: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.langyu-view-all-replies-btn:hover {
    transform: translateY(-1px);
    background: #ededed;
}

.langyu-view-all-replies-btn:active {
    transform: translateY(0);
}

.langyu-view-all-replies-btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.langyu-children-skeleton {
    margin-top: 14px;
    margin-left: 30px;
    padding: 6px 0 10px;
}

.langyu-children-skeleton-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.langyu-children-skeleton-item:last-child {
    margin-bottom: 0;
}

.langyu-children-skeleton-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.07) 100%);
    background-size: 220% 100%;
    animation: langyuCommentSkeletonPulse 1.05s ease-in-out infinite;
}

.langyu-children-skeleton-line {
    width: 180px;
    max-width: 75%;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.07) 100%);
    background-size: 220% 100%;
    animation: langyuCommentSkeletonPulse 1.05s ease-in-out infinite;
}

.langyu-children-skeleton-item:nth-child(2) .langyu-children-skeleton-line {
    width: 140px;
}

@keyframes langyuCommentSkeletonPulse {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

.comment-reply-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--langyu-text);
    margin-bottom: 12px;
}

.comment-reply-title small a {
    color: var(--langyu-muted);
    font-size: 12px;
    text-decoration: none;
    margin-left: 8px;
}

.comment-reply-title small a:hover {
    color: #f5222d;
}

/* Comment Form Editor */
.langyu-comment-form {
    margin: 18px 0 32px;
}

.langyu-comment-editor-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.langyu-comment-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.langyu-comment-identity .langyu-comment-input {
    padding: 8px 12px;
    border: 1px solid var(--langyu-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--langyu-surface);
    color: var(--langyu-text);
    outline: none;
    width: 140px;
}

.langyu-comment-identity .langyu-comment-input:focus {
    border-color: var(--langyu-primary);
}

@media (max-width: 640px) {
    .langyu-comment-identity .langyu-comment-input {
        width: 100%;
    }
}

.langyu-comment-editor-shell {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    background: #f5f5f5;
    padding: 0 18px;
    box-sizing: border-box;
    min-height: 52px;
    max-height: 52px;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1), padding 0.28s ease, background-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.langyu-comment-editor-wrapper.is-expanded .langyu-comment-editor-shell,
.langyu-comment-editor-shell:focus-within {
    max-height: 220px;
    padding: 14px 18px 16px;
    background: #f7f7f7;
    box-shadow: none;
    transform: translateY(0);
}

.langyu-comment-editor-shell.is-login-only {
    max-height: none;
    padding: 14px 18px 16px;
}

.langyu-comment-textarea-wrap {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: flex-start;
}

.langyu-comment-textarea-wrap textarea {
    width: 100%;
    min-height: 52px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 16px;
    color: var(--langyu-text);
    resize: none;
    outline: none;
    transition: min-height 0.32s cubic-bezier(0.22, 1, 0.36, 1), height 0.24s ease, color 0.2s ease;
    line-height: 52px;
    box-sizing: border-box;
    overflow: hidden;
    text-align: left;
    vertical-align: middle;
}

.langyu-comment-editor-wrapper.is-expanded .langyu-comment-textarea-wrap textarea,
.langyu-comment-editor-shell:focus-within .langyu-comment-textarea-wrap textarea {
    min-height: 128px;
    line-height: 1.7;
}

.langyu-comment-textarea-wrap textarea::placeholder {
    color: #b4b4b4;
}

.langyu-comment-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.langyu-comment-editor-wrapper.is-expanded .langyu-comment-editor-footer,
.langyu-comment-editor-shell:focus-within .langyu-comment-editor-footer,
.langyu-comment-editor-shell.is-login-only .langyu-comment-editor-footer {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.langyu-comment-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.emoji-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #7d7d7d;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.emoji-btn:hover {
    color: #333;
}

.emoji-btn:active {
    transform: translateY(1px);
}

.emoji-picker-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: 272px;
    padding: 10px;
    border-radius: 14px;
    background: var(--langyu-soft-bg);
    border: 1px solid var(--langyu-border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    z-index: 20;
}

.emoji-picker-panel .emoji-item {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.16s ease, transform 0.16s ease;
}

.emoji-picker-panel .emoji-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.emoji-picker-panel .emoji-item:active {
    transform: scale(0.96);
}

.langyu-comment-tool-btn {
    border: none;
    background: transparent;
    color: #7d7d7d;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.langyu-comment-tool-btn.is-italic {
    font-style: italic;
    font-family: Georgia, "Times New Roman", serif;
}

.langyu-comment-tool-btn:hover {
    color: #333;
}

.langyu-comment-tool-btn:active {
    transform: translateY(1px);
}

.langyu-comment-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.langyu-comment-submit-btn {
    min-width: 72px;
    height: 38px;
    padding: 0 18px;
    background: #dfdfdf;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background-color 0.22s ease, color 0.22s ease, opacity 0.22s ease;
}

.langyu-comment-submit-btn:not(:disabled) {
    background: #111111;
}

.langyu-comment-submit-btn:hover:not(:disabled) {
    background: #000000;
}

.langyu-comment-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.langyu-comment-submit-btn:disabled,
.langyu-comment-submit-btn.disabled {
    opacity: 1;
    cursor: not-allowed;
}

.langyu-comment-actions #cancel-comment-reply-link {
    display: none;
    color: #282828;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}

.langyu-comment-form.is-expanded .langyu-comment-actions #cancel-comment-reply-link,
.langyu-comment-form.is-replying .langyu-comment-actions #cancel-comment-reply-link {
    display: inline-block;
}

.langyu-comment-actions #cancel-comment-reply-link:hover {
    color: #000;
}

.langyu-comment-login-wrap {
    min-height: 84px;
}

.langyu-comment-login-prompt {
    font-size: 14px;
    color: var(--langyu-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 84px;
}

.langyu-comment-login-prompt a {
    color: var(--langyu-primary);
    text-decoration: none;
    margin: 0 4px;
}

html.is-dark-mode .langyu-comment-editor-shell {
    background: #1b1d22;
}

html.is-dark-mode .langyu-comment-editor-wrapper.is-expanded .langyu-comment-editor-shell,
html.is-dark-mode .langyu-comment-editor-shell:focus-within {
    background: #1e2127;
    box-shadow: none;
}

html.is-dark-mode .langyu-comment-textarea-wrap textarea {
    color: #e8ebf0;
}

html.is-dark-mode .langyu-comment-textarea-wrap textarea::placeholder {
    color: #727888;
}

html.is-dark-mode .langyu-comment-tool-btn,
html.is-dark-mode .langyu-comment-actions #cancel-comment-reply-link {
    color: #b7bfcc;
}

html.is-dark-mode .emoji-btn {
    color: #b7bfcc;
}

html.is-dark-mode .emoji-btn:hover {
    color: #ffffff;
}

html.is-dark-mode .emoji-picker-panel .emoji-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

html.is-dark-mode .langyu-comment-tool-btn:hover,
html.is-dark-mode .langyu-comment-actions #cancel-comment-reply-link:hover {
    color: #ffffff;
}

html.is-dark-mode .langyu-comment-submit-btn:not(:disabled) {
    background: #f1f1f1;
    color: #111;
}

html.is-dark-mode .langyu-comment-submit-btn:disabled,
html.is-dark-mode .langyu-comment-submit-btn.disabled {
    background: #353942;
    color: #8a919f;
}

@media (max-width: 640px) {
    .langyu-comment-editor-shell {
        padding: 0 14px;
    }

    .langyu-comment-editor-wrapper.is-expanded .langyu-comment-editor-shell,
    .langyu-comment-editor-shell:focus-within {
        padding: 14px;
    }

    .langyu-comment-textarea-wrap textarea {
        font-size: 15px;
    }
}

.langyu-comment-form .form-submit {
    display: none;
}

.langyu-comment-form.is-logged-in .form-submit {
    display: none;
}

/* 博客展示版：允许游客评论，需展示 cookies 勾选框 */
.comment-notes {
    display: none;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--langyu-muted);
}

.comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 3px;
}

.comment-form-cookies-consent label {
    cursor: pointer;
    line-height: 1.5;
}

.langyu-comment-guest-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0 8px;
}

@media (max-width: 640px) {
    .langyu-comment-guest-fields {
        grid-template-columns: 1fr;
    }
}

.langyu-comment-guest-fields .langyu-comment-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--langyu-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--langyu-surface);
    color: var(--langyu-text);
    outline: none;
}

.langyu-comment-guest-fields .langyu-comment-input:focus {
    border-color: var(--langyu-primary);
}

.comment-form-author, .comment-form-email, .comment-form-url {
    margin-top: 16px;
}

.comment-form-author label, .comment-form-email label, .comment-form-url label {
    display: block;
    font-size: 13px;
    color: var(--langyu-muted);
    margin-bottom: 6px;
}

.comment-form-author input, .comment-form-email input, .comment-form-url input {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid var(--langyu-border);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-form-author input:focus, .comment-form-email input:focus, .comment-form-url input:focus {
    border-color: var(--langyu-primary);
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.comment-notes, 
.logged-in-as {
    color: var(--langyu-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--langyu-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s;
    background: var(--langyu-soft-bg);
    box-sizing: border-box;
}

.comment-form-comment textarea:focus {
    border-color: var(--langyu-primary);
    background: var(--langyu-surface);
}

.comment-form-author, 
.comment-form-email, 
.comment-form-url {
    margin-bottom: 20px;
}

.comment-form-author input, 
.comment-form-email input, 
.comment-form-url input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--langyu-border);
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.comment-form-author input:focus, 
.comment-form-email input:focus, 
.comment-form-url input:focus {
    border-color: var(--langyu-primary);
}

.form-submit {
    margin-top: 20px;
}

.form-submit .submit {
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.form-submit .submit:hover {
    background: var(--langyu-primary-hover);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--langyu-muted);
}

/* ==========================================================================
   Login Modal Styles (1:1 UI)
   ========================================================================== */

.langyu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
}

.langyu-modal-overlay.is-active {
    display: flex;
}

.langyu-modal-content {
    background: var(--langyu-surface);
    width: 400px;
    border-radius: 8px;
    padding: 40px 32px 24px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

#langyu-login-modal .langyu-modal-content {
    background: transparent;
    box-shadow: none;
    padding: 0;
    perspective: 1000px;
    width: min(360px, calc(100vw - 32px), calc((100vh - 32px) * 0.625));
    aspect-ratio: 5 / 8;
    height: auto;
    max-height: none;
    flex: 0 0 auto;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

#langyu-login-modal .flip-container.flipped .flip-card {
    transform: rotateY(180deg);
}

.langyu-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--langyu-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
    z-index: 10;
}

.langyu-modal-close:hover {
    color: var(--langyu-text);
}

.langyu-login-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#langyu-login-modal .langyu-login-panel {
    background: var(--langyu-surface);
    border-radius: 16px;
    padding: 48px 32px 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    height: 100%;
    min-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.switch-mode-icon {
    margin: 0 auto;
    background: var(--langyu-bg);
    border: 1px solid var(--langyu-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--langyu-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.switch-mode-icon:hover {
    background: var(--langyu-text);
    color: var(--langyu-surface);
    border-color: var(--langyu-text);
    transform: scale(1.05) rotate(10deg);
}

.switch-mode-icon svg {
    width: 20px;
    height: 20px;
}

#langyu-login-modal .langyu-login-panel.flip-front {
    transform: rotateY(0deg);
    position: relative;
    z-index: 2;
}

#langyu-login-modal .langyu-login-panel.flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    z-index: 1;
}

@media (max-height: 700px) {
    #langyu-login-modal .langyu-login-panel {
        padding: 40px 24px 24px;
    }
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--langyu-text);
    margin: 0 0 12px;
    text-align: center;
}

#panel-sms .login-title,
#panel-pwd .login-title {
    text-align: center;
}

.login-desc {
    font-size: 13px;
    color: var(--langyu-muted);
    margin: 0 0 24px;
    line-height: 1.5;
    text-align: center;
}

.login-desc a {
    color: var(--langyu-primary);
    text-decoration: none;
}

#langyu-login-modal a {
    text-decoration: none;
}

/* QR Code Mode */
.qrcode-wrapper {
    width: 200px;
    height: 200px;
    margin: 16px auto;
    border: 1px solid var(--langyu-border);
    padding: 8px;
    box-sizing: border-box;
}

.qrcode-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
}

.login-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--langyu-muted);
    margin: 8px 0 24px;
}

/* Divider */
.login-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
    color: #b2b2b2;
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #f0f0f0;
}

.login-divider::before { left: 0; }
.login-divider::after { right: 0; }

/* Buttons */
.login-btn-outline,
.login-btn-primary {
    width: 100%;
    height: 44px;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.login-btn-outline {
    background: var(--langyu-surface);
    border: 1px solid var(--langyu-border);
    color: var(--langyu-muted);
}

.login-btn-outline:hover {
    background: var(--langyu-soft-bg);
    border-color:  var(--langyu-border);
}

.login-btn-primary {
    background: var(--langyu-primary); /* InfoQ Blue */
    border: none;
    color: var(--langyu-button-text);
    font-weight: 500;
}

.login-btn-primary:hover {
    background: var(--langyu-primary-hover);
}

/* Forms */
.login-form {
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
}

.login-form .login-btn-primary {
    margin-top: 32px;
}

.form-group {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--langyu-border);
    padding: 12px 0;
    margin-bottom: 8px;
    position: relative;
}

.form-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--langyu-text);
    padding: 4px 0;
    background: transparent;
}

.form-group input::placeholder {
    color: #ccc;
}

.phone-group .area-code {
    font-size: 15px;
    color: var(--langyu-muted);
    margin-right: 16px;
    padding-right: 16px;
    border-right: 1px solid var(--langyu-border);
}

.code-group .get-code-btn {
    background: none;
    border: none;
    color: #4b8df8;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.form-options {
    text-align: right;
    margin: 8px 0 0;
}

.forgot-pwd {
    font-size: 13px;
    color: #b2b2b2;
    text-decoration: none;
}

/* Footer Links */
.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    font-size: 13px;
}

.other-methods {
    color: var(--langyu-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.other-methods span {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #ccc;
    border-radius: 50%;
    /* Mocking the icons with pure CSS circles for now */
}

.switch-method {
    color: var(--langyu-muted);
    text-decoration: none;
}

body.langyu-modal-open {
    overflow: hidden;
}

.site-footer {
    /* margin-top: 40px; */
    background: #2E3236;
    color: #c7ced6;
    font-size: 14px;
}

.site-footer a {
    color: #d5dde6;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--langyu-button-text);
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.site-footer-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.site-footer-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.site-footer-copyright {
    color: #dbe2ea;
}

.site-footer-icp {
    font-size: 13px;
    opacity: 0.85;
}

.site-footer-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer-right {
    display: flex;
    align-items: center;
}

.site-footer-social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-footer-social-item {
    position: relative;
    width: 36px;
    height: 36px;
}

.site-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #3A3E42;
    transition: all 0.2s ease;
}

.site-footer-social-link:hover {
    background: #4A4E52;
}

.site-footer-social-link svg {
    width: 20px;
    height: 20px;
    display: block;
}

.site-footer-social-qr {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    transform: translateX(-50%);
    padding: 12px;
    background: var(--langyu-surface);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 10;
}

/* 三角形箭头 */
.site-footer-social-qr::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
}

.site-footer-social-qr img {
    width: 140px;
    height: 140px;
    display: block;
    border-radius: 4px;
    margin-bottom: 8px;
}

.site-footer-social-qr .qr-text {
    font-size: 14px;
    color: var(--langyu-muted);
    text-align: center;
    font-weight: 500;
}

.site-footer-social-item:hover .site-footer-social-qr {
    display: block;
}

.langyu-widget-empty {
    margin: 0;
    color: var(--langyu-muted);
    font-size: 14px;
}

.login-wechat-text {
    color: #2ba245;
    font-weight: 700;
}

.langyu-login-panel[hidden] {
    display: none;
}

.icon-weibo {
    background: linear-gradient(135deg, #ff8a00, #ff5b5b) !important;
}

.icon-qq {
    background: linear-gradient(135deg, #90a4ae, #b0bec5) !important;
}

.langyu-mobile-search-panel[hidden],
.langyu-mobile-drawer[hidden] {
    display: none;
}

/* Recommend Posts Widget */
.langyu-recommend-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recommend-item {
    display: block;
}

.recommend-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: 10px;
    border-radius: 0;
    overflow: hidden;
    background: var(--langyu-soft-bg);
}

.recommend-rank {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

html.is-dark-mode .recommend-rank {
    background: #fff;
    color: #000;
}

.recommend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommend-thumb:hover img {
    transform: scale(1.05);
}

.recommend-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recommend-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--langyu-text);
    line-height: 1.55;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    transition: color 0.3s;
}

.recommend-title:hover {
    color: var(--langyu-primary);
}

.recommend-meta {
    font-size: 12px;
    color: var(--langyu-muted);
}

.langyu-recommend-list.is-small-thumb {
    gap: 12px;
}

.langyu-recommend-list.is-small-thumb .recommend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.langyu-recommend-list.is-small-thumb .recommend-thumb {
    width: 88px;
    min-width: 61px;
    height: 61px;
    margin-bottom: 0;
    border-radius: 2px;
    order: 0;
}

.langyu-recommend-list.is-small-thumb .recommend-rank {
    display: none;
}

.langyu-recommend-list.is-small-thumb .recommend-info {
    order: 1;
    flex: 1;
    min-width: 0;
}

.langyu-recommend-list.is-small-thumb .recommend-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.36;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.langyu-recommend-list.is-small-thumb .recommend-meta {
    font-size: 14px;
    color: #6f7581;
    letter-spacing: 0.02em;
}

.langyu-recommend-list.is-small-thumb .recommend-time {
    display: inline-block;
    color: #6f7581;
    font-weight: 500;
}

html.is-dark-mode .langyu-recommend-list.is-small-thumb .recommend-meta,
html.is-dark-mode .langyu-recommend-list.is-small-thumb .recommend-time {
    color: #9aa3b2;
}

.langyu-write-wrapper {
    width: 100%;
    height: calc(100vh - 60px); /* Adjust based on header height */
    background: var(--langyu-surface);
}

.langyu-write-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Related Posts */
.langyu-no-results-section {
    background: var(--langyu-surface);
    border-radius: 8px;
    padding: 60px 40px;
    margin-bottom: 20px;
}

.langyu-no-results-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.langyu-no-results-text {
    flex: 1;
    max-width: 400px;
}

.langyu-no-results-text .page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--langyu-text);
    margin: 0 0 16px;
    line-height: 1.3;
}

.langyu-no-results-text p {
    font-size: 16px;
    color: var(--langyu-muted);
    margin: 0;
    line-height: 1.6;
}

.langyu-no-results-img {
    width: 160px;
    height: auto;
    object-fit: contain;
}

.langyu-no-results-search-wrap {
    max-width: 600px;
    margin: 0 auto 40px;
}

.langyu-big-search-form {
    display: flex;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-radius: 28px;
    background: var(--langyu-surface);
    border: 2px solid var(--langyu-primary);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.langyu-big-search-form:hover,
.langyu-big-search-form:focus-within {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.langyu-big-search-input {
    flex: 1;
    height: 52px;
    padding: 0 24px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--langyu-text);
    outline: none;
}

.langyu-big-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

html.is-dark-mode .langyu-big-search-input {
    color: #fff;
}

.langyu-big-search-btn {
    height: 52px;
    padding: 0 36px;
    border: none;
    background: var(--langyu-primary);
    color: var(--langyu-button-text);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.langyu-big-search-btn:hover {
    background: var(--langyu-primary-hover);
}

.langyu-no-results-suggestions {
    max-width: 600px;
    margin: 0 auto;
}

.langyu-no-results-history,
.langyu-no-results-hot {
    flex: 1;
}

.suggestion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--langyu-border);
    padding-bottom: 8px;
}

.suggestion-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--langyu-text);
    margin: 0;
}

.suggestion-header .clear-history-btn {
    font-size: 13px;
    color: var(--langyu-muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.suggestion-header .clear-history-btn:hover {
    color: var(--langyu-primary);
}

.langyu-hot-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.langyu-hot-posts-list li {
    margin-bottom: 12px;
}

.langyu-hot-posts-list li a {
    color: var(--langyu-text);
    font-size: 14px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.langyu-hot-posts-list li a:hover {
    color: var(--langyu-primary);
}

/* Related Posts */
.langyu-related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--langyu-border);
}

.langyu-related-posts .related-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--langyu-text);
    margin: 0 0 20px;
    position: relative;
    padding-left: 12px;
}

.langyu-related-posts .related-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--langyu-primary);
    border-radius: 2px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.related-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.24s ease, opacity 0.24s ease;
    min-width: 0;
}

.related-item:hover {
    transform: translateY(-2px);
}

.related-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 2px;
    overflow: hidden;
    background: var(--langyu-soft-bg);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item:hover .related-thumb img {
    transform: scale(1.05);
}

.related-info {
    min-width: 0;
    padding-top: 10px;
}

.related-post-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--langyu-text);
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-item:hover .related-post-title {
    color: var(--langyu-primary);
}

@media (max-width: 991px) {
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .langyu-no-results-section {
        padding: 40px 20px;
    }

    .langyu-no-results-top {
        flex-direction: column-reverse;
        gap: 20px;
        text-align: center;
    }

    .langyu-no-results-img {
        width: 180px;
    }

    .langyu-no-results-suggestions {
        gap: 30px;
    }

    .langyu-big-search-input {
        padding: 0 16px;
        font-size: 14px;
    }

    .langyu-big-search-btn {
        padding: 0 20px;
        font-size: 16px;
    }
}

/* ==========================================================================
   Author Profile (Sspai Style)
   ========================================================================== */
.langyu-author-main.sspai-layout {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
    padding-top: 40px;
    padding-bottom: 40px;
}

.langyu-author-profile.sspai-style {
    background: transparent;
    box-shadow: none;
    border: none;
    margin-bottom: 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-cover-wrap {
    width: 100%;
    max-width: 720px;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: -60px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.author-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.author-cover-skin-trigger {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: #222226;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.author-cover-wrap:hover .author-cover-skin-trigger,
.author-cover-skin-trigger:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.author-cover-skin-trigger:hover {
    background: #ffffff;
}

.author-cover-wrap .author-cover {
    width: 100%;
    height: 100%;
    background-color: var(--langyu-soft-bg);
    background-size: cover;
    background-position: center;
}

#author-cover-crop-modal.is-active {
    display: flex;
}

.crop-modal-content {
    width: min(820px, calc(100vw - 32px));
    max-width: 820px;
    padding: 28px 28px 24px;
    border-radius: 18px;
}

.crop-container {
    height: min(460px, 60vh);
    background: var(--langyu-soft-bg);
    margin: 20px 0;
    overflow: hidden;
}

.crop-container img {
    display: block;
    max-width: 100%;
}

.crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.btn-secondary {
    background: var(--langyu-surface);
    color: var(--langyu-text);
    border: 1px solid var(--langyu-border);
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--langyu-soft-bg);
}

.sspai-style .author-header-content {
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    margin-bottom: 24px;
    max-width: 720px;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 2;
}

.sspai-style .author-avatar-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    position: relative;
    z-index: 2;
    overflow: hidden;
    background: #ffffff;
}

.sspai-style .author-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.sspai-style .author-actions-absolute {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sspai-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--langyu-soft-bg);
    color: var(--langyu-text);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.sspai-icon-btn:hover {
    background: var(--langyu-border);
}

.sspai-style .author-follow-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    height: 36px;
    border-radius: 18px;
    background: #056de8;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.sspai-style .author-follow-btn:hover {
    background: #045bbd;
}

.sspai-style .author-follow-btn.active {
    background: #edf4ff;
    color: #056de8;
}

.sspai-style .author-follow-btn.active:hover {
    background: #dfeeff;
}

.sspai-style .author-info-wrap {
    text-align: left;
    padding: 0 20px;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}

.sspai-style .author-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    flex-wrap: nowrap;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--langyu-text);
}

.sspai-style .author-bio {
    font-size: 15px;
    color: var(--langyu-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    max-width: 600px;
}

.sspai-style .author-follows-text {
    font-size: 14px;
    color: var(--langyu-muted);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.sspai-style .author-follows-text .stat-item {
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sspai-style .author-follows-text .stat-item:hover {
    color: var(--langyu-text);
}

.sspai-style .author-follows-text .count {
    font-weight: 600;
    color: var(--langyu-text);
}

.sspai-style .author-stats-cards {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.sspai-style .stat-card {
    background: transparent;
    border: 1px solid var(--langyu-border);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 140px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.sspai-style .stat-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.sspai-style .stat-bg-icon {
    position: absolute;
    right: -8px;
    bottom: -8px;
    color: var(--langyu-muted);
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
    transform: rotate(-10deg);
}

.sspai-style .stat-bg-icon svg {
    width: 64px;
    height: 64px;
    display: block;
}

.sspai-style .stat-card:hover {
    border-color: var(--langyu-muted);
}

.sspai-style .stat-card .stat-label {
    font-size: 12px;
    color: var(--langyu-muted);
}

.sspai-style .stat-card .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--langyu-text);
}

.author-nav-full-wrap {
    width: 100%;
    position: relative;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--langyu-border);
    display: flex;
    justify-content: center;
}

.sspai-style .author-nav.center-tabs {
    display: flex;
    border-top: none;
    border-bottom: none;
    justify-content: flex-start;
    gap: 48px;
    padding: 0 20px;
    margin-bottom: 0;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.sspai-style .author-nav.center-tabs .author-nav-item {
    padding: 16px 0;
    font-size: 15px;
    color: var(--langyu-muted);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.sspai-style .author-nav.center-tabs .author-nav-item:hover,
.sspai-style .author-nav.center-tabs .author-nav-item.active {
    color: var(--langyu-text);
    background: transparent;
}

.sspai-style .author-nav.center-tabs .author-nav-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--langyu-text);
    border-radius: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.sspai-style .author-nav.center-tabs .author-nav-item.active::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .author-cover-wrap {
        height: 160px;
        margin-bottom: -40px;
        border-radius: 0;
    }

    .author-cover-skin-trigger {
        display: none;
    }
    
    .langyu-author-main.sspai-layout {
        padding-top: 20px;
        padding-left: 0;
        padding-right: 0;
    }
    
    .sspai-style .author-actions-absolute {
        justify-content: flex-end;
    }
    
    .sspai-style .author-nav.center-tabs {
        gap: 24px;
    }
    
    .sspai-style .author-stats-cards {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        padding-bottom: 2px;
        scroll-snap-type: x mandatory;
    }

    .sspai-style .author-stats-cards::-webkit-scrollbar {
        display: none;
    }
    
    .sspai-style .stat-card {
        flex: 0 0 180px;
        min-width: 180px;
        padding: 12px 14px;
        scroll-snap-align: start;
        border-radius: 0;
    }

    .crop-modal-content {
        padding: 20px;
    }

    .crop-container {
        height: 42vh;
    }
    
    .sspai-style .stat-card .stat-value {
        font-size: 16px;
    }
}

/* ==========================================================================
   Modal Styles (Follows)
   ========================================================================== */
.langyu-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.langyu-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.langyu-modal-content {
    position: relative;
    background: var(--langyu-surface);
    width: 100%;
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.96) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.langyu-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px 0;
    border-bottom: 1px solid var(--langyu-border);
}

.follows-tabs {
    display: flex;
    gap: 32px;
}

.follows-tab {
    background: none;
    border: none;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--langyu-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.follows-tab:hover {
    color: var(--langyu-text);
}

.follows-tab.active {
    color: var(--langyu-text);
}

.follows-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--langyu-primary);
    border-radius: 3px 3px 0 0;
}

.btn-close-modal {
    background: var(--langyu-soft-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--langyu-muted);
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.btn-close-modal:hover {
    background: var(--langyu-soft-bg);
    color: var(--langyu-text);
}

.langyu-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    min-height: 200px;
}

.follows-loading {
    padding: 12px 20px;
}

/* Skeleton Loading */
.skeleton-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 6px;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--langyu-soft-bg);
    margin-right: 12px;
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-info {
    flex: 1;
    min-width: 0;
}

.skeleton-name {
    width: 40%;
    height: 15px;
    background: var(--langyu-soft-bg);
    border-radius: 4px;
    margin-bottom: 6px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-desc {
    width: 70%;
    height: 12px;
    background: var(--langyu-soft-bg);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-btn {
    width: 72px;
    height: 28px;
    background: var(--langyu-soft-bg);
    border-radius: 16px;
    margin-left: 16px;
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* Post List Skeleton */
.langyu-post-list-skeleton {
    display: flex;
    flex-direction: column;
}

.skeleton-post {
    display: flex;
    align-items: flex-start;
    padding: 24px 0;
    border-bottom: 1px solid var(--langyu-border);
    gap: 24px;
}

.skeleton-thumbnail {
    width: 280px;
    height: 180px;
    background: var(--langyu-soft-bg);
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-post .langyu-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.skeleton-post .skeleton-title {
    width: 70%;
    height: 24px;
    background: var(--langyu-soft-bg);
    margin-bottom: 16px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-post .skeleton-excerpt {
    width: 100%;
    height: 16px;
    background: var(--langyu-soft-bg);
    margin-bottom: 10px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-meta-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.skeleton-meta-bottom .skeleton-author {
    width: 100px;
    height: 20px;
    background: var(--langyu-soft-bg);
    border-radius: 10px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-meta-bottom .skeleton-time {
    width: 60px;
    height: 20px;
    background: var(--langyu-soft-bg);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.follow-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    transition: background 0.3s;
    border-bottom: 1px solid #f9f9f9;
}

.follow-user-item:last-child {
    border-bottom: none;
}

.follow-user-item:hover {
    background: var(--langyu-soft-bg);
}

.follow-user-main {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.follow-user-avatar,
.follow-user-main .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--langyu-border);
}

.follow-user-info {
    flex: 1;
    min-width: 0;
}

.follow-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--langyu-text);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-user-desc {
    font-size: 12px;
    color: var(--langyu-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.follow-user-action {
    margin-left: 16px;
    flex-shrink: 0;
}

.follow-user-btn {
    min-width: 72px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    border-radius: 16px;
    transition: all 0.3s;
}

.follow-user-btn.active {
    background: var(--langyu-soft-bg);
    border-color:  var(--langyu-border);
    color: #3c4043;
}

@media (max-width: 991px) {
    .langyu-header {
        height: auto;
        min-height: 68px;
        position: sticky;
        top: 0;
        z-index: 90;
        transition: transform 0.3s ease, opacity 0.24s ease, box-shadow 0.28s ease;
    }

    .langyu-header.is-scroll-hidden:not(.is-mobile-menu-open) {
        transform: translateY(-100%);
        opacity: 0;
    }

    .langyu-header-inner {
        max-width: none;
        margin: 0;
        padding: 12px 16px;
        gap: 12px;
    }

    .langyu-logo {
        margin-right: 0;
        font-size: 22px;
    }

    .langyu-logo img {
        max-height: 30px;
    }

    .langyu-header:not(.is-editor-header) .langyu-brand {
        flex: 1;
        min-width: 0;
        gap: 10px;
    }

    .langyu-nav,
    .langyu-right {
        display: none;
    }

    .langyu-header:not(.is-editor-header) .langyu-right {
        display: flex;
        margin-left: auto;
        gap: 12px;
        flex-shrink: 0;
        align-items: center;
    }

    .langyu-header:not(.is-editor-header) .langyu-header-icons {
        display: flex;
        margin-right: 0;
        gap: 12px;
        align-items: center;
    }

    .langyu-header:not(.is-editor-header) .langyu-search-toggle-btn,
    .langyu-header:not(.is-editor-header) .langyu-publish-btn {
        display: none;
    }

    .langyu-header:not(.is-editor-header) .langyu-mobile-menu-toggle {
        display: inline-flex;
    }

    .langyu-header:not(.is-editor-header) .langyu-mobile-menu-toggle,
    .langyu-header:not(.is-editor-header) .langyu-header-icon-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }

    .langyu-header:not(.is-editor-header) .langyu-user-menu-wrapper,
    .langyu-header:not(.is-editor-header) .langyu-login {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .langyu-header:not(.is-editor-header) .langyu-user-avatar-link {
        display: flex;
        align-items: center;
    }

    .langyu-header:not(.is-editor-header) .langyu-user-avatar-link .avatar {
        width: 34px;
        height: 34px;
    }

    .langyu-header.is-author-archive-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: transparent;
        box-shadow: none !important;
        min-height: 56px;
        z-index: 120;
    }

    .langyu-header.is-author-archive-header .langyu-header-inner {
        padding: 10px 16px;
        justify-content: center;
        min-height: 56px;
    }

    .langyu-header.is-author-archive-header .langyu-brand,
    .langyu-header.is-author-archive-header .langyu-nav,
    .langyu-header.is-author-archive-header .langyu-right {
        display: none !important;
    }

    .langyu-author-mobile-nav {
        display: none;
    }

    .langyu-header.is-author-archive-header .langyu-author-mobile-nav {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }

    .langyu-author-mobile-nav-btn {
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 999px;
        background: rgba(12, 14, 18, 0.38);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        cursor: pointer;
    }

    .langyu-author-mobile-nav-btn:active {
        opacity: 0.9;
    }

    body.author .langyu-author-main.sspai-layout {
        padding-top: 0;
    }


    .langyu-header:not(.is-editor-header) .langyu-user-dropdown-menu {
        top: calc(100% + 12px);
        right: -4px;
    }

    .langyu-header:not(.is-editor-header) .langyu-notification-popover {
        top: calc(100% + 12px);
        right: -4px;
        width: min(92vw, 320px);
    }

    .langyu-header.is-editor-header .langyu-right {
        display: flex;
        margin-left: auto;
        gap: 8px;
    }

    .langyu-header.is-editor-header .langyu-editor-header-meta {
        display: none;
    }

    .langyu-header.is-editor-header .langyu-editor-action {
        height: 34px;
        padding: 0 14px;
        font-size: 13px;
    }

    .langyu-header.is-editor-header .langyu-user-menu-wrapper,
    .langyu-header.is-editor-header .langyu-login {
        display: none;
    }

    .langyu-mobile-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
        margin-left: auto;
        order: 2;
    }

    .langyu-mobile-search-panel {
        display: block;
        padding: 0 16px 14px;
        border-top: 1px solid #f2f2f2;
        background: var(--langyu-surface);
        position: relative;
    }

    .langyu-mobile-search-form {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-search-input-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-search-input-wrap input {
        flex: 1;
        height: 40px;
        border: 1px solid var(--langyu-border);
        border-radius: 999px;
        padding: 0 14px;
        font-size: 14px;
        outline: none;
        background: var(--langyu-soft-bg);
        color: var(--langyu-text);
    }

    html.is-dark-mode .mobile-search-input-wrap input {
        color: #fff;
    }

    .mobile-search-input-wrap button {
        height: 40px;
        padding: 0 16px;
        border: none;
        border-radius: 999px;
        background: var(--langyu-primary);
        color: var(--langyu-button-text);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .langyu-mobile-search-history {
        padding-top: 10px;
        border-top: 1px solid var(--langyu-border);
    }

    .langyu-mobile-menu-panel {
        display: block;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        height: calc(100vh - 68px);
        padding: 0 24px;
        background: #ffffff;
        border-top: 1px solid #eeeeee;
        opacity: 0;
        transform: translateY(-12px);
        overflow-y: auto;
        overscroll-behavior: contain;
        pointer-events: none;
        box-sizing: border-box;
        transition: opacity 0.2s ease, transform 0.2s ease, padding-top 0.2s ease, padding-bottom 0.2s ease;
    }

    .langyu-mobile-menu-panel.is-active {
        padding-top: 12px;
        padding-bottom: 18px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .langyu-mobile-menu-search-form {
        margin-bottom: 8px;
    }

    .langyu-mobile-menu-search-field {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 4px 14px;
        border-bottom: 1px solid #eeeeee;
        color: #b5b5b5;
    }

    .langyu-mobile-menu-search-icon {
        flex-shrink: 0;
    }

    .langyu-mobile-menu-search-field input {
        flex: 1;
        border: none;
        background: transparent;
        padding: 0;
        font-size: 16px;
        line-height: 1.4;
        color: var(--langyu-text);
        outline: none;
    }

    .langyu-mobile-menu-search-field input::placeholder {
        color: #b9b9b5;
    }

    .langyu-mobile-menu-search-form .langyu-mobile-search-history {
        padding-top: 12px;
    }

    .langyu-mobile-menu-nav .langyu-nav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow: visible;
        flex-wrap: nowrap;
    }

    .langyu-mobile-menu-nav .langyu-nav-list li {
        width: 100%;
        border-bottom: none;
    }

    .langyu-mobile-menu-nav .langyu-nav-list li.current-menu-item a,
    .langyu-mobile-menu-nav .langyu-nav-list li.current_page_item a {
        font-weight: 700;
    }

    .langyu-mobile-menu-nav .langyu-nav-list li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 18px 4px;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.45;
        color: #101010;
    }

    .langyu-mobile-menu-nav .langyu-nav-list li a::after {
        content: '\203A';
        color: #b5b5b0;
        font-size: 28px;
        font-weight: 400;
        line-height: 1;
        margin-left: 20px;
    }

    html.is-dark-mode .langyu-mobile-menu-panel {
        background: #202022;
        border-top-color: #262930;
    }

    html.is-dark-mode .langyu-mobile-menu-search-field {
        border-bottom-color: #262930;
        color: #6f7682;
    }

    html.is-dark-mode .langyu-mobile-menu-search-field input {
        color: #eef1f5;
    }

    html.is-dark-mode .langyu-mobile-menu-search-field input::placeholder {
        color: #606875;
    }

    html.is-dark-mode .langyu-mobile-menu-nav .langyu-nav-list li a {
        color: #eef1f5;
    }

    html.is-dark-mode .langyu-mobile-menu-nav .langyu-nav-list li a::after {
        color: #67707d;
    }

    .langyu-container {
        margin: 24px auto;
        padding: 0 16px;
        display: block;
    }

    .langyu-sidebar {
        display: none;
    }

    .langyu-post-item {
        gap: 16px;
        align-items: stretch;
    }

    .langyu-post-thumbnail {
        width: 120px;
        height: 88px;
    }

    .langyu-post-title {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .langyu-post-meta {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .langyu-post-content {
        min-height: 88px;
        display: flex;
        flex-direction: column;
    }

    .langyu-post-item.has-thumbnail:not(.langyu-post-featured) .langyu-post-title a {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .langyu-post-top-meta {
        display: none;
    }

    .langyu-post-excerpt {
        display: none;
    }

    .langyu-post-tags,
    .langyu-post-tags-bottom {
        display: none;
    }

    .langyu-post-stats,
    .langyu-post-views {
        display: none;
    }

    .langyu-post-meta {
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        font-size: 13px;
    }

    .langyu-post-author {
        min-width: 0;
        flex: 0 1 auto;
    }

    .langyu-post-author .author-link {
        display: inline-flex;
        align-items: center;
        gap: 0.35em;
        min-width: 0;
        white-space: nowrap;
        font-weight: 400;
    }

    .langyu-post-meta-time {
        color: var(--langyu-muted);
        font-size: 13px;
        line-height: 1;
        white-space: nowrap;
    }

    body.home .langyu-post-item.no-thumbnail,
    body.blog .langyu-post-item.no-thumbnail {
        padding: 16px 0 18px;
        gap: 0;
        align-items: stretch;
        background: transparent;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-content.no-thumb-content,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-content.no-thumb-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        min-height: 0;
        height: auto;
    }

    body.home .langyu-post-item.no-thumbnail .no-thumb-header,
    body.blog .langyu-post-item.no-thumbnail .no-thumb-header {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
    }

    body.home .langyu-post-item.no-thumbnail .no-thumb-author-avatar-link,
    body.blog .langyu-post-item.no-thumbnail .no-thumb-author-avatar-link {
        display: inline-flex;
        align-items: flex-start;
        text-decoration: none;
    }

    body.home .langyu-post-item.no-thumbnail .no-thumb-avatar-wrapper,
    body.blog .langyu-post-item.no-thumbnail .no-thumb-avatar-wrapper {
        width: 36px;
        height: 36px;
        border-radius: 999px;
    }

    body.home .langyu-post-item.no-thumbnail .no-thumb-main,
    body.blog .langyu-post-item.no-thumbnail .no-thumb-main {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-meta.no-thumb-meta,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-meta.no-thumb-meta {
        width: 100%;
        margin: 0;
        justify-content: flex-start;
        gap: 0;
    }

    body.home .langyu-post-item.no-thumbnail .meta-left,
    body.blog .langyu-post-item.no-thumbnail .meta-left {
        gap: 6px;
        font-size: 12px;
        line-height: 1.2;
        color: #9b9fa8;
        align-items: center;
        flex-wrap: nowrap;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-author .author-link,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-author .author-link {
        color: #6b6f78;
        font-weight: 500;
        text-decoration: none;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-time,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-time {
        color: #a0a4ad;
        font-weight: 500;
        white-space: nowrap;
        letter-spacing: 0.01em;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-title,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-title {
        margin: 0;
        width: 100%;
        font-size: 17px;
        line-height: 1.32;
        font-weight: 500;
        letter-spacing: -0.02em;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-title a,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-title a {
        display: -webkit-box;
        color: #111111;
        text-decoration: none;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    body.home .langyu-post-item.no-thumbnail .langyu-post-excerpt,
    body.blog .langyu-post-item.no-thumbnail .langyu-post-excerpt {
        display: -webkit-box;
        margin: 0;
        color: #666a73;
        font-size: 15px;
        line-height: 1.5;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    body.home .langyu-post-item.no-thumbnail .no-thumb-header + .langyu-post-excerpt,
    body.blog .langyu-post-item.no-thumbnail .no-thumb-header + .langyu-post-excerpt {
        margin-left: 46px;
        width: calc(100% - 46px);
    }

html.is-dark-mode .langyu-post-item.no-thumbnail .langyu-post-title a,
html.is-dark-mode .langyu-post-item.no-thumbnail .langyu-post-author .author-link {
    color: #f3f5f7;
}

html.is-dark-mode .langyu-post-item.no-thumbnail .meta-left,
html.is-dark-mode .langyu-post-item.no-thumbnail .langyu-post-time {
    color: #9aa3b2;
}

html.is-dark-mode .langyu-post-item.no-thumbnail .langyu-post-excerpt {
    color: #b6bcc6;
}

    .post-navigation .nav-links {
        flex-direction: column;
    }

    .site-footer-inner {
        padding: 22px 16px;
        flex-direction: column;
        gap: 18px;
        align-items: center;
        text-align: center;
    }

    .site-footer-right {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .site-footer-left {
        width: 100%;
        align-items: center;
    }

    .site-footer-nav-list {
        justify-content: center;
    }

    .site-footer-meta {
        justify-content: center;
    }

    .site-footer-social {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: clamp(10px, 3.6vw, 16px);
    }

    .site-footer-social-item {
        width: auto;
        height: auto;
    }

    .site-footer-social-link {
        width: 28px;
        height: 28px;
        background: transparent;
        border-radius: 0;
    }

    .site-footer-social-link:hover {
        background: transparent;
    }

    .site-footer-social-link svg {
        width: 24px;
        height: 24px;
    }

    .site-footer-social-qr {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 640px) {
    .skeleton-post {
        flex-direction: column-reverse;
    }
    .skeleton-thumbnail {
        width: 100%;
        height: 190px;
    }
    .skeleton-post .langyu-post-content {
        width: 100%;
        height: auto;
        min-height: auto;
    }

    .langyu-header-inner {
        padding: 12px 14px;
    }

    .langyu-logo {
        font-size: 20px;
    }

    .langyu-mobile-menu-panel {
        padding-left: 20px;
        padding-right: 20px;
    }

    .langyu-post-item {
        flex-direction: row;
        align-items: stretch;
    }

    .langyu-post-thumbnail {
        width: 120px;
        height: 80px;
    }

    .langyu-post-meta {
        flex-direction: row;
        align-items: center;
    }

    .langyu-post-content {
        min-height: 80px;
    }

    .langyu-post-item.langyu-post-featured {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-radius: 0;
        overflow: hidden;
        border-bottom: none;
        background: var(--featured-card-bg, #8a7c6b);
        padding: 0;
        margin-bottom: 16px;
    }

    .langyu-post-item.langyu-post-featured + .langyu-post-item {
        padding-top: 16px;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-thumbnail {
        width: 100%;
        height: 220px;
        border-radius: 0;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-thumbnail a {
        display: block;
        width: 100%;
        height: 100%;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-content {
        padding: 18px 18px 16px;
        width: 100%;
        box-sizing: border-box;
        border-radius: 0;
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        background: transparent;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-title {
        margin: 0 0 10px 0;
        font-size: 20px;
        line-height: 1.35;
        font-weight: 800;
        width: 100%;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-title a {
        color: var(--featured-card-fg, #ffffff);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-excerpt {
        display: -webkit-box;
        margin: 0 0 14px 0;
        width: 100%;
        color: var(--featured-card-muted, rgba(255, 255, 255, 0.84));
        font-size: 14px;
        line-height: 1.55;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-meta {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-direction: row;
        gap: 10px;
        width: 100%;
        flex-wrap: nowrap;
        color: var(--featured-card-meta, rgba(255, 255, 255, 0.82));
        font-size: 13px;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-author {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        min-width: 0;
        flex: 0 1 auto;
        white-space: nowrap;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-author .meta-value {
        color: var(--featured-card-fg, rgba(255, 255, 255, 0.9));
        font-weight: 400;
        line-height: 1;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-meta-time {
        color: var(--featured-card-meta, rgba(255, 255, 255, 0.72));
        line-height: 1;
        white-space: nowrap;
    }

    .langyu-post-item.langyu-post-featured .langyu-post-top-meta,
    .langyu-post-item.langyu-post-featured .langyu-post-stats,
    .langyu-post-item.langyu-post-featured .langyu-post-views {
        display: none;
    }

    .langyu-post-item.langyu-post-featured .langyu-list-avatar-wrapper {
        width: 22px;
        height: 22px;
    }

    .langyu-post-item.langyu-post-featured .author-avatar-link,
    .langyu-post-item.langyu-post-featured .author-link {
        display: inline-flex;
        align-items: center;
    }

    .langyu-single-title {
        font-size: 26px;
    }

    .langyu-single-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .langyu-mobile-drawer-panel {
        width: 100%;
        max-width: none;
    }

    .site-footer-social {
        gap: clamp(10px, 4.2vw, 14px);
    }

    .site-footer-social-qr {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   Floating Action Buttons (暗黑模式 / 回到顶部)
   ========================================================================== */

.langyu-floating-buttons {
    position: fixed;
    right: 24px;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 900;
}

.langyu-floating-buttons .langyu-floating-btn {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 1px solid var(--langyu-border);
    background: var(--langyu-surface);
    color: var(--langyu-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 0;
}

.langyu-floating-buttons .langyu-floating-btn:hover {
    background: var(--langyu-soft-bg);
    border-color: var(--langyu-primary);
    color: var(--langyu-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.langyu-floating-btn-icon {
    pointer-events: none;
}

.langyu-back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.2s, border-color 0.2s, color 0.2s;
}

.langyu-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

html.is-dark-mode .langyu-floating-btn-icon-bulb circle,
html.is-dark-mode .langyu-floating-btn-icon-bulb path {
    fill: #ffd700;
    stroke: #ffd700;
}

@media (max-width: 768px) {
    .langyu-floating-buttons {
        right: 16px;
        bottom: 100px;
    }

    .langyu-floating-buttons .langyu-floating-btn {
        width: 40px;
        height: 40px;
    }
}
