/**
 * 討論區精選文：首頁主欄卡片列與側欄清單。
 * 僅使用 default head 定義的 CSS 變數，換皮模版（dcinside／huakui／minimal）自動沿用配色。
 * 後半段含社群首頁（兩欄 layout：精選 TAB＋最新討論＋側欄熱門店家）。
 */

.fate-featured {
    margin: 0 0 1rem;
}

.fate-featured__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.fate-featured__label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0;
}

.fate-featured__more {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.fate-featured__more:hover {
    text-decoration: underline;
}

.fate-featured__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.7rem;
}

.fate-featured-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.fate-featured-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.fate-featured-card__visual {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--bg2);
    overflow: hidden;
}

.fate-featured-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(1.1) contrast(1.03) saturate(1.05);
}

.fate-featured-card__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    font-weight: 700;
    color: var(--muted);
    opacity: 0.55;
}

.fate-featured-card__badge {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--accent2, var(--accent));
    color: #fff;
}

.fate-featured-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    padding: 0.6rem 0.7rem 0.7rem;
}

.fate-featured-card__board {
    align-self: flex-start;
    font-size: 0.7rem;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.06rem 0.42rem;
}

.fate-featured-card__title {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 600;
}

.fate-featured-card__title a {
    color: inherit;
    text-decoration: none;
}

.fate-featured-card__title a:hover {
    color: var(--accent);
}

.fate-featured-card__excerpt {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fate-featured-card__meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--muted);
}

.fate-featured-card__paid {
    padding: 0.04rem 0.36rem;
    border-radius: 3px;
    border: 1px solid var(--line);
    color: var(--accent);
}

/* ── 側欄清單 ── */
.sidebar-featured-list {
    list-style: none;
    margin: 0 0 0.6rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sidebar-featured-list__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    border-radius: calc(var(--radius) / 2);
    padding: 0.2rem;
    transition: background 0.18s ease;
}

.sidebar-featured-list__link:hover {
    background: var(--bg2);
}

.sidebar-featured-list__thumb {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: calc(var(--radius) / 2);
    object-fit: cover;
    background: var(--bg2);
    border: 1px solid var(--line);
    filter: brightness(1.12) contrast(1.04) saturate(1.05);
}

.sidebar-featured-list__thumb--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--muted);
}

