:root {
    --red: #ef2f45;
    --green: #24c56b;
    --text: #27272a;
    --muted: #8b8b92;
    --soft: #f3f3f4;
    --line: #ececef;
    --gold: #c59642;
}

* {
    box-sizing: border-box;
}

html {
    background: #e9e9ea;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #e9e9ea;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: 0;
    font: inherit;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

.mobile-shell {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: #f1f1f2;
    overflow: hidden;
}

.profile-hero {
    min-height: 178px;
    padding: 30px 16px 56px;
    background:
        linear-gradient(110deg, rgba(255, 229, 189, .92), rgba(255, 246, 223, .68)),
        var(--cover-image) center / cover no-repeat;
}

.profile-row,
.detail-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.profile-main {
    min-width: 0;
    flex: 1;
}

.profile-main h1 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.profile-main p {
    margin: 0;
    color: #77716b;
    font-size: 15px;
    line-height: 1.5;
}

.follow-pill {
    flex: 0 0 auto;
    min-width: 86px;
    padding: 8px 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    color: #333;
    text-align: center;
    font-size: 16px;
}

.action-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: -38px 16px 0;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(40, 40, 40, .05);
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 78px;
    background: #fff;
    color: #2b2b2f;
    font-size: 18px;
    font-weight: 600;
}

.action-button + .action-button {
    border-left: 1px solid var(--line);
}

.action-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    object-fit: contain;
}

.main-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    height: 78px;
    background: #f1f1f2;
    padding: 0 52px;
}

.main-tabs a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    color: #aaa;
    font-size: 22px;
    font-weight: 500;
}

.main-tabs a.active {
    color: #222;
}

.main-tabs a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 9px;
    width: 58px;
    height: 4px;
    border-radius: 4px;
    background: var(--red);
    transform: translateX(-50%);
}

.list-head,
.content-block {
    padding: 0 14px;
}

.pull-refresh {
    height: 34px;
    margin: -10px 14px 8px;
    color: #9a9aa0;
    text-align: center;
    font-size: 14px;
    line-height: 34px;
    transition: transform .18s ease;
}

.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    color: #6f6f76;
    font-size: 15px;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: -3px;
    border: 2px solid #3b3b3f;
    border-radius: 4px;
    background: linear-gradient(#3b3b3f, #3b3b3f) 3px 5px / 8px 2px no-repeat;
}

.state-switch {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    min-width: 126px;
    padding: 2px;
    border: 1px solid #dedee1;
    border-radius: 22px;
    background: #f5f5f6;
}

.state-switch a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 20px;
    color: #8b8b90;
    font-size: 15px;
}

.state-switch a.active {
    background: var(--red);
    color: #fff;
}

.category-filter {
    margin: 0 14px 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff8e8;
    color: #9b6a25;
    font-size: 14px;
}

.category-filter a {
    float: right;
    color: var(--red);
}

.article-list {
    padding: 0 14px 8px;
}

.article-card {
    display: block;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}

.article-meta {
    padding: 18px 20px 8px;
    color: #9c9ca3;
    font-size: 14px;
}

.article-summary-box {
    position: relative;
    display: grid;
    gap: 6px;
    margin: 0 20px 12px;
    padding: 13px 38px 13px 14px;
    border-radius: 4px;
    background: #f5f5f6;
}

.article-summary-box strong {
    overflow: hidden;
    color: #3d3d42;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-summary-box span {
    overflow: hidden;
    color: #88888f;
    font-size: 15px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-summary-box i {
    position: absolute;
    top: 50%;
    right: 16px;
    color: #aaa;
    font-style: normal;
    font-size: 28px;
    transform: translateY(-50%);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 0 20px;
    border-top: 1px solid #f0f0f0;
}

.top-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    background: #ff6537;
    color: #fff;
    font-size: 13px;
}

.muted-status {
    color: #9b9ba1;
    font-size: 14px;
}

.read-link {
    color: #d52f42;
    font-size: 16px;
    font-weight: 700;
}

.page-bottom-text,
.empty-state,
.load-more {
    padding: 20px 0 40px;
    color: #9c9ca3;
    text-align: center;
    font-size: 15px;
}

