/* =========================================================
   首页内容区（全屏）
   ========================================================= */

:root {
    --home-orange: var(--color-primary);
    --home-orange-deep: var(--color-primary-hover);
    --home-orange-soft: var(--color-primary-soft);
    --home-blue: var(--color-primary);
    --home-peach: var(--color-primary-tint);
    --home-ink: var(--color-ink);
    --home-muted: var(--color-muted);
    --home-page: var(--color-page);
    --home-surface: var(--color-surface);
    --home-radius: var(--radius-lg);
    --home-radius-sm: var(--radius-md);
    --home-shadow: var(--shadow-card);
    --home-shadow-hover: var(--shadow-card-hover);
    --home-font: var(--font-sans);
    --home-display: var(--font-sans);
}

.home-page {
    font-family: var(--home-font);
    color: var(--home-ink);
    background: var(--home-page);
    min-height: calc(100vh - var(--site-header-h, 64px) - var(--site-footer-h, 74px));
    -webkit-font-smoothing: antialiased;
}

.home-page a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease;
}

.home-page button {
    font: inherit;
    border: 0;
    background: none;
    cursor: pointer;
    color: inherit;
}

/* 全屏内容容器 */
.home-screen {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - var(--site-header-h, 64px) - var(--site-footer-h, 74px));
    display: flex;
    flex-direction: column;
    padding: 20px clamp(16px, 3vw, 40px) 24px;
    box-sizing: border-box;
}

/* ---------- Hero ---------- */
.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 24px;
    min-height: clamp(200px, 24vh, 280px);
    padding: 32px clamp(24px, 4vw, 48px);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, var(--color-primary-soft) 0%, var(--color-primary-tint) 55%, #fff 100%);
    border: 1px solid var(--color-line);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    animation: home-fade-up 0.3s ease both;
    flex-shrink: 0;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(195, 122, 103, 0.12);
    pointer-events: none;
}

.home-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 32em;
}

.home-hero-brand {
    margin: 0 0 10px;
    font-family: var(--home-display);
    font-size: var(--fs-tiny);
    line-height: var(--lh-tiny);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--color-primary);
}

.home-hero-copy h1 {
    margin: 0 0 12px;
    font-family: var(--home-display);
    font-size: var(--fs-h1);
    font-weight: 700;
    line-height: var(--lh-h1);
    letter-spacing: 0;
    color: var(--home-ink);
}

.home-hero-copy > p {
    margin: 0 0 20px;
    font-size: var(--fs-aux);
    line-height: var(--lh-aux);
    color: var(--home-muted);
    max-width: 28em;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: var(--fs-aux);
    font-weight: 600;
    background: var(--color-surface);
    color: var(--home-ink);
    border: 1px solid var(--color-line);
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.home-btn:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.home-btn-primary {
    background: var(--color-primary);
    color: #fff !important;
    border-color: var(--color-primary);
}

.home-btn-primary:hover {
    background: var(--color-primary-hover);
    color: #fff !important;
}

.home-hero-art {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    animation: none;
}

.home-hero-svg {
    width: min(100%, 400px);
    height: auto;
}

/* ---------- Grid ---------- */
.home-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1.35fr) minmax(0, 1fr) 220px;
    gap: 18px;
    margin-top: 22px;
    align-items: start;
    flex: 1;
}

.home-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.home-col-left { animation: home-fade-up 0.7s ease 0.08s both; }
.home-col-center { animation: home-fade-up 0.7s ease 0.16s both; }
.home-col-mid { animation: home-fade-up 0.7s ease 0.24s both; }
.home-col-right { animation: home-fade-up 0.7s ease 0.32s both; }

/* ---------- Panels ---------- */
.home-panel {
    background: var(--home-surface);
    border-radius: var(--home-radius);
    padding: 16px;
    box-shadow: var(--home-shadow);
}

.home-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.home-panel-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.home-panel-head > a {
    margin-left: auto;
    font-size: 12px;
    color: var(--home-muted);
    white-space: nowrap;
}

.home-panel-head > a:hover {
    color: var(--home-orange);
}

.home-panel-head > a span {
    font-size: 14px;
}

/* ---------- Quick links ---------- */
.home-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.home-quick-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 12px;
    border-radius: var(--home-radius-sm);
    background: var(--home-surface);
    box-shadow: var(--home-shadow);
}

.home-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--home-shadow-hover);
}

.home-quick-card.is-warm {
    background: var(--color-primary-soft);
}

.home-quick-card.is-cool {
    background: var(--color-primary-tint);
}

.home-quick-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.8);
}

.home-quick-card.is-warm .home-quick-icon {
    color: var(--home-orange);
}

.home-quick-card.is-cool .home-quick-icon {
    color: var(--home-blue);
}

.home-quick-card strong {
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Feature cards ---------- */
.home-feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-feature-card {
    display: block;
    border-radius: var(--home-radius-sm);
    overflow: hidden;
    background: var(--color-page);
}

.home-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--home-shadow);
}

.home-feature-cover {
    aspect-ratio: 16 / 10;
    background: center / cover no-repeat #E8E4DE;
}

.home-feature-cover.is-empty {
    background: linear-gradient(135deg, #FFE4C2, #FFC878);
}

.home-feature-body {
    padding: 10px 12px 12px;
}

.home-feature-body h3 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-feature-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--home-muted);
}