.sidebar-featured-list__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sidebar-featured-list__title {
    font-size: 0.82rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-featured-list__link:hover .sidebar-featured-list__title {
    color: var(--accent);
}

.sidebar-featured-list__meta {
    font-size: 0.7rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sidebar-featured-list__paid {
    padding: 0.02rem 0.3rem;
    border-radius: 3px;
    border: 1px solid var(--line);
    color: var(--accent);
}

/* ── 社群首頁：全寬 index ── */

@keyframes fate-index-ken {
    from {
        transform: scale(1.08) translate3d(-1.2%, 0.6%, 0);
    }
    to {
        transform: scale(1.18) translate3d(1.4%, -1%, 0);
    }
}

@keyframes fate-index-rise {
    from {
        opacity: 0;
        transform: translate3d(0, 1.1rem, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* 社群首頁改回兩欄 layout，頂欄與找店頁一致 */
body.fate-body--community .layout--community .layout-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.fate-index {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* Hero stage — edge-to-edge, not a card */
.fate-index-stage {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 72vh;
    min-height: 72svh;
    padding:
        calc(var(--fate-topbar-sticky-offset, 3.15rem) + 2.5rem)
        clamp(1rem, 4vw, 3rem)
        clamp(2.4rem, 6vh, 4rem);
    background:
        radial-gradient(900px 420px at 78% 12%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 58%),
        radial-gradient(720px 380px at 8% 88%, color-mix(in srgb, var(--accent2, var(--accent)) 16%, transparent), transparent 55%),
        linear-gradient(165deg, var(--bg2) 0%, var(--bg) 55%, #06070a 100%);
    overflow: hidden;
}

.fate-index-stage--photo {
    background: #06070a;
}

.fate-index-stage__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.fate-index-stage__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
    display: block;
    transform-origin: center center;
    animation: fate-index-ken 28s ease-in-out alternate infinite;
    will-change: transform;
}

.fate-index-stage__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(6, 7, 10, 0.28) 0%, rgba(6, 7, 10, 0.2) 38%, rgba(6, 7, 10, 0.82) 78%, rgba(6, 7, 10, 0.96) 100%),
        linear-gradient(90deg, rgba(6, 7, 10, 0.55) 0%, transparent 42%, rgba(6, 7, 10, 0.35) 100%);
}

.fate-index-stage:not(.fate-index-stage--photo) .fate-index-stage__veil {
    background:
        linear-gradient(180deg, transparent 0%, rgba(6, 7, 10, 0.15) 55%, rgba(6, 7, 10, 0.55) 100%);
}

.fate-index-stage__inner {
    position: relative;
    z-index: 2;
    width: min(52rem, 100%);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    animation: fate-index-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fate-index-stage__brand {
    margin: 0;
    font-size: clamp(2.8rem, 9vw, 6.4rem);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: 0.04em;
    color: var(--fg);
    text-wrap: balance;
}

.fate-index-stage__line {
    margin: 0;
    max-width: 28rem;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.55;
    color: color-mix(in srgb, var(--fg) 78%, var(--muted));
    animation: fate-index-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.fate-index-stage__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.7rem;
    margin-top: 0.55rem;
    animation: fate-index-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.fate-index-stage__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.55rem;
    padding: 0.55rem 1.15rem;
    border: 1px solid color-mix(in srgb, var(--fg) 28%, transparent);
    background: color-mix(in srgb, var(--fg) 6%, transparent);
    color: var(--fg);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.fate-index-stage__btn:hover {
    background: color-mix(in srgb, var(--fg) 12%, transparent);
    border-color: color-mix(in srgb, var(--fg) 45%, transparent);
}

.fate-index-stage__btn--primary {
    border-color: transparent;
    background: var(--accent);
    color: #0a0c10;
}

.fate-index-stage__btn--primary:hover {
    filter: brightness(1.06);
    background: var(--accent);
    color: #0a0c10;
}

.fate-index-stage__btn--quiet {
    border-color: transparent;
    background: transparent;
    color: color-mix(in srgb, var(--fg) 72%, var(--muted));
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.fate-index-stage__btn--quiet:hover {
    color: var(--fg);
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* Huakui theme — stage / brand / btn / label */
html.fate-theme-huakui .fate-index-stage {
    background:
        radial-gradient(880px 400px at 82% 8%, rgba(184, 77, 92, 0.14), transparent 55%),
        radial-gradient(640px 360px at 6% 90%, rgba(201, 174, 82, 0.1), transparent 52%),
        linear-gradient(165deg, #0c0a0b 0%, #050405 50%, #020102 100%);
}

html.fate-theme-huakui .fate-index-stage--photo {
    background: #020102;
}

html.fate-theme-huakui .fate-index-stage__veil {
    background:
        linear-gradient(180deg, rgba(5, 4, 5, 0.35) 0%, rgba(5, 4, 5, 0.22) 36%, rgba(5, 4, 5, 0.86) 78%, rgba(5, 4, 5, 0.97) 100%),
        linear-gradient(90deg, rgba(5, 4, 5, 0.58) 0%, transparent 44%, rgba(5, 4, 5, 0.4) 100%);
}

html.fate-theme-huakui .fate-index-stage:not(.fate-index-stage--photo) .fate-index-stage__veil {
    background:
        linear-gradient(180deg, transparent 0%, rgba(5, 4, 5, 0.2) 55%, rgba(5, 4, 5, 0.62) 100%);
}

html.fate-theme-huakui .fate-index-stage__brand {
    font-family: "Shippori Mincho", "Noto Serif TC", serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--hk-pearl, var(--fg));
    text-shadow: 0 0 40px rgba(184, 77, 92, 0.18);
}

html.fate-theme-huakui .fate-index-stage__line {
    color: var(--hk-muted, var(--muted));
}

html.fate-theme-huakui .fate-index-stage__btn {
    border-color: var(--hk-border, rgba(201, 174, 82, 0.28));
    background: rgba(201, 174, 82, 0.06);
    color: var(--hk-pearl, var(--fg));
}

html.fate-theme-huakui .fate-index-stage__btn:hover {
    border-color: var(--hk-gold, var(--accent));
    background: rgba(201, 174, 82, 0.12);
}

html.fate-theme-huakui .fate-index-stage__btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--hk-carmine, #c45c6a), var(--hk-carmine-deep, #8e2f3d));
    color: #fff8f4;
}

html.fate-theme-huakui .fate-index-stage__btn--primary:hover {
    filter: brightness(1.08);
    background: linear-gradient(135deg, var(--hk-carmine, #c45c6a), var(--hk-carmine-deep, #8e2f3d));
    color: #fff8f4;
}

html.fate-theme-huakui .fate-index-stage__btn--quiet {
    color: var(--hk-gold, var(--accent));
}

html.fate-theme-huakui .fate-index-spotlight__label {
    font-family: "Shippori Mincho", "Noto Serif TC", serif;
    letter-spacing: 0.14em;
    color: var(--hk-gold, var(--accent));
}

/* Spotlight / lead / rail（全寬英雄遺留；兩欄主欄內覆寫下方） */
.fate-index-spotlight,
.fate-index-stream,
.fate-index-explore {
    width: min(72rem, 100%);
    margin: 0 auto;
    padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1rem, 3.5vw, 2.5rem) 0;
}

.layout--community .fate-index-stream {
    width: 100%;
    margin: 0;
    padding: 0;
}

.fate-index-streams {
    width: 100%;
    margin: 0 0 1rem;
}

.fate-index-streams--split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    align-items: start;
}

.fate-index-stream__paid {
    color: var(--accent2, var(--accent));
    font-weight: 600;
}

@media (max-width: 720px) {
    .fate-index-streams--split {
        grid-template-columns: 1fr;
    }
}

.fate-index-explore {
    padding-bottom: clamp(2.2rem, 5vw, 3.4rem);
}

.fate-index-spotlight__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fate-index-spotlight__label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.fate-index-spotlight__more {
    font-size: 0.82rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.fate-index-spotlight__more:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.fate-index-spotlight--empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding-bottom: 1.5rem;
}

.fate-index-spotlight__empty {
    margin: 0;
    max-width: 32rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.fate-index-lead {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1.25rem;
}

.fate-index-lead:not(:has(.fate-index-lead__visual)) {
    grid-template-columns: 1fr;
}

.fate-index-lead__visual {
    display: block;
    position: relative;
    min-height: clamp(14rem, 32vw, 22rem);
    overflow: hidden;
    background: var(--bg2);
}

.fate-index-lead__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.fate-index-lead:hover .fate-index-lead__visual img {
    transform: scale(1.04);
}

.fate-index-lead__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.15rem 0;
}

.fate-index-lead__board {
    align-self: flex-start;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.15rem;
}

.fate-index-lead__title {
    font-size: clamp(1.35rem, 3.2vw, 2.05rem);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: 0.02em;
}

.fate-index-lead:hover .fate-index-lead__title {
    color: var(--accent);
}

.fate-index-lead__excerpt {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fate-index-lead__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.fate-index-rail {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line);
}

.fate-index-rail__item {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.fate-index-rail__item:hover {
    background: color-mix(in srgb, var(--fg) 3%, transparent);
}

.fate-index-rail__thumb {
    width: 4.5rem;
    height: 3.2rem;
    object-fit: cover;
    display: block;
    background: var(--bg2);
}

.fate-index-rail__thumb--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--muted);
}

.fate-index-rail__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.fate-index-rail__title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fate-index-rail__item:hover .fate-index-rail__title {
    color: var(--accent);
}

.fate-index-rail__meta {
    font-size: 0.72rem;
    color: var(--muted);
}

/* Stream — numbered text flow */
.fate-index-stream__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.fate-index-stream__item {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: baseline;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.fate-index-stream__n {
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.fate-index-stream__link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.fate-index-stream__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.fate-index-stream__link:hover .fate-index-stream__title {
    color: var(--accent);
}

.fate-index-stream__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--muted);
}

/* Explore — horizontal strip */
.fate-index-explore__row {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.fate-index-explore__item {
    flex: 0 0 auto;
    width: min(9.5rem, 42vw);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
}

.fate-index-explore__visual {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg2);
    position: relative;
}

.fate-index-explore__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.fate-index-explore__item:hover .fate-index-explore__visual img {
    transform: scale(1.05);
}

.fate-index-explore__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--bg2);
}

.fate-index-explore__name {
    font-size: 0.82rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fate-index-explore__item:hover .fate-index-explore__name {
    color: var(--accent);
}

.topbar nav a[aria-current="page"] {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 860px) {
    .fate-index-stage {
        min-height: 64vh;
        min-height: 64svh;
        align-items: flex-end;
        padding-bottom: clamp(1.8rem, 5vh, 2.8rem);
    }

    .fate-index-stage__brand {
        font-size: clamp(2.4rem, 12vw, 4.2rem);
    }

    .fate-index-lead {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        margin-bottom: 1rem;
    }

    .fate-index-lead__visual {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .fate-index-spotlight,
    .fate-index-stream,
    .fate-index-explore {
        padding-top: 1.4rem;
    }
}

@media (max-width: 560px) {
    .fate-index-stage {
        min-height: 58vh;
        min-height: 58svh;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .fate-index-stage__cta {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
    }

    .fate-index-stage__btn {
        width: 100%;
    }

    .fate-index-stage__btn--quiet {
        width: auto;
        align-self: flex-start;
        padding-left: 0.15rem;
    }

    .fate-index-rail__item {
        grid-template-columns: 3.6rem minmax(0, 1fr);
        gap: 0.65rem;
    }

    .fate-index-rail__thumb {
        width: 3.6rem;
        height: 2.6rem;
    }

    .fate-index-stream__item {
        grid-template-columns: 1.8rem minmax(0, 1fr);
        gap: 0.45rem;
    }

    .fate-index-stream__title {
        font-size: 0.95rem;
    }

    .fate-index-explore__item {
        width: 7.6rem;
    }

    .fate-featured__grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fate-index-stage__media img,
    .fate-index-stage__inner,
    .fate-index-stage__line,
    .fate-index-stage__cta,
    .fate-index-lead__visual img,
    .fate-index-explore__visual img {
        animation: none !important;
        transition: none !important;
    }
}

/* ── 首頁精選 TAB 輪播（兩欄主欄寬度） ── */
.fate-home-tabs {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: var(--radius, 10px);
}

.fate-home-tabs__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.65rem;
    border-bottom: 1px solid var(--line);
}

.fate-home-tabs__label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.fate-home-tabs__more {
    font-size: 0.82rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.fate-home-tabs__more:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.fate-home-tabs-empty__text {
    margin: 0 0 0.85rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.fate-home-tabs__panels {
    position: relative;
    min-height: clamp(11rem, 24vw, 15rem);
    overflow: hidden;
}

.fate-home-tabs__panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(700px 360px at 78% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
        linear-gradient(145deg, var(--bg2), var(--bg));
}

.fate-home-tabs__panel[hidden] {
    display: none;
}

.fate-home-tabs__image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
    filter: brightness(1.12) contrast(1.04) saturate(1.06);
    animation: fate-home-tab-image 0.65s ease both;
}

.fate-home-tabs__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(6, 7, 10, 0.72) 0%, rgba(6, 7, 10, 0.38) 46%, rgba(6, 7, 10, 0.08) 100%),
        linear-gradient(0deg, rgba(6, 7, 10, 0.55), transparent 70%);
}

.fate-home-tabs__content {
    width: min(34rem, 90%);
    padding: clamp(0.9rem, 2vw, 1.4rem);
    animation: fate-home-tab-content 0.5s ease both;
}

.fate-home-tabs__eyebrow {
    margin: 0 0 0.4rem;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.fate-home-tabs__title {
    margin: 0;
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    line-height: 1.25;
    letter-spacing: 0.015em;
    text-wrap: balance;
}

.fate-home-tabs__excerpt {
    margin: 0.5rem 0 0;
    max-width: 34rem;
    color: color-mix(in srgb, var(--fg) 76%, var(--muted));
    font-size: 0.86rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fate-home-tabs__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.73rem;
}

.fate-home-tabs__paid {
    margin-left: 0.25rem;
    padding: 0.05rem 0.4rem;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    color: var(--accent);
}

.fate-home-tabs__read {
    display: inline-flex;
    margin-top: 0.65rem;
    padding-bottom: 0.18rem;
    border-bottom: 1px solid var(--accent);
    color: var(--fg);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.fate-home-tabs__read:hover {
    color: var(--accent);
}

.fate-home-tabs__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    border-top: 1px solid var(--line);
}

.fate-home-tabs__tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    min-width: 0;
    overflow-x: auto;
}

.fate-home-tabs__tab {
    position: relative;
    min-width: 6.5rem;
    min-height: 3rem;
    padding: 0.45rem 0.6rem 0.42rem;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    text-align: left;
    cursor: pointer;
}

.fate-home-tabs__tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--accent);
}

.fate-home-tabs__tab.is-active {
    background: color-mix(in srgb, var(--fg) 4%, transparent);
    color: var(--fg);
}

.fate-home-tabs__tab.is-active::after {
    right: 0;
    transition: right 6s linear;
}

.fate-home-tabs__tab-n {
    display: block;
    margin-bottom: 0.24rem;
    color: var(--accent);
    font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
}

.fate-home-tabs__tab-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 600;
}

.fate-home-tabs__toggle {
    min-width: 4.4rem;
    padding: 0 0.8rem;
    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}

.fate-home-tabs__toggle:hover {
    color: var(--accent);
}

html.fate-theme-huakui .fate-home-tabs,
body.fate-theme-huakui .fate-home-tabs {
    background: #050405;
    border-color: var(--hk-border, var(--line));
}

html.fate-theme-huakui .fate-home-tabs__panel,
body.fate-theme-huakui .fate-home-tabs__panel {
    background:
        radial-gradient(760px 380px at 82% 10%, rgba(184, 77, 92, 0.14), transparent 58%),
        linear-gradient(145deg, #141112, #050405);
}

html.fate-theme-huakui .fate-home-tabs__title,
body.fate-theme-huakui .fate-home-tabs__title {
    font-family: "Shippori Mincho", "Noto Serif TC", serif;
    font-weight: 600;
}

html.fate-theme-huakui .fate-home-tabs__eyebrow,
html.fate-theme-huakui .fate-home-tabs__tab-n,
body.fate-theme-huakui .fate-home-tabs__eyebrow,
body.fate-theme-huakui .fate-home-tabs__tab-n {
    color: var(--hk-gold, var(--accent));
}

html.fate-theme-huakui .fate-home-tabs__tab::after,
body.fate-theme-huakui .fate-home-tabs__tab::after {
    background: var(--hk-carmine, var(--accent2));
}

@keyframes fate-home-tab-image {
    from { opacity: 0.5; transform: scale(1.025); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fate-home-tab-content {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 側欄：本週熱門店家 */
.sidebar-hot-stores {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sidebar-hot-stores__link {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    padding: 0.2rem 0;
    color: inherit;
    text-decoration: none;
}

.sidebar-hot-stores__link:hover .sidebar-hot-stores__name {
    color: var(--accent);
}

.sidebar-hot-stores__thumb {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: calc(var(--radius, 6px) / 1.5);
    background: var(--bg);
    border: 1px solid var(--line);
    filter: brightness(1.12) contrast(1.04) saturate(1.05);
}

.sidebar-hot-stores__thumb--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.sidebar-hot-stores__text {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.sidebar-hot-stores__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
}

.sidebar-hot-stores__rank {
    margin-right: 0.28rem;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
}

.sidebar-hot-stores__meta {
    color: var(--muted);
    font-size: 0.72rem;
}

html.fate-theme-huakui .sidebar-hot-stores__rank,
body.fate-theme-huakui .sidebar-hot-stores__rank {
    color: var(--hk-gold, var(--accent));
}

/* 社群首頁主欄：精選 TAB 下方的最新登錄店家橫排 */
.fate-latest-stores {
    margin: 0 0 1rem;
}

.fate-latest-stores + .fate-latest-stores {
    margin-top: 0.15rem;
}

.fate-latest-stores__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.fate-latest-store {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius, 10px);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.fate-latest-store:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.fate-latest-store__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.fate-latest-store__visual {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--bg2);
    overflow: hidden;
}

.fate-latest-store__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(1.1) contrast(1.03) saturate(1.05);
}

.fate-latest-store__cover--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    opacity: 0.55;
}

.fate-latest-store__kind {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    padding: 0.12rem 0.45rem;
    border-radius: calc(var(--radius, 10px) / 2);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
}

.fate-latest-store--mobile .fate-latest-store__kind {
    background: var(--accent2, var(--accent));
}

.fate-latest-store__body {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.6rem 0.7rem 0.7rem;
}

.fate-latest-store__name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fate-latest-store__link:hover .fate-latest-store__name {
    color: var(--accent);
}

.fate-latest-store__loc {
    font-size: 0.74rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fate-latest-store__rating {
    font-size: 0.74rem;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
    .fate-latest-store__visual {
        aspect-ratio: 16 / 5;
    }
}

@media (max-width: 560px) {
    .fate-latest-stores__row {
        grid-template-columns: 1fr;
    }
}

/* 社群首頁側欄：熱門店家／技師週推榜合併 TAB */
.sidebar-card--rank-tabs {
    padding: 0;
    overflow: hidden;
}

.community-rank-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
}

.community-rank-tabs__tab {
    position: relative;
    min-width: 0;
    padding: 0.78rem 0.45rem 0.68rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.community-rank-tabs__tab:only-child {
    grid-column: 1 / -1;
}

.community-rank-tabs__tab:hover,
.community-rank-tabs__tab.is-active {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.community-rank-tabs__tab.is-active::after {
    content: "";
    position: absolute;
    right: 0.65rem;
    bottom: 0;
    left: 0.65rem;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.community-rank-tabs__panel[hidden] {
    display: none;
}

.community-rank-tabs__panel > .sidebar-card {
    margin: 0;
    padding: 0.85rem 1.05rem 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.community-rank-tabs__panel .sidebar-card--hot-stores > .sidebar-title,
.community-rank-tabs__panel .sidebar-title--weekly {
    display: none;
}

.community-rank-tabs__panel .sidebar-weekly-head {
    justify-content: flex-end;
    margin-bottom: 0.35rem;
}

html.fate-theme-huakui .community-rank-tabs__tab.is-active,
body.fate-theme-huakui .community-rank-tabs__tab.is-active {
    color: var(--hk-gold, var(--accent));
}

html.fate-theme-huakui .community-rank-tabs__tab.is-active::after,
body.fate-theme-huakui .community-rank-tabs__tab.is-active::after {
    background: var(--hk-carmine, var(--accent2));
}

@media (max-width: 720px) {
    .fate-home-tabs__panels {
        min-height: 9.8rem;
    }

    .fate-home-tabs__content {
        width: 100%;
        padding: 0.7rem 0.75rem 0.8rem;
    }

    .fate-home-tabs__shade {
        background:
            linear-gradient(0deg, rgba(6, 7, 10, 0.78) 0%, rgba(6, 7, 10, 0.42) 58%, rgba(6, 7, 10, 0.1) 100%);
    }

    .fate-home-tabs__title {
        font-size: clamp(0.98rem, 4.4vw, 1.2rem);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .fate-home-tabs__excerpt {
        -webkit-line-clamp: 1;
    }

    .fate-home-tabs__tabs {
        display: flex;
    }

    .fate-home-tabs__tab {
        flex: 0 0 auto;
        width: max(7.5rem, 42vw);
        max-width: 12rem;
        min-height: 2.55rem;
        padding: 0.38rem 0.55rem 0.36rem;
    }

    .fate-home-tabs__tab-n {
        margin-bottom: 0.12rem;
    }

    .fate-home-tabs__tab-title {
        display: block;
        -webkit-line-clamp: unset;
        -webkit-box-orient: unset;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.74rem;
        line-height: 1.25;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fate-home-tabs__image,
    .fate-home-tabs__content {
        animation: none;
    }

    .fate-home-tabs__tab.is-active::after {
        transition: none;
    }
}
