/* Virtual X News — pastel news portal */
:root {
    --pink: #FF8FB8;
    --pink-soft: #FFD6E7;
    --pink-deep: #E86A9B;
    --lavender: #C9B6FF;
    --lavender-soft: #EEE6FF;
    --mint: #7ED9C0;
    --mint-soft: #E3F8F1;
    --bg: #FFF6F9;
    --bg-2: #FFFCFE;
    --card: #FFFFFF;
    --text: #3A2B33;
    --text-muted: #7A6670;
    --line: #F3D7E3;
    --shadow: 0 12px 32px rgba(232, 106, 155, 0.12);
    --radius: 24px;
    --radius-sm: 16px;
    --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
    --header-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--gh-font-body, var(--font));
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    background:
        radial-gradient(900px 420px at 0% -10%, rgba(255, 214, 231, 0.8), transparent 60%),
        radial-gradient(700px 380px at 100% 0%, rgba(201, 182, 255, 0.35), transparent 55%),
        radial-gradient(600px 360px at 80% 100%, rgba(126, 217, 192, 0.25), transparent 55%),
        var(--bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--gh-font-heading, var(--font)); line-height: 1.35; letter-spacing: 0.01em; font-weight: 700; }
p { margin: 0 0 1em; }

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

.skip-link:focus {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    padding: 0.6rem 1rem;
    background: #fff;
    color: var(--text);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(16px);
    background: rgba(255, 252, 254, 0.82);
    border-bottom: 1px solid rgba(243, 215, 227, 0.8);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: var(--header-h);
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.site-brand:hover { text-decoration: none; }

.site-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(232, 106, 155, 0.2);
    background: var(--pink-soft);
}

.site-wordmark { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.site-title { font-weight: 900; font-size: 1.05rem; }
.site-short { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.06em; }

.site-nav {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.2rem;
}

.site-nav a {
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--pink-soft);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--pink-soft);
    cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    position: relative;
    margin: 0 auto;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* Hero */
.hero {
    position: relative;
    min-height: 440px;
    background-color: #f8d5e6;
    background-size: cover;
    background-position: center right;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 246, 249, 0.94) 0%, rgba(255, 246, 249, 0.78) 38%, rgba(255, 246, 249, 0.15) 68%, transparent 100%);
}

.hero-inner { position: relative; z-index: 1; padding: 3.5rem 0; }
.hero-copy { max-width: 32rem; }

.hero-kicker {
    display: inline-block;
    margin: 0 0 0.8rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: var(--lavender-soft);
    color: #5B4BA0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero h1,
.archive-header h1,
.error-page h1,
.article-header h1 {
    margin: 0 0 0.6rem;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
}

.hero-desc,
.archive-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.4rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--pink);
    color: #5A1636;
    box-shadow: 0 8px 18px rgba(255, 143, 184, 0.4);
}

