:root {
    --wechat-green: #07c160;
    --wechat-blue: #576b95;
    --text-primary: #191919;
    --text-regular: #3f3f3f;
    --text-secondary: #8c8c8c;
    --line: #e5e5e5;
    --surface-soft: #f7f7f7;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    background: #fff;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }

.wechat-article {
    width: min(100%, 677px);
    margin: 0 auto;
    padding: 34px 20px 154px;
}
.article-header h1 {
    margin: 0 0 15px;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: .02em;
    overflow-wrap: anywhere;
}
.article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 10px;
    margin-bottom: 28px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}
.publisher-link { color: var(--wechat-blue); }
.listen-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--wechat-blue);
    cursor: pointer;
}
.listen-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}
.listen-button:hover { color: #40577f; }

.voice-player {
    position: fixed;
    top: max(18px, env(safe-area-inset-top));
    left: max(8px, calc((100vw - 677px) / 2 + 8px));
    z-index: 50;
    display: flex;
    width: 54px;
    min-height: 66px;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    padding: 10px 6px;
    border: 1px solid rgba(0, 0, 0, .04);
    border-radius: 16px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
    opacity: 0;
    pointer-events: none;
    transform: translate(-12px, -8px);
    transition: width .28s cubic-bezier(.2, .75, .25, 1), padding .28s ease, opacity .2s ease, transform .28s cubic-bezier(.2, .75, .25, 1);
    white-space: nowrap;
}
.voice-player[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, 0);
}
.voice-player[data-expanded="true"] {
    width: min(calc(100vw - 32px), 620px);
    padding: 10px 14px;
}
.voice-note-button,
.voice-player-button {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.voice-note-button {
    width: 40px;
    height: 40px;
    color: var(--wechat-green);
    font-size: 34px;
    line-height: 1;
    outline: none;
}
.voice-note-button:focus-visible { outline: 2px solid var(--wechat-blue); outline-offset: 1px; border-radius: 7px; }
.voice-player-copy {
    min-width: 0;
    flex: 1;
}
.voice-player-copy,
.voice-player-button {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: opacity .16s ease, transform .22s ease;
    visibility: hidden;
}
.voice-player[data-expanded="true"] .voice-player-copy,
.voice-player[data-expanded="true"] .voice-player-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: .08s;
    visibility: visible;
}
.voice-player-copy strong,
.voice-player-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.voice-player-copy strong { font-size: 15px; font-weight: 500; }
.voice-player-copy span { margin-top: 3px; color: var(--text-secondary); font-size: 12px; }
.voice-player-button {
    width: 38px;
    height: 38px;
    color: #555;
    font-size: 22px;
}
.voice-close-button { font-size: 30px; font-weight: 300; }
.voice-icon-play { display: none; font-size: 17px; }
.voice-player[data-state="paused"] .voice-icon-play { display: inline; }
.voice-player[data-state="paused"] .voice-icon-pause { display: none; }
.voice-player-backdrop {
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(0, 0, 0, .18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.voice-player-backdrop[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.rich-content {
    min-height: 180px;
    color: var(--text-regular);
    font-size: 17px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.rich-content > :first-child { margin-top: 0 !important; }
.rich-content > :last-child { margin-bottom: 0 !important; }
.rich-content p { margin: 1em 0; }
.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
    margin: 1.65em 0 .7em;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.55;
}
.rich-content h1 { font-size: 1.45em; }
.rich-content h2 { font-size: 1.25em; }
.rich-content h3 { font-size: 1.1em; }
.rich-content ul,
.rich-content ol { padding-left: 1.7em; }
.rich-content li { margin: .42em 0; }
.rich-content blockquote {
    margin: 1.2em 0;
    padding: 12px 16px;
    border-left: 3px solid #d8d8d8;
    background: var(--surface-soft);
    color: #666;
}
.rich-content img { height: auto !important; max-width: 100% !important; vertical-align: middle; }
.rich-content video,
.rich-content iframe { max-width: 100%; }
.rich-content a { color: var(--wechat-blue); }

.related-articles { margin-top: 38px; border-top: 1px solid var(--line); }
.related-articles h2 { margin: 20px 0 8px; font-size: 17px; font-weight: 600; }
.related-list a {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    color: var(--wechat-blue);
    font-size: 16px;
    line-height: 1.55;
}
.related-list a:hover { color: #40577f; }
.related-icon { flex: 0 0 auto; font-size: 18px; line-height: 1.4; }
.article-read-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 54px;
    padding-bottom: 30px;
    color: #b2b2b2;
    font-size: 15px;
}
.account-actions {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 30;
    display: flex;
    width: min(100%, 677px);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -5px 18px rgba(0, 0, 0, .06);
    transform: translateX(-50%);
}
.account-identity,
.list-account-inner,
.account-title-line { display: flex; align-items: center; }
.account-identity { min-width: 0; gap: 10px; }
.account-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid #ececec;
    border-radius: 50%;
    background: var(--surface-soft);
    object-fit: cover;
}
.account-name {
    max-width: 220px;
    overflow: hidden;
    font-size: 17px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.verified-badge {
    display: inline-grid;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    place-items: center;
    border-radius: 50%;
    background: #1683e8;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.action-buttons { display: flex; align-items: center; gap: 20px; }
.action-button {
    display: grid;
    min-width: 42px;
    place-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
}
.action-button svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    transition: transform .18s ease;
}
.action-button span { min-height: 20px; font-size: 15px; }
.action-button:hover svg { transform: translateY(-2px); }
.action-button.is-active { color: var(--wechat-green); }
.action-button.is-loading { cursor: wait; opacity: .55; }
.wechat-share-guide {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(126px, calc(env(safe-area-inset-top) + 104px)) 28px 28px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.wechat-share-guide[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.wechat-share-guide-close {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    left: 20px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 50%;
    background: rgba(0, 0, 0, .16);
    color: #fff;
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
}
.wechat-share-guide-arrow {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    right: 12px;
    width: 105px;
    height: 105px;
    fill: none;
    stroke: #fff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 5;
}
.wechat-share-guide-copy {
    width: min(100%, 430px);
    padding: 20px 22px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    background: rgba(0, 0, 0, .25);
    text-align: center;
}
.wechat-share-guide-copy strong,
.wechat-share-guide-copy span { display: block; }
.wechat-share-guide-copy strong { font-size: 20px; font-weight: 600; }
.wechat-share-guide-copy span { margin-top: 10px; color: rgba(255, 255, 255, .88); font-size: 15px; line-height: 1.7; }
.article-toast {
    position: fixed;
    right: 50%;
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 60;
    padding: 10px 16px;
    border-radius: 7px;
    background: rgba(0, 0, 0, .76);
    color: #fff;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translate(50%, 12px);
    transition: opacity .2s ease, transform .2s ease;
}
.article-toast.is-visible { opacity: 1; transform: translate(50%, 0); }

.article-list-page { background: #f5f5f5; }
.list-account-header { background: #fff; border-bottom: 1px solid #ededed; }
.list-account-inner {
    width: min(100%, 880px);
    min-height: 132px;
    gap: 18px;
    margin: 0 auto;
    padding: 28px 22px;
}
.account-avatar-large { width: 66px; height: 66px; flex-basis: 66px; }
.account-copy { min-width: 0; }
.account-title-line { gap: 8px; }
.account-title-line h1 { margin: 0; font-size: 24px; font-weight: 600; }
.account-copy p { margin: 8px 0 0; color: var(--text-secondary); font-size: 14px; }
.list-shell {
    width: min(calc(100% - 28px), 880px);
    margin: 18px auto 0;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
}
.category-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
    position: relative;
    flex: 0 0 auto;
    padding: 17px 14px 15px;
    color: #666;
    font-size: 15px;
}
.category-tab::after {
    position: absolute;
    right: 14px;
    bottom: -1px;
    left: 14px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--wechat-green);
    content: "";
    opacity: 0;
}
.category-tab.is-active { color: var(--text-primary); font-weight: 600; }
.category-tab.is-active::after { opacity: 1; }
.article-list { padding: 0 20px; }
.article-list-item {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 154px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}
.article-list-item:last-child { border-bottom: 0; }
.article-list-copy { min-width: 0; flex: 1; }
.article-list-category { margin-bottom: 8px; color: var(--wechat-green); font-size: 13px; }
.article-list-copy h2 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.article-list-copy p {
    display: -webkit-box;
    margin: 8px 0 10px;
    overflow: hidden;
    color: #777;
    font-size: 14px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.article-list-meta { display: flex; gap: 14px; color: #aaa; font-size: 12px; }
.article-list-cover {
    width: 180px;
    height: 112px;
    flex: 0 0 180px;
    border-radius: 5px;
    object-fit: cover;
}
.article-list-item:hover h2 { color: var(--wechat-blue); }
.empty-state { padding: 74px 20px; text-align: center; }
.empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    place-items: center;
    border-radius: 50%;
    background: #edf8f2;
    color: var(--wechat-green);
    font-size: 20px;
}
.empty-state h2 { margin: 0; font-size: 17px; }
.empty-state p { margin: 8px 0 0; color: var(--text-secondary); font-size: 14px; }
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    padding: 25px 20px;
    border-top: 1px solid var(--line);
}
.pagination a {
    display: grid;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: #666;
    font-size: 13px;
}
.pagination a.is-active { border-color: var(--wechat-green); background: var(--wechat-green); color: #fff; }
.site-footer { padding: 28px 16px 40px; color: #aaa; font-size: 12px; text-align: center; }

@media (max-width: 640px) {
    .wechat-article { padding: 22px 20px 132px; }
    .article-header h1 { font-size: 22px; }
    .article-byline { margin-bottom: 24px; font-size: 14px; }
    .rich-content { font-size: 17px; line-height: 1.85; }
    .article-read-line { margin-top: 44px; }
    .account-actions { align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
    .account-identity { flex: 1 1 auto; gap: 8px; min-width: 0; }
    .account-identity .account-avatar { width: 40px; height: 40px; flex-basis: 40px; }
    .account-identity .account-name { min-width: 0; max-width: none; font-size: 15px; }
    .action-buttons { flex: 0 0 auto; gap: 12px; }
    .action-button { min-width: 34px; gap: 3px; }
    .action-button svg { width: 25px; height: 25px; }
    .action-button span { font-size: 14px; }
    .voice-player { top: max(12px, env(safe-area-inset-top)); left: 6px; width: 44px; gap: 6px; min-height: 50px; padding: 6px; border-radius: 13px; }
    .voice-player[data-expanded="true"] { width: min(calc(100vw - 88px), 620px); padding: 6px 8px; }
    .voice-note-button { width: 32px; height: 32px; font-size: 27px; }
    .voice-note-button:focus-visible { outline: none; }
    .voice-player-copy strong { font-size: 14px; }
    .voice-player-copy span { display: none; }
    .voice-player-button { width: 30px; height: 30px; font-size: 20px; }
    .voice-close-button { font-size: 27px; }
    .list-account-inner { min-height: 112px; padding: 22px 18px; }
    .account-avatar-large { width: 58px; height: 58px; flex-basis: 58px; }
    .account-title-line h1 { font-size: 20px; }
    .account-copy p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .list-shell { width: 100%; margin-top: 10px; border-radius: 0; }
    .category-tabs { padding: 0 10px; }
    .article-list { padding: 0 16px; }
    .article-list-item { gap: 13px; min-height: 126px; padding: 18px 0; }
    .article-list-copy h2 { font-size: 17px; }
    .article-list-copy p { display: none; }
    .article-list-cover { width: 112px; height: 76px; flex-basis: 112px; }
    .article-list-meta { flex-direction: column; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
