:root {
    --page-bg: #eef4f8;
    --page-panel: #f6cb74;
    --blue-band: #67abd0;
    --blue-card: rgba(255, 251, 242, 0.96);
    --cream-card: rgba(255, 251, 242, 0.96);
    --cream-card-strong: rgba(255, 252, 246, 0.98);
    --border-color: rgba(103, 171, 208, 0.24);
    --border-soft: rgba(103, 171, 208, 0.2);
    --text-primary: #244257;
    --text-secondary: #4e6674;
    --text-muted: #778d99;
    --accent-dark: #5f9dc0;
    --accent-soft: rgba(246, 203, 116, 0.2);
    --gold-soft: rgba(246, 203, 116, 0.28);
    --gold-line: rgba(246, 203, 116, 0.42);
    --blue-light: rgba(206, 231, 244, 0.84);
    --blue-deep: rgba(84, 129, 156, 0.92);
    --danger: #8a2e1f;
    --shadow: 0 18px 40px rgba(74, 122, 151, 0.12);
    --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background:
        radial-gradient(circle at top left, rgba(246, 203, 116, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(103, 171, 208, 0.18), transparent 36%),
        linear-gradient(180deg, #f4f9fc 0%, #eef5f8 48%, #edf3f7 100%);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

.page-shell {
    --page-gutter: 12px;
    min-height: 100vh;
    padding: 14px var(--page-gutter) 36px;
}

.app-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.hero-panel {
    margin: 0 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
    background: var(--cream-card);
    box-shadow: var(--shadow);
}

.hero-main {
    background:
        linear-gradient(180deg, rgba(255, 248, 220, 0.14), rgba(255, 248, 220, 0.14)),
        url("/img/logo/logo-bg-sm.png");
    background-size: 150%;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 126px;
}

.hero-subband {
    background:
        linear-gradient(90deg, rgba(255, 243, 200, 0.18), rgba(255, 243, 200, 0) 18%, rgba(255, 243, 200, 0) 82%, rgba(255, 243, 200, 0.18)),
        linear-gradient(180deg, #84bbe0 0%, #67abd0 50%, #568eae 100%);
    padding: 14px 20px 16px;
}

.hero-subtitle {
    max-width: 520px;
    margin: 0 auto;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 800;
    text-align: center;
}

.articlelist-content {
    max-width: 520px;
    margin: 0 auto;
    margin-top: 0;
}

.hero-activity-card {
    margin: 0 0 8px;
}

.home-activity-mount {
    width: 100%;
}

.loading-state,
.error-state,
.empty-state {
    padding: 34px 22px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--cream-card);
    box-shadow: var(--shadow);
    color: var(--text-secondary);
    text-align: center;
    font-size: 20px;
    line-height: 1.9;
}

.error-state {
    color: var(--danger);
}

.categories-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.adpanel-mount {
    display: block;
    width: 100%;
    min-height: 248px;
    margin-top: 14px;
    background: transparent;
}

.category-section {
    position: relative;
}

.category-toggle {
    width: 100%;
    min-height: 98px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background:
        radial-gradient(circle at 0 0, rgb(255 250 239), rgb(255 234 141 / 66%) 28%), linear-gradient(180deg, rgb(255 230 171 / 98%), rgba(246, 250, 252, 0.96));
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    appearance: none;
    box-shadow: var(--shadow);
}

.category-copy,
.category-side {
    display: flex;
    position: relative;
    z-index: 1;
}

.category-copy {
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.category-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
}

.category-note {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.category-side {
    flex: none;
    align-items: center;
    gap: 10px;
}

.category-count {
    min-width: 48px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--gold-line);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffeab7 0%, #f6cb74 100%);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
}

.category-chevron {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffeab7 0%, #f6cb74 100%);
    color: var(--accent-dark);
}

.category-chevron svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform 0.2s ease;
}

.category-section.is-open .category-chevron svg {
    transform: rotate(180deg);
}

.category-body {
    display: none;
    padding-top: 10px;
}

.category-section.is-open .category-body {
    display: block;
}

.category-inline-state {
    padding: 20px 18px;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: var(--cream-card);
    box-shadow: var(--shadow);
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.8;
}

.category-inline-state.is-error {
    color: var(--danger);
}

.inline-retry-btn,
.list-pagination-nav,
.list-pagination-page,
.article-dialog-btn {
    border: none;
    font-family: var(--font-body);
    cursor: pointer;
}

.inline-retry-btn {
    margin-top: 12px;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(247, 250, 252, 0.92));
    border: 1px solid var(--border-soft);
    color: var(--accent-dark);
    font-size: 16px;
    font-weight: 700;
}

.article-list,
.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-row,
.playlist-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(246, 203, 116, 0.18), rgba(246, 203, 116, 0) 30%),
        linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(247, 250, 252, 0.96));
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.article-row-thumb-wrap {
    width: 80px;
    height: 80px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0, rgba(255, 245, 208, 0.46), rgba(255, 245, 208, 0) 42%),
        linear-gradient(145deg, #8bc0de 0%, #67abd0 60%, #f6cb74 100%);
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

.playlist-row-thumb-wrap {
    width: 132px;
    height: 94px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0, rgba(255, 245, 208, 0.46), rgba(255, 245, 208, 0) 42%),
        linear-gradient(145deg, #8bc0de 0%, #67abd0 60%, #f6cb74 100%);
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

.article-row-thumb {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.playlist-row-thumb {
    width: 100%;
    height: 100%;
    display: block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.article-row-copy,
.playlist-row-copy {
    flex: 1;
    min-width: 0;
}

.article-row-title,
.playlist-row-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.5;
    font-weight: 700;
    overflow: hidden;
}

.article-row-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.playlist-row-title {
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.article-row-desc {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-row-action {
    flex: none;
    min-width: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--accent-dark);
    text-align: center;
}

.article-row-action-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 238, 190, 0.78), rgba(246, 203, 116, 0.9));
}

.article-row-action-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.article-row-action-text {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.playlist-row {
    align-items: stretch;
}

.playlist-row-top {
    min-width: 0;
}

.playlist-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.playlist-row-action {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(246, 203, 116, 0.92);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 42'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='21' y1='0' x2='21' y2='42' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23ffeab7'/%3E%3Cstop offset='1' stop-color='%23f6cb74'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='21' cy='21' r='21' fill='url(%23g)'/%3E%3Cpath d='M17 13.8l11.2 7.2L17 28.2V13.8z' fill='%2350819b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 42px 42px;
    box-shadow: 0 8px 20px rgba(246, 203, 116, 0.24);
}

.list-pagination {
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.list-pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-pagination-nav,
.list-pagination-page {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(247, 250, 252, 0.92));
    border: 1px solid var(--border-soft);
    color: var(--accent-dark);
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.list-pagination-page.is-active,
.list-pagination-page:disabled.is-active {
    background: linear-gradient(180deg, #78b3d5 0%, #5f9dc0 100%);
    color: #ffffff;
    border-color: transparent;
}

.list-pagination-nav:disabled,
.list-pagination-page:disabled {
    background: #d6d6d6;
    color: #8a8a8a;
    cursor: not-allowed;
}

.list-pagination-ellipsis,
.list-pagination-status {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.list-pagination-status {
    min-width: 92px;
    text-align: center;
}

.playlist-load-error {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f6dfd8;
    color: var(--danger);
    font-size: 16px;
    line-height: 1.7;
}

.article-dialog {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(29, 29, 31, 0.28);
}

.article-dialog.hidden {
    display: none;
}

.article-dialog-panel {
    width: min(440px, 92vw);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    background: var(--cream-card-strong);
    box-shadow: var(--shadow);
}

.article-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-soft);
}

.article-dialog-head strong {
    font-size: 24px;
    line-height: 1.3;
}

.article-dialog-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 238, 190, 0.78), rgba(246, 203, 116, 0.9));
    color: var(--accent-dark);
    font-size: 20px;
    cursor: pointer;
}