.load-more {
    padding-top: 8px;
}

.album-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.album-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 0 18px;
    border-radius: 8px;
    background: #fff;
}

.album-item span {
    font-size: 17px;
    font-weight: 600;
}

.album-item small {
    color: #999;
    font-size: 14px;
}

.detail-profile {
    padding: 30px 16px 26px;
    background: #fff;
}

.detail-article {
    padding: 30px 24px 28px;
    background: #fff;
}

.detail-article h2 {
    margin: 0;
    color: #26262a;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.45;
}

.detail-time {
    margin-top: 20px;
    color: #8e8e96;
    font-size: 16px;
}

.summary-pill {
    margin-top: 18px;
    padding: 15px 18px;
    border-radius: 4px;
    background: #f5f5f6;
    color: #64646b;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

.article-cover {
    display: block;
    width: 100%;
    max-height: 260px;
    margin: 22px 0 0;
    border-radius: 8px;
    object-fit: cover;
}

.article-body {
    margin-top: 26px;
    color: #333338;
    font-size: 17px;
    line-height: 1.9;
    word-break: break-word;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.disclaimer {
    margin-top: 36px;
    color: #99999f;
    font-size: 14px;
    line-height: 1.8;
}

.contact-notice {
    position: fixed;
    right: max(0px, calc((100vw - 480px) / 2));
    bottom: 76px;
    left: max(0px, calc((100vw - 480px) / 2));
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 480px;
    margin: 0 auto;
    padding: 8px 18px;
    background: #fff7dc;
    color: #b18438;
    font-size: 14px;
}

.contact-notice button {
    background: transparent;
    color: #b18438;
    font-size: 22px;
}

.detail-contact-bar {
    position: fixed;
    right: max(0px, calc((100vw - 480px) / 2));
    bottom: 0;
    left: max(0px, calc((100vw - 480px) / 2));
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 480px;
    min-height: 76px;
    margin: 0 auto;
    padding: 10px 22px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .06);
}

.detail-contact-bar strong {
    display: block;
    color: #d92d40;
    font-size: 22px;
    line-height: 1.1;
}

.detail-contact-bar span {
    display: block;
    margin-top: 6px;
    color: #96969c;
    font-size: 13px;
}

.detail-contact-bar button {
    min-width: 138px;
    height: 52px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ff3838, #f42b58);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.bottom-safe-space {
    height: 130px;
}

.qr-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .45);
}

.qr-overlay[hidden] {
    display: none;
}

.qr-sheet {
    position: relative;
    width: min(320px, 92vw);
    padding: 28px 24px 24px;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.qr-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: transparent;
    color: #999;
    font-size: 28px;
}

.qr-title {
    color: #2c2c31;
    font-size: 20px;
    font-weight: 700;
}

.qr-name {
    min-height: 20px;
    margin-top: 8px;
    color: #777;
    font-size: 14px;
}

.qr-image-wrap {
    width: 210px;
    height: 210px;
    margin: 22px auto 16px;
    padding: 10px;
    border: 1px solid #eeeeef;
    border-radius: 6px;
    background: #fff;
}

.qr-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-tip {
    color: #999;
    font-size: 14px;
}

.not-found {
    min-height: 100vh;
    padding: 120px 24px;
    background: #fff;
    text-align: center;
}

.not-found h1 {
    margin: 0 0 12px;
    font-size: 24px;
}

.not-found p {
    color: #888;
}

.not-found a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 40px;
    margin-top: 18px;
    border-radius: 20px;
    background: var(--red);
    color: #fff;
}

@media (max-width: 360px) {
    .action-button {
        gap: 8px;
        font-size: 16px;
    }

    .profile-main h1 {
        font-size: 18px;
    }

    .follow-pill {
        min-width: 76px;
        font-size: 14px;
    }

    .main-tabs {
        padding: 0 36px;
    }

    .detail-contact-bar {
        padding-right: 16px;
        padding-left: 16px;
    }

    .detail-contact-bar button {
        min-width: 124px;
        font-size: 16px;
    }
}