/* ---------- Feed / media ---------- */
.home-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.home-tabs button {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--home-muted);
}

.home-tabs button.is-active {
    background: var(--home-orange-soft);
    color: var(--home-orange-deep);
    font-weight: 600;
}

.home-feed-text {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-feed-text li a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: var(--color-page);
}

.home-feed-text li a:hover {
    background: var(--home-orange-soft);
}

.home-feed-text img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.home-feed-content {
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-feed-text time {
    font-size: 11px;
    color: var(--home-muted);
}

.home-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.home-media-card {
    display: block;
    min-width: 0;
}

.home-media-card:hover .home-media-cover {
    transform: scale(1.03);
}

.home-media-cover {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    background: center / cover no-repeat #E8E4DE;
    overflow: hidden;
    transition: transform 0.35s ease;
}

.home-media-cover.is-empty {
    background: linear-gradient(145deg, #F0E7DC, #E2D4C4);
}

.home-media-cover.is-resource {
    background: linear-gradient(145deg, #E8F3FC, #D3E7F8);
}

.home-media-tag {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    color: #fff;
    background: rgba(28, 28, 30, 0.55);
    backdrop-filter: blur(4px);
}

.home-media-card h3 {
    margin: 8px 0 2px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-media-card p {
    margin: 0;
    font-size: 11px;
    color: var(--home-muted);
}

/* ---------- Push ---------- */
.home-push-card {
    display: block;
}

.home-push-card:hover .home-push-cover {
    transform: translateY(-2px);
}

.home-push-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: center / cover no-repeat #D9E8F7;
    overflow: hidden;
    transition: transform 0.25s ease;
}

.home-push-cover.is-empty {
    background: linear-gradient(135deg, #B8D8F5, #7EB6EA);
}

.home-push-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.home-push-play::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 14px;
    border-style: solid;
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent var(--home-orange);
}

.home-push-card h3 {
    margin: 10px 0 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* ---------- Market ---------- */
.home-mini-users {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-mini-users li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-mini-users img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.home-mini-users strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
}

.home-mini-users p {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--home-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-market-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.home-market-card {
    display: block;
    min-width: 0;
}

.home-market-card:hover {
    transform: translateY(-2px);
}

.home-market-cover {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
    background: center / cover no-repeat #EDE8E1;
}

.home-market-cover.is-empty {
    background: linear-gradient(145deg, #FFE8C8, #FFD29A);
}

.home-market-card h3 {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- QA ---------- */
.home-qa-panel {
    background: linear-gradient(180deg, #FFFDFB 0%, #FFF7EF 100%);
}

.home-qa-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.home-qa-list li + li {
    margin-top: 8px;
}

.home-qa-list a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.45;
}

.home-qa-list a:hover {
    color: var(--home-orange-deep);
}

.home-qa-dot {
    width: 6px;
    height: 6px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--home-orange);
    flex-shrink: 0;
}

.home-ask-btn {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--home-orange);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(255, 138, 26, 0.28);
}

.home-ask-btn:hover {
    background: var(--home-orange-deep);
    transform: translateY(-1px);
}

/* ---------- Events ---------- */
.home-event-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-event-list li + li {
    margin-top: 10px;
}

.home-event-list a {
    display: flex;
    gap: 10px;
    align-items: center;
}

.home-event-list a:hover h3 {
    color: var(--home-orange-deep);
}

.home-event-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    background: center / cover no-repeat #E8E4DE;
}

.home-event-thumb.is-empty {
    background: linear-gradient(145deg, #E4F0FC, #C5DDF5);
}

.home-event-body {
    min-width: 0;
}

.home-event-body h3 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-event-body span {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--home-orange-deep);
    background: var(--home-orange-soft);
}

.home-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-link-row a {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--color-page);
    color: var(--home-ink);
}

.home-link-row a:hover {
    background: var(--home-orange-soft);
    color: var(--home-orange-deep);
}

/* ---------- Empty / Footer ---------- */
.home-empty {
    padding: 18px 8px;
    text-align: center;
    font-size: 12px;
    color: var(--home-muted);
}

.home-empty-wide {
    grid-column: 1 / -1;
}

.home-footer {
    display: none;
}

@keyframes home-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes home-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero,
    .home-col-left,
    .home-col-center,
    .home-col-mid,
    .home-col-right,
    .home-hero-art {
        animation: none;
    }
}

@media (max-width: 1180px) {
    .home-grid {
        grid-template-columns: 200px minmax(0, 1.2fr) minmax(0, 1fr);
    }

    .home-col-right {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 960px) {
    .home-hero {
        grid-template-columns: 1fr;
        padding: 28px 24px 20px;
        text-align: center;
    }

    .home-hero-copy {
        max-width: none;
    }

    .home-hero-actions {
        justify-content: center;
    }

    .home-hero-art {
        order: -1;
    }

    .home-hero-svg {
        width: min(100%, 280px);
    }

    .home-grid {
        grid-template-columns: 1fr 1fr;
    }

    .home-col-left,
    .home-col-center,
    .home-col-mid,
    .home-col-right {
        grid-column: auto;
    }

    .home-col-center {
        grid-column: 1 / -1;
    }

    .home-col-right {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .home-screen {
        padding: 12px 12px 0;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    .home-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-panel-head {
        flex-wrap: wrap;
    }

    .home-tabs {
        order: 3;
        width: 100%;
    }

    .home-feature-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}
