* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #f4f4f4; color: #333; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button { font: inherit; }
.page { width: 100%; max-width: 525px; min-height: 100vh; margin: 0 auto; background: #fff; }
.page.activity-loading { visibility: hidden; }

/* Activity header */
.hero { position: relative; max-height: 50vh; overflow: hidden; background: #07162b; }
.hero-image-scroll { width: 100%; max-height: 50vh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hero-image-scroll::-webkit-scrollbar { display: none; }
.hero-image { display: block; width: 100%; height: auto; }
.hero-actions { position: absolute; top: 48px; right: 25px; display: flex; flex-direction: column; gap: 10px; }
.hero-btn { display: grid; place-items: center; width: 76px; height: 37px; padding: 0; border: 0; border-radius: 20px; color: #fff; background: rgba(0, 0, 0, .8); font-size: 16px; text-decoration: none; cursor: pointer; }
.hero-btn[aria-disabled="true"] { cursor: default; opacity: .72; }
.event-time { position: relative; height: 67px; margin-top: -1px; padding: 25px 27px 0; border: 0; border-radius: 27px 27px 0 0; color: #555; background: #fff; font-size: 17px; }
.channel-nav { display: flex; align-items: center; gap: 11px; height: 62px; padding: 0 21px 10px; overflow-x: auto; overflow-y: hidden; background: #fff; scrollbar-width: none; cursor: grab; user-select: none; touch-action: pan-x; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.channel-nav.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.channel-nav::-webkit-scrollbar { display: none; }
.channel-loading { color: #999; font-size: 13px; }
.pill { flex: 0 0 auto; height: 43px; padding: 0 27px; border: 1px solid #ddd; border-radius: 23px; color: #666; background: #fff; font-size: 16px; cursor: pointer; white-space: nowrap; }
.pill.active { position: relative; border-color: #4793f1; color: #fff; background: #4793f1; }
.pill.active::after { content: ""; position: absolute; bottom: -7px; left: 50%; width: 0; height: 0; border-top: 8px solid #4793f1; border-right: 7px solid transparent; border-left: 7px solid transparent; transform: translateX(-50%); }

/* Shared sections */
.section { margin-top: 0; padding: 0 27px; background: #fff; }
.section-title { margin: 0; font-size: 18px; line-height: 28px; font-weight: 650; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.featured-section .section-title, .posts-section .section-title { position: relative; padding-left: 17px; font-size: 21px; line-height: 30px; }
.featured-section .section-title::before, .posts-section .section-title::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 5px; background: #4793f1; }
.empty-data { width: 100%; padding: 36px 15px; color: #999; text-align: center; font-size: 14px; }

/* Current track */
.track-section { margin: 0 22px 25px; padding: 20px 25px 26px; border-radius: 14px; background: #f7f7f7; }
.track-section .section-title { margin-bottom: 8px; font-size: 21px; line-height: 30px; }
.intro { margin: 0 0 15px; color: #555; font-size: 17px; line-height: 29px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 18px; }
.stat { padding: 6px 18px; border-radius: 18px; color: #888; background: #eee; font-size: 14px; }
.submit-wrap { position: relative; }
.submit { width: 100%; height: 50px; border: 0; border-radius: 26px; color: #fff; background: #4793f1; font-size: 18px; font-weight: 600; cursor: pointer; }
.submit:not(:disabled) { background: transparent url("https://css.tgb.cn/images/newactivity/sendBtn1.png") center / 100% 124% no-repeat; }
.submit:disabled { color: #999; background: #e5e6e8; cursor: not-allowed; }
.submit-type-menu { position: absolute; top: calc(100% + 9px); right: 7%; left: 7%; z-index: 20; padding: 12px 0; border: 1px solid #eee; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.submit-type-menu[hidden] { display: none; }
.submit-type-menu button { display: block; width: 100%; height: 48px; padding: 0; border: 0; color: #222; background: #fff; font-size: 17px; cursor: pointer; }
.submit-type-menu button:hover { background: #f5f8fc; }

/* Authors */
.author { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; }
.author-link { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.avatar-wrap { position: relative; flex: 0 0 32px; width: 32px; height: 32px; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: #11877c; object-fit: cover; font-size: 13px; font-weight: 600; }
.avatar.blue { background: #4793f1; }
.user-badge { position: absolute; right: -2px; bottom: -2px; width: 15px; height: 15px; object-fit: contain; }
.author-follow { flex: 0 0 auto; min-width: 50px; height: 25px; padding: 0 9px; border: 1px solid #4793f1; border-radius: 4px; color: #4793f1; background: #fff; font-size: 16px; cursor: pointer; }

/* Featured posts */
.featured-section { padding-bottom: 25px; }
.change { padding: 7px 11px; border: 0; border-radius: 14px; color: #999; background: transparent; font-size: 15px; cursor: pointer; }
.change::before { content: ""; display: inline-block; width: 22px; height: 22px; margin-right: 6px; background: url("https://css.tgb.cn/images/newactivity/reload.png") center / contain no-repeat; vertical-align: -6px; }
.change:disabled { color: #aaa; background: #f3f3f3; cursor: not-allowed; }
.featured-grid { display: grid; grid-template-columns: 1fr; gap: 13px; overflow: visible; border: 0; }
.featured-grid .empty-data { grid-column: 1 / -1; }
.feature { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 182px; margin: 0; padding: 13px 16px 12px; overflow: hidden; border: 0; border-radius: 12px; background: #f8f8f8; }
.feature::after { content: ""; position: absolute; top: 0; right: 0; z-index: 0; width: 80px; height: 72px; background: url("https://css.tgb.cn/images/newactivity/zan.png") top right / contain no-repeat; pointer-events: none; }
.feature > * { position: relative; z-index: 1; }
.feature .author { height: 33px; font-size: 16px; }
.feature .avatar-wrap, .feature .avatar { width: 30px; height: 30px; flex-basis: 30px; }
.feature .author-follow { min-width: auto; height: auto; padding: 0 0 0 10px; border: 0; color: #4793f1; background: transparent; font-size: 16px; }
.feature .author-follow::before { content: "+"; }
.feature > .post-link { flex: 1; min-width: 0; }
.feature.has-media > .post-link { display: grid; grid-template-columns: minmax(0, 1fr) 134px; gap: 13px; align-items: start; }
.feature-title { height: auto; min-height: 0; margin: 9px 0 3px; overflow: hidden; color: #25272b; font-size: 18px; line-height: 27px; font-weight: 650; }
.feature-body { display: -webkit-box; margin: 9px 0 3px; overflow: hidden; color: #555; font-size: 16px; line-height: 28px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.feature-image { display: block; width: 100%; height: 92px; margin: 7px 0 8px; border-radius: 4px; object-fit: cover; }
.feature.has-media .feature-title, .feature.has-media .feature-body { grid-column: 1; grid-row: 1; }
.feature.has-media .feature-image, .feature.has-media .feature-video { grid-column: 2; grid-row: 1; width: 134px; height: 90px; margin: 10px 0 0; }
.feature-video { position: relative; height: 92px; margin: 7px 0 8px; overflow: hidden; border-radius: 4px; background: #222; }
.feature-video .feature-image { height: 100%; margin: 0; border-radius: 0; }
.feature-video-play { position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; object-fit: contain; transform: translate(-50%, -50%); }
.feature-video-duration { position: absolute; right: 6px; bottom: 5px; padding: 1px 5px; border-radius: 3px; color: #fff; background: rgba(0, 0, 0, .65); font-size: 11px; line-height: 17px; }
.feature-foot, .post-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; color: #aaa; font-size: 14px; }
.feature-foot { padding-top: 0; }
.like { min-width: 54px; height: 29px; border: 0; border-radius: 15px; color: #fff; background: #4793f1; cursor: pointer; }
.feature-like { min-width: 76px; height: 36px; border-radius: 19px; background: #4793f1; font-size: 15px; }

/* All posts */
.list-section { padding-bottom: 0; }
.posts-section { margin-top: 0; padding-top: 25px; border-top: 10px solid #f4f4f4; }
.posts-section .section-head { margin-bottom: 17px; }
.count { color: #aaa; font-size: 14px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; border: 0; }
.tab { position: relative; height: 44px; border: 0; border-radius: 23px; color: #777; background: #eee; font-size: 16px; cursor: pointer; }
.tab.active { color: #fff; background: #4793f1; }
.post { padding: 22px 3px; border-bottom: 1px solid #e2e2e2; }
.post-meta { display: flex; align-items: center; gap: 9px; font-size: 16px;margin-bottom: 12px; }
.post-meta .avatar-wrap, .post-meta .avatar { width: 32px; height: 32px; flex-basis: 32px; }
.post-meta .author-follow { border: 0; color: #4793f1; background: transparent; }
.post-meta .author-follow::before { content: "+"; }
.post-time { display: none; margin-left: auto; color: #999; font-size: 12px; }
.post-title { margin: 0 0 8px; color: #25272b; font-size: 19px; line-height: 29px; font-weight: 700; }
.feature-title.is-read, .post-title.is-read { color: #999; font-weight: 800; }
.feature-body.is-read, .excerpt.is-read, .ranking-content.is-read { color: #999; }
.post-row { display: flex; align-items: flex-start; gap: 12px; }
.post-link > .post-row:first-child { margin-top: 15px; }
.post-video-row { justify-content: flex-end; }
.excerpt { flex: 1; margin: 0; color: #777; font-size: 17px; line-height: 29px; }
.post-image, .post-video { flex: 0 0 150px; width: 150px; height: 100px; }
.post-image { border-radius: 7px; object-fit: cover; }
.post-video { margin: 0; }
.posts-section .metrics { min-width: 0; word-spacing: 0; font-size: 16px; }
.metrics, .metrics .like-count { font-weight: 400; }
.post-link { color: inherit; text-decoration: none; }
.post-like { min-width: 84px; height: 36px; border-radius: 19px; background: #4793f1; font-size: 15px; }
.post-pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 0; color: #777; font-size: 13px; }
.post-pager button { min-width: 68px; height: 32px; border: 1px solid #ddd; border-radius: 4px; color: #555; background: #fff; cursor: pointer; }
.post-pager button:disabled { color: #bbb; background: #f5f5f5; cursor: not-allowed; }

/* Ranking */
.ranking-list { display: grid; gap: 12px; margin: 20px 0 0; }
.ranking-post { display: grid; grid-template-columns: 68px minmax(0, 1fr); height: 88px; min-height: 88px; overflow: hidden; border: 4px solid #f5f5f5; border-radius: 10px; background: #fff; }
.ranking-side { display: flex; align-items: center; justify-content: center; padding: 4px 2px; background: #f6f6f6; }
.ranking-medal { width: 52px; height: 58px; object-fit: contain; }
.ranking-number { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: #ccc; font-size: 22px; font-weight: 600; }
.ranking-main { display: flex; flex-direction: column; min-width: 0; padding: 9px 14px 8px 16px; }
.ranking-title { display: block; margin: 0; overflow: hidden; color: #333; font-size: 18px; line-height: 27px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ranking-content { font-weight: 400; }
.ranking-title.is-read { color: #999; font-weight: 800; }
.ranking-title.ranking-content.is-read { font-weight: 400; }
.ranking-author { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: auto; color: #444; font-size: 15px; }
.ranking-author-name { flex: 0 1 auto; min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-author-like { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 4px; margin-left: auto; color: #aaa; font-size: 13px; font-weight: 400; white-space: nowrap; }
.ranking-author-like img { width: 13px; height: 12px; object-fit: contain; opacity: .65; }
.ranking-author .author-follow { min-width: auto; height: auto; padding: 0; border: 0; color: #4793f1; background: transparent; font-size: 15px; }
.ranking-author .author-follow::before { content: "+"; }
.ranking-avatar .avatar-wrap, .ranking-avatar .avatar { width: 25px; height: 25px; flex-basis: 25px; }
.ranking-1 { border-color: #fff5d9; }
.ranking-1 .ranking-side { background: #fff9e9; }
.ranking-2 { border-color: #e7f3fc; }
.ranking-2 .ranking-side { background: #eef7ff; }
.ranking-3 { border-color: #ffebe2; }
.ranking-3 .ranking-side { background: #fff0e9; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; padding: 9px 17px; border-radius: 18px; color: #fff; background: rgba(0, 0, 0, .76); font-size: 13px; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }

/* Follow verification */
.follow-verify-mask { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .48); }
.follow-verify-mask[hidden] { display: none; }
.follow-verify-dialog { position: relative; width: 100%; max-width: 390px; padding: 28px 28px 24px; border-radius: 8px; background: #fff; box-shadow: 0 14px 42px rgba(0, 0, 0, .22); }
.follow-verify-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; padding: 0; border: 0; color: #999; background: transparent; font-size: 26px; line-height: 30px; cursor: pointer; }
.follow-verify-title { margin: 0 0 24px; color: #222; font-size: 20px; line-height: 28px; text-align: center; }
.follow-verify-field { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 14px; color: #555; font-size: 15px; }
.follow-verify-field input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #ddd; border-radius: 4px; color: #333; background: #fff; outline: none; }
.follow-verify-field input:focus { border-color: #4793f1; box-shadow: 0 0 0 2px rgba(71, 147, 241, .12); }
.follow-verify-field input:disabled { color: #777; background: #f5f5f5; }
.follow-verify-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; margin-top: 24px; }
.follow-verify-actions button { height: 42px; border-radius: 5px; font-size: 15px; cursor: pointer; }
.follow-verify-cancel { border: 1px solid #ddd; color: #555; background: #fff; }
.follow-verify-submit { border: 1px solid #4793f1; color: #fff; background: #4793f1; }
.follow-verify-submit:disabled { border-color: #b9d5f8; background: #b9d5f8; cursor: not-allowed; }

@media (max-width: 360px) {
    .channel-nav { gap: 6px; }
    .pill { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 390px) {
    .event-time { padding-right: 21px; padding-left: 21px; font-size: 15px; }
    .track-section { margin-right: 16px; margin-left: 16px; padding-right: 20px; padding-left: 20px; }
    .section { padding-right: 21px; padding-left: 21px; }
    .feature.has-media > .post-link { grid-template-columns: minmax(0, 1fr) 112px; }
    .feature.has-media .feature-image, .feature.has-media .feature-video { width: 112px; height: 76px; }
    .tabs { gap: 12px; }
    .post-image, .post-video { flex-basis: 112px; width: 112px; height: 76px; }
    .ranking-list { gap: 10px; margin-top: 12px; }
    .ranking-post { grid-template-columns: 58px minmax(0, 1fr); height: 82px; min-height: 82px; border-width: 3px; border-radius: 7px; }
    .ranking-side { padding: 5px 2px; }
    .ranking-main { padding: 8px 10px 6px 12px; }
    .ranking-medal { width: 45px; height: 50px; }
    .ranking-number { width: 30px; height: 30px; font-size: 18px; }
    .ranking-title { font-size: 16px; line-height: 22px; }
    .ranking-author { gap: 6px; font-size: 14px; }
    .ranking-author-name { max-width: 38%; }
    .ranking-author-like { font-size: 12px; }
    .ranking-author .author-follow { font-size: 13px; }
    .ranking-avatar .avatar-wrap, .ranking-avatar .avatar { width: 23px; height: 23px; flex-basis: 23px; }
}