.article-dialog-body {
    padding: 20px 20px 10px;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.9;
}

.article-dialog-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 20px 20px;
}

.article-dialog-btn {
    padding: 12px 20px;
    border-radius: 999px;
    background: linear-gradient(180deg, #78b3d5 0%, #5f9dc0 100%);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
}

.category-toggle:focus-visible,
.inline-retry-btn:focus-visible,
.list-pagination-nav:focus-visible,
.list-pagination-page:focus-visible,
.article-row:focus-visible,
.playlist-row:focus-visible,
.article-dialog-close:focus-visible,
.article-dialog-btn:focus-visible {
    outline: 3px solid rgba(49, 86, 109, 0.6);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .page-shell {
        --page-gutter: 18px;
        padding-bottom: 52px;
    }
}

@media (max-width: 420px) {
    .page-shell {
        --page-gutter: 10px;
    }

    .hero-panel {
        margin-bottom: 8px;
    }

    .hero-main {
        min-height: 118px;
    }

    .hero-activity-card {
        margin-bottom: 8px;
    }

    .hero-subband {
        padding: 12px 16px 14px;
    }



    .hero-subtitle,
    .loading-state,
    .error-state,
    .empty-state {
        font-size: 18px;
    }

    .category-toggle {
        min-height: 92px;
        gap: 12px;
        padding: 16px;
        border-radius: 20px;
    }

    .category-title {
        font-size: 24px;
    }

    .category-note {
        font-size: 15px;
    }

    .category-count {
        min-width: 44px;
        height: 38px;
        font-size: 16px;
    }

    .article-row,
    .playlist-row {
        gap: 12px;
        padding: 12px;
        border-radius: 18px;
    }

    .article-row-thumb-wrap {
        width: 68px;
        height: 68px;
        border-radius: 16px;
    }

    .playlist-row-thumb-wrap {
        width: 104px;
        height: 80px;
        border-radius: 16px;
    }

    .article-row-title,
    .playlist-row-title {
        font-size: 20px;
    }

    .article-row-desc {
        font-size: 16px;
    }

    .article-row-action {
        min-width: 68px;
    }

    .article-row-action-text,
    .playlist-row-meta,
    .playlist-row-action,
    .list-pagination-nav,
    .list-pagination-page,
    .list-pagination-status {
        font-size: 15px;
    }

    .list-pagination {
        gap: 8px;
    }

    .list-pagination-pages {
        gap: 6px;
    }

    .playlist-row-action {
        width: 38px;
        height: 38px;
        background-size: 38px 38px;
    }
}
