/* 首页：三栏布局、轮播、发帖卡片 */
.homepage-frame {
    width: min(var(--max-width), calc(100% - 24px));
    margin: 0 auto;
}

.homepage-stage {
    padding: 18px 0 56px;
}

.homepage-stage-no-hero {
    padding-top: 16px;
}

.homepage-columns {
    display: grid;
    grid-template-columns: 216px minmax(0, 1fr) 292px;
    gap: 16px;
    align-items: start;
}

.homepage-sidebar-left,
.homepage-sidebar-right,
.homepage-main {
    min-width: 0;
}

.home-feature-item{text-decoration:none}
.home-king-showcase{position:relative;display:grid;grid-template-columns:210px minmax(0,1fr);align-items:center;gap:22px;min-height:144px;margin:16px 0;padding:22px 24px;overflow:hidden;color:#fff;background:radial-gradient(circle at 88% 0,#774dd2 0,#38236f 48%,#211646 100%);border-radius:22px;text-decoration:none;box-shadow:0 14px 32px rgba(57,37,113,.18)}.home-king-showcase::after{content:"";position:absolute;width:180px;height:180px;right:-60px;top:-95px;border:1px solid rgba(255,255,255,.12);border-radius:50%}.home-king-fixed{position:relative;z-index:1;padding-right:20px;border-right:1px solid rgba(255,255,255,.15)}.home-king-fixed>div{display:flex;align-items:center;gap:8px}.home-king-fixed strong{font-size:17px}.home-king-fixed em{padding:3px 7px;color:#d9d0f4;background:rgba(255,255,255,.1);border-radius:8px;font-size:10px;font-style:normal}.home-king-fixed>span,.home-king-fixed>small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.home-king-fixed>span{margin-top:7px;color:#cfc5eb;font-size:12px}.home-king-fixed>small{margin-top:7px;color:#f4d069;font-size:11px}.home-king-slides{position:relative;z-index:1;min-width:0;height:88px;overflow:hidden}.home-king-track{will-change:transform;transition:transform .6s cubic-bezier(.22,.61,.36,1)}.home-king-slide{display:flex;height:88px;min-height:88px;flex-direction:column;justify-content:center;overflow:hidden;pointer-events:none}.home-king-slide>b{font-size:17px;line-height:1.45}.home-king-slide>p{overflow:hidden;margin:5px 0 3px;color:#d3ccea;font-size:12px;line-height:1.65;white-space:nowrap;text-overflow:ellipsis}.home-king-slide>small{color:#f5c768;font-size:11px;line-height:1.5}.home-king-player{display:grid;grid-template-columns:42px 52px minmax(0,1fr) auto;align-items:center;gap:12px}.home-king-player>img{width:52px;height:52px;border:3px solid rgba(255,255,255,.18);border-radius:50%;object-fit:cover}.home-king-player>div b,.home-king-player>div span{display:block}.home-king-player>div span{margin-top:5px;color:#c9c0e4;font-size:12px}.home-king-player>strong{color:#ffd264;font-size:24px}.home-king-player>strong small{font-size:12px}.home-king-medal{display:grid;width:34px;height:34px;place-items:center;background:#e7a91f;border-radius:50%;font-style:normal;font-weight:800}.home-king-medal.rank-2{background:#8695a8}.home-king-medal.rank-3{background:#bd7440}.home-king-empty p{white-space:normal}
@media(max-width:720px){.home-king-showcase{grid-template-columns:1fr;gap:12px}.home-king-fixed{padding:0 0 11px;border-right:0;border-bottom:1px solid rgba(255,255,255,.14)}.home-king-slides{min-width:0}}

.homepage-sidebar-left,
.homepage-sidebar-right {
    display: grid;
    gap: 16px;
}

.home-hero {
    margin-bottom: 16px;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: var(--shadow-lg);
}

.hero-carousel-track {
    position: relative;
    min-height: 332px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    background-image: var(--hero-slide-bg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.14) 0%, rgba(15, 23, 42, 0.58) 100%);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide-title {
    position: relative;
    z-index: 1;
    max-width: 560px;
    color: #fff;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.35;
}

.hero-dots {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dot.active {
    width: 28px;
    background: #fff;
}

.side-panel {
    padding: 12px;
    border-radius: 12px;
    border-color: #e8ecf3;
    box-shadow: none;
}

.category-nav-panel .panel-title {
    display: none;
}

.category-stack {
    display: grid;
    gap: 8px;
}

.category-stack-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fafbfc;
    border: 1px solid #edf0f5;
    transition: all var(--transition);
}

.category-stack-item strong {
    font-size: 14px;
}

.category-stack-item em {
    display: none;
}

.category-stack-item:hover,
.category-stack-item.active {
    border-color: #dce9ff;
    background: #fff;
    box-shadow: none;
}

.category-stack-item.active strong,
.category-stack-item.active em {
    color: #1677ff;
}

.home-composer-card {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e8ecf3;
    background: #fff;
    box-shadow: none;
}

.home-composer-form {
    display: grid;
    gap: 16px;
}

.home-composer-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-composer-head img,
.active-user-row img,
.topic-meta img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.home-composer-head strong {
    display: block;
    font-size: 16px;
}

.home-composer-head span,
.topic-meta span,
.site-info-copy p,
.active-user-row strong + span {
    color: var(--muted);
}

.home-composer-editor {
    display: grid;
    gap: 12px;
}

.home-composer-title,
.home-composer-content {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.home-composer-title {
    min-height: 46px;
    padding: 0 14px;
    font-size: 14px;
}

.home-composer-content {
    min-height: 120px;
    padding: 12px 14px;
    font-size: 14px;
}

.home-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.home-composer-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.home-composer-count {
    color: var(--muted);
    font-size: 12px;
}

.home-composer-submit,
.home-composer-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(22, 119, 255, 0.2);
}

.home-composer-category-panel,
.home-composer-topic-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.home-composer-category-search input,
.home-composer-topic-panel input[type="search"] {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.home-composer-category-list,
.home-composer-topic-list {
    display: grid;
    gap: 10px;
    max-height: 280px;
    overflow: auto;
}

.home-composer-category-option,
.home-composer-topic-option {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
}

.home-composer-category-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-composer-topic-option {
    display: grid;
    gap: 8px;
}

.home-composer-category-option em,
.home-composer-topic-option p,
.home-composer-topic-meta span,
.home-composer-topic-meta em {
    color: var(--muted);
}

.home-composer-topic-option p {
    margin: 0;
    font-size: 13px;
}

.home-composer-topic-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.home-composer-topic-meta img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.home-composer-category-option.active,
.home-composer-category-option:hover,
.home-composer-topic-option.active,
.home-composer-topic-option:hover {
    border-color: rgba(22, 119, 255, 0.22);
    background: rgba(22, 119, 255, 0.04);
}

.home-composer-guest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.home-composer-guest strong {
    display: block;
    font-size: 18px;
}

.home-composer-guest p {
    margin: 8px 0 0;
    color: var(--muted);
}

.homepage-feed-panel {
    padding: 16px;
    border-radius: 12px;
    border-color: #e8ecf3;
    box-shadow: none;
}

.homepage-toolbar {
    margin-bottom: 12px;
}

.homepage-feed-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: var(--surface-soft);
}

.homepage-feed-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--muted);
}