.btn-primary:hover { background: var(--pink-deep); color: #fff; }

.btn-ghost {
    background: rgba(255, 255, 255, 0.75);
    border-color: var(--pink-soft);
    color: var(--text);
}

.btn-ghost:hover { background: #fff; }

/* Layout sections */
.page-stack { padding: 2.5rem 0 4rem; }
.section { margin-bottom: 3rem; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.section-head h2 {
    margin: 0;
    font-size: 1.4rem;
    padding-left: 0.7rem;
    border-left: 6px solid var(--pink);
}

.section-more {
    font-weight: 700;
    color: var(--pink-deep);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.post-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(243, 215, 227, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(232, 106, 155, 0.16);
}

.post-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--pink-soft), var(--lavender-soft) 50%, var(--mint-soft));
    overflow: hidden;
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-media.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.post-card-fallback {
    font-weight: 900;
    font-size: 1.8rem;
    color: #C45C88;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.post-card-body { padding: 1.05rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }

.post-card-title { margin: 0; font-size: 1.12rem; }
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { color: var(--pink-deep); }

.post-card-excerpt {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    margin: auto 0 0;
    padding-top: 0.6rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Tags */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.15rem; }

.tag-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.6;
    text-decoration: none;
    background: var(--pink-soft);
    color: #9A3A66;
}

.tag-chip:hover { text-decoration: none; filter: brightness(0.97); }
.tag-chip-vtuber { background: #FFD6E7; color: #B04373; }
.tag-chip-acg { background: #EEE6FF; color: #5B4BA0; }
.tag-chip-ai-acg { background: #E3F8F1; color: #1E7A66; }
.tag-chip-flash { background: #FFE0C7; color: #B85A1A; }
.tag-chip-industry { background: #DDE7FF; color: #35509A; }
.tag-chip-merch { background: #FFF0C9; color: #8A5A12; }
.tag-chip-live { background: #FFD0E8; color: #A1286C; }
.tag-chip-games { background: #D5F3E8; color: #216B54; }
.tag-chip-news { background: #F1F1F5; color: #555; }

.empty-state {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state p { margin: 0; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.page-btn:hover { text-decoration: none; background: var(--pink-soft); }
.page-btn.is-disabled { opacity: 0.4; pointer-events: none; }
.page-status { color: var(--text-muted); font-size: 0.9rem; }

/* Archives */
.archive-header { padding: 2.4rem 0 0.4rem; }
.archive-count { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.author-header { display: flex; gap: 1.2rem; align-items: center; }
.author-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
    background: var(--lavender-soft);
    flex-shrink: 0;
}
.author-avatar.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.4rem;
    color: #5B4BA0;
    overflow: hidden;
    text-indent: -999px;
}

/* Article typography */
.article { padding: 2.4rem 0 3.5rem; max-width: 800px; }
.article-header { margin-bottom: 1.4rem; }
.article-meta { color: var(--text-muted); font-size: 0.92rem; }
.article-standfirst {
    font-size: 1.08rem;
    color: var(--text-muted);
    margin: 0.8rem 0 0;
}

.article-hero {
    margin: 0 0 1.6rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--lavender-soft);
}

.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-hero figcaption {
    padding: 0.6rem 1rem 0.9rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #fff;
}

.article-content {
    font-size: 1.05rem;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.article-content > *:first-child { margin-top: 0; }
.article-content h2,
.article-content h3 { margin: 1.8em 0 0.6em; }
.article-content p,
.article-content ul,
.article-content ol { margin: 0 0 1.1em; }
.article-content ul,
.article-content ol { padding-left: 1.3em; }
.article-content a { text-decoration: underline; text-underline-offset: 0.15em; }
.article-content img,
.article-content figure,
.article-content iframe,
.article-content video {
    border-radius: var(--radius-sm);
    max-width: 100%;
}
.article-content blockquote {
    margin: 1.4em 0;
    padding: 0.2em 0 0.2em 1em;
    border-left: 4px solid var(--lavender);
    color: var(--text-muted);
}

/* Ghost card styles, lightly tuned */
.gh-content .kg-card { margin: 1.6em 0; }
.gh-content .kg-image-card img { margin: 0 auto; }
.gh-content .kg-width-wide,
.gh-content .kg-width-full { max-width: 100%; }

.error-page { padding: 4rem 0 5rem; text-align: left; max-width: 640px; }

/* Footer */
.site-footer {
    margin-top: 1rem;
    padding: 2.4rem 0 2rem;
    background: linear-gradient(180deg, rgba(238, 230, 255, 0.35), rgba(255, 214, 231, 0.45));
    border-top: 1px solid var(--line);
}

.footer-inner { display: grid; gap: 1.2rem; }
.footer-brand { display: flex; gap: 0.8rem; align-items: center; }
.footer-title { margin: 0; font-weight: 900; }
.footer-desc { margin: 0.15rem 0 0; color: var(--text-muted); font-size: 0.92rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.footer-nav a { color: var(--text); font-weight: 700; }
.footer-copy { margin: 0.4rem 0 0; color: var(--text-muted); font-size: 0.85rem; }

/* Responsive */
@media (max-width: 800px) {
    .card-grid { grid-template-columns: 1fr; }
    .hero { min-height: 380px; background-position: 70% center; }
    .hero::before {
        background: linear-gradient(180deg, rgba(255, 246, 249, 0.92) 0%, rgba(255, 246, 249, 0.78) 48%, rgba(255, 246, 249, 0.35) 100%);
    }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 0.6rem 1rem 1rem;
        background: rgba(255, 252, 254, 0.96);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }
    .site-nav.is-open { display: flex; }
    .site-header { position: sticky; }
}

@media (min-width: 960px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); }
    .section:first-child .card-grid { grid-template-columns: repeat(2, 1fr); }
    .section:first-child .post-card:nth-child(1),
    .section:first-child .post-card:nth-child(2) { grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .post-card { transition: none; }
}