.homepage-feed-tabs a.active {
    background: #fff;
    color: var(--brand-deep);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.homepage-feed {
    margin-top: 12px;
}

.homepage-feed .post-card {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #edf0f5;
    box-shadow: none;
}

.homepage-feed .post-card-link:hover,
.homepage-feed .post-card-link:focus-visible {
    transform: none;
    border-color: #dce9ff;
    box-shadow: none;
}

.homepage-feed .post-card-layout {
    padding: 14px 16px;
}

.homepage-feed .post-author {
    font-size: 14px;
}

.homepage-feed .post-title {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.5;
}

.homepage-feed .post-summary {
    font-size: 13px;
    line-height: 1.7;
}

.homepage-feed .post-card-head em,
.homepage-feed .post-stats {
    font-size: 12px;
}

.active-user-list,
.topic-list {
    display: grid;
    gap: 8px;
}

.homepage-sidebar-right .panel-title {
    margin-bottom: 12px;
}

.homepage-sidebar-right .panel-title h2 {
    font-size: 16px;
}

.homepage-sidebar-right .panel-title span {
    font-size: 14px;
}

.active-user-row,
.topic-item {
    display: grid;
    gap: 10px;
    padding: 12px 0;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #edf0f5;
    transition: border-color var(--transition), background-color var(--transition);
}

.topic-list > .topic-item:last-child,
.active-user-list > .active-user-row:last-child {
    border-bottom: none;
}

.active-user-row {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    padding: 8px 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.active-user-row:hover,
.topic-item:hover {
    border-color: #dce9ff;
    background: rgba(22, 119, 255, 0.02);
    box-shadow: none;
    transform: none;
}

.active-users-panel .active-user-row:hover {
    border: none;
    background: transparent;
}

.active-users-panel .active-user-row img {
    width: 32px;
    height: 32px;
}

.active-users-panel .active-user-row strong {
    font-size: 14px;
    font-weight: 400;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.topic-meta em {
    margin-left: auto;
    font-style: normal;
    color: var(--muted);
}

.topic-item strong {
    font-size: 14px;
    line-height: 1.5;
}

.topic-item p,
.site-info-copy p {
    margin: 0;
    font-size: 13px;
}

.mini-post {
    padding: 12px 0;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #edf0f5;
    box-shadow: none;
}

.mini-post:hover {
    transform: none;
    border-color: #dce9ff;
    background: rgba(22, 119, 255, 0.02);
    box-shadow: none;
}

.mini-post strong {
    font-size: 14px;
}

.mini-post p,
.mini-post-meta {
    font-size: 13px;
}

.site-info-copy {
    display: grid;
    gap: 8px;
}

.site-info-copy a {
    color: var(--brand-deep);
}

@media (max-width: 1320px) {
    .homepage-columns {
        grid-template-columns: 200px minmax(0, 1fr) 260px;
    }
}

@media (max-width: 1180px) {
    .homepage-columns {
        grid-template-columns: 196px minmax(0, 1fr);
    }

    .homepage-sidebar-right {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .homepage-columns,
    .homepage-sidebar-right {
        grid-template-columns: 1fr;
    }

    .hero-carousel-track {
        min-height: 280px;
    }
}

@media (max-width: 720px) {
    .homepage-stage {
        padding-bottom: 36px;
    }

    .hero-slide {
        min-height: 240px;
        padding: 20px;
    }

    .home-composer-footer,
    .home-composer-guest {
        flex-direction: column;
        align-items: stretch;
    }

    .home-composer-submit,
    .home-composer-login {
        width: 100%;
    }
}
