:root {
    --bg-wine: #651221;
    --bg-wine-deep: #2d0710;
    --bg-ivory: #fffaf2;
    --card-bg: rgba(255, 250, 242, 0.92);
    --card-border: rgba(162, 107, 51, 0.18);
    --text-main: #2d2118;
    --text-muted: #7d6a58;
    --accent-gold: #c79a56;
    --accent-red: #bc3646;
    --success: #2f8f63;
    --shadow-soft: 0 18px 48px rgba(34, 12, 8, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text-main);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background:
        radial-gradient(circle at top, rgba(255, 210, 150, 0.18), transparent 32%),
        linear-gradient(180deg, #7c1627 0%, #4a0d18 28%, #f6efe3 28%, #f6efe3 100%);
}

button,
input,
textarea,
select {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
}

.page-shell.page-shell--message {
    background: #f5f5f5;
}

.app-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 24px 18px 120px;
}

.surface-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.surface-card h2,
.surface-card h3,
.surface-card strong {
    letter-spacing: 0.02em;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
}

.btn-primary {
    padding: 14px 22px;
    color: #fff9f0;
    background: linear-gradient(135deg, #c8454d, #8f182a);
    font-weight: 600;
}

.btn-secondary {
    padding: 13px 20px;
    color: var(--text-main);
    background: linear-gradient(135deg, #f4e6ca, #e8d2a5);
    font-weight: 600;
}

.btn-ghost {
    padding: 13px 20px;
    color: var(--text-main);
    background: rgba(255, 250, 242, 0.68);
    border: 1px solid rgba(125, 106, 88, 0.2);
    font-weight: 600;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 248, 237, 0.88);
    color: var(--text-main);
    border: 1px solid rgba(199, 154, 86, 0.2);
    font-size: 13px;
    font-weight: 600;
}

.chip.is-active {
    color: #fff9f0;
    background: linear-gradient(135deg, #b53a48, #7d1323);
}

.field,
.textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(125, 106, 88, 0.18);
    background: rgba(255, 253, 248, 0.94);
    color: var(--text-main);
    font: inherit;
}

.field {
    padding: 14px 16px;
}

.textarea {
    min-height: 132px;
    padding: 14px 16px;
    resize: vertical;
}

.state-empty,
.state-loading,
.state-success {
    padding: 28px 22px;
    text-align: center;
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    background: rgba(255, 251, 246, 0.88);
    border: 1px dashed rgba(125, 106, 88, 0.22);
}

@media (max-width: 768px) {
    .app-shell {
        padding: 18px 14px 108px;
    }
}

.home-hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 18px;
    margin: 0 16px 18px;
    padding: 24px;
    position: relative;
}

.home-hero .avatar-wrap {
    margin-right: 20px;
}

.home-hero .notice {
    flex: 1;
    min-height: 76px;
    padding-bottom: 12px;
}

.home-notice__headline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #352c2c;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.6;
}

.home-notice__headline-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.home-notice__headline-line {
    display: block;
}

.home-notice__headline i {
    color: rgba(123, 37, 37, 0.88);
    font-size: 15px;
}

.home-notice__footnote {
    color: #6c625a;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.home-notice__footnote--corner {
    position: absolute;
    right: 6px;
    bottom: 4px;
    text-align: right;
    white-space: nowrap;
}

.home-notice__count {
    color: #4a4038;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .home-notice__headline {
        font-size: 15px;
    }

    .home-notice__footnote {
        font-size: 11px;
    }
}

.quick-balance-card {
    margin: 0 16px 18px;
    padding: 22px;
    display: grid;
    gap: 10px;
}

.quick-balance-card strong {
    font-size: 38px;
    line-height: 1;
}

.quick-balance-card p {
    color: var(--text-muted);
    margin: 0;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 16px 18px;
}

.home-feed-panel {
    background: rgba(255, 252, 248, 0.92);
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.empty-state--hidden {
    display: none;
}

.mine-header--compact {
    padding-bottom: 20px;
}

.section-title {
    margin: 0 0 14px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.member-status-title {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.member-status-desc {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.member-pay-method-list {
    margin-bottom: 16px;
}

.action-icon {
    position: relative;
}

.action-icon__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ff3b30;
    box-shadow: 0 0 0 2px #fff;
}

.action-icon__dot[hidden] {
    display: none;
}

.message-page {
    margin: -24px -18px 0;
    width: calc(100% + 36px);
    background: #f5f5f5;
    min-height: calc(100vh - 96px);
}

.message-page__header {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 94px;
    padding: calc(24px + env(safe-area-inset-top)) 18px 18px;
    background: #ef5664;
    color: #fff;
    border-bottom: 0;
    box-shadow: none;
}

.message-page__back {
    position: absolute;
    left: 14px;
    bottom: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.message-page__back-icon {
    font-size: 28px;
    line-height: 1;
    transform: translateY(-1px);
}

.message-page__title {
    width: 100%;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    color: #fff;
}

.message-page__mark-read {
    position: absolute;
    right: 16px;
    bottom: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    cursor: pointer;
    opacity: 0.96;
}

.message-page__body {
    padding: 12px 0 24px;
}

.message-page__panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.message-page__list {
    min-height: 0;
}

.message-page__loading {
    padding: 30px 16px 20px;
    color: #9b9b9b;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.message-page__item {
    padding: 16px 16px 18px;
    background: #fff;
}

.message-page__item + .message-page__item {
    margin-top: 10px;
}

.message-page__item-main {
    min-width: 0;
}

.message-page__item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.message-page__item-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.message-page__item-title {
    color: #2f2f2f;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.message-page__item-time {
    color: #9d9d9d;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.message-page__item-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

.message-page__item-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.message-page__item-status--unread {
    background: rgba(232, 74, 74, 0.12);
    color: #c83232;
}

.message-page__item-status--read {
    background: #f3f3f3;
    color: #8a8a8a;
}

.message-page__empty {
    display: none;
    padding: 0;
    text-align: center;
}

.message-page__empty[hidden] {
    display: none;
}

.message-page__empty-title {
    color: #3d3028;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.message-page__empty-desc {
    margin-top: 8px;
    color: #6f6158;
    font-size: 14px;
    line-height: 1.7;
}

.message-page__end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    color: #b3b3b3;
    font-size: 13px;
    line-height: 1.2;
}

.message-page__end::before,
.message-page__end::after {
    content: '';
    width: 88px;
    max-width: 22vw;
    height: 1px;
    background: #d8d8d8;
}

.message-page__end span {
    white-space: nowrap;
}

.content-card {
    border-radius: 22px;
}

.content-card .content-card__badge {
    color: #fff;
}

.content-card .content-card__badge--offset {
    right: 80px;
}

.content-card .content-card__badge--member {
    background: #c2185b;
}


.content-card .content-card__badge--public {
    background: #d9822b;
}

.content-card .content-card__badge--unlocked {
    background: #28a745;
}

.content-card--home {
    display: flex;
    flex-direction: column;
    min-height: 206px;
    padding: 28px 18px 14px;
    overflow: hidden;
}

.content-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.content-card__price {
    flex-shrink: 0;
    margin-bottom: 0;
    color: #d52d2d;
    font-size: 22px;
    line-height: 1;
}

.content-card__status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    margin: 0 0 10px;
}

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

.content-card .content-card__badge--public-corner {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 54px;
    height: 24px;
    padding: 0 9px 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5c34a 0%, #dc9722 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 0 0 12px 0;
    box-shadow: 0 3px 8px rgba(197, 131, 18, 0.25);
}

.content-card .content-card__badge--unlocked-corner {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 60px;
    height: 24px;
    padding: 0 10px 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d85b63 0%, #bc3646 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 0 0 12px 0;
    box-shadow: 0 3px 8px rgba(188, 54, 70, 0.24);
}

.content-card .content-card__badge--sticky-corner {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 54px;
    height: 24px;
    padding: 0 11px 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff9f6 0%, #ffe4df 100%);
    color: #d25757;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-left: 1px solid rgba(226, 129, 129, 0.24);
    border-bottom: 1px solid rgba(226, 129, 129, 0.24);
    border-radius: 0 0 0 12px;
    box-shadow: 0 3px 8px rgba(205, 108, 108, 0.16);
}

.content-card__result-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.content-card__result-badge--red {
    border: 2px solid #b64141;
    color: #b64141;
}

.content-card__result-badge--black {
    border: 2px solid #111;
    color: #111;
}

.temporary-public-tip {
    display: none;
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 244, 229, 0.95);
    color: #9a5a10;
    font-size: 13px;
    line-height: 1.6;
}

.content-mini-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px;
}

.content-mini-tag-row--detail {
    margin: 0 0 0 8px;
    gap: 6px;
}

.content-mini-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid #d61f26;
    background: #fff;
    color: #d61f26;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
}

.content-mini-tag-row--detail .content-mini-tag {
    min-height: 20px;
    padding: 0 7px;
    font-size: 12px;
}

.content-card__title {
    margin: 0 0 6px;
    display: -webkit-box;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(1.4em * 2);
}

.content-card h3,
.member-content-card h3 {
    font-weight: 600;
    line-height: 1.45;
}

.content-card .price,
.member-plan-price,
.quick-balance-card strong {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.content-card .item-info,
.member-plan-tip,
.payment-note {
    letter-spacing: 0.01em;
}

.content-card__meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: auto;
    color: #aba094;
    font-size: 14px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    min-width: 0;
}

.content-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    letter-spacing: 0;
    font-weight: 500;
    flex: 0 0 auto;
}

.content-card__meta-item i {
    margin-right: 0;
    font-size: 10px;
    opacity: 0.9;
}

.content-card__meta-item--publish {
    color: #b8aea2;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-card__meta-text {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-card__meta-item--publish .content-card__meta-text {
    flex: 1;
}

.content-card__meta-item--publish i {
    font-size: 10px;
}

.content-card__meta-item--view {
    color: #8f867c;
}

.content-card__meta-item--cart {
    color: #2f66ff;
}

.content-card__meta-item--cart i {
    font-size: 10px;
    opacity: 0.86;
}

.member-plan-days {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.member-content-card__detail-text {
    margin-top: 10px;
    color: #666;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.publish-time {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.profile-hero,
.profile-shortcuts,
.order-card-list {
    margin-left: 16px;
    margin-right: 16px;
}

.profile-shortcuts .mine-menu-item,
.order-card {
    border-radius: 18px;
}

.order-card-list {
    display: grid;
    gap: 14px;
}

.order-card__entry {
    width: fit-content;
    margin-top: 12px;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(232, 74, 74, 0.08);
    color: #d65959;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.order-card__entry i {
    font-size: 11px;
    opacity: 0.9;
}

.order-segment {
    padding-top: 14px;
}

.recharge-quick-list,
.feedback-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 16px;
}

.settings-section .setting-menu-item {
    border-radius: 18px;
}

.feature-pending {
    opacity: 0.86;
}

.unlock-hero {
    border-radius: 22px;
}

.history-item-top {
    gap: 12px;
}

.history-result-badge {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.history-result-badge::after {
    content: '';
    position: absolute;
    inset: 7px;
    border: 2px dashed currentColor;
    border-radius: 50%;
    opacity: 0.72;
}

.history-result-badge--black {
    border: 3px solid #111;
    color: #111;
}

.history-result-badge--red {
    border: 3px solid #b64141;
    color: #b64141;
}

.unlock-action-bar {
    backdrop-filter: blur(12px);
}

.payment-note {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .content-card__top {
        gap: 10px;
    }

    .content-card--home {
        min-height: 188px;
        padding: 26px 16px 14px;
    }

    .content-card__price {
        font-size: 20px;
    }

    .content-card__status-row {
        align-items: flex-start;
        gap: 8px;
        min-height: 46px;
    }

    .content-card__result-badge {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }


    .message-page {
        margin: -18px -14px 0;
        width: calc(100% + 28px);
        background: #f5f5f5;
        min-height: calc(100vh - 88px);
    }

    .message-page__header {
        min-height: 88px;
        padding: calc(20px + env(safe-area-inset-top)) 14px 16px;
    }

    .message-page__back {
        left: 10px;
        bottom: 12px;
        width: 32px;
        height: 32px;
    }

    .message-page__back-icon {
        font-size: 26px;
    }

    .message-page__title {
        font-size: 18px;
    }

    .message-page__mark-read {
        right: 14px;
        bottom: 16px;
        font-size: 12px;
    }

    .message-page__body {
        padding: 10px 0 24px;
    }

    .message-page__list {
        min-height: 0;
    }

    .message-page__item {
        padding: 14px 14px 15px;
    }

    .message-page__item-top {
        gap: 10px;
        margin-bottom: 6px;
    }

    .message-page__item-side {
        gap: 6px;
    }

    .message-page__item-title {
        font-size: 15px;
    }

    .message-page__item-time {
        font-size: 11px;
    }

    .message-page__item-desc {
        font-size: 12px;
        line-height: 1.62;
    }

    .message-page__item-status {
        min-width: 38px;
        padding: 4px 7px;
        font-size: 10px;
    }

    .message-page__empty-title {
        font-size: 15px;
    }

    .message-page__empty-desc {
        font-size: 12px;
        line-height: 1.62;
    }

    .message-page__end {
        margin-top: 0;
        gap: 10px;
        font-size: 12px;
    }

    .message-page__end::before,
    .message-page__end::after {
        width: 72px;
        max-width: 20vw;
    }

    .content-card__meta {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 6px;
        font-size: 13px;
    }

    .content-card__meta-item {
        min-width: 0;
        gap: 4px;
    }

    .content-card__meta-item i {
        font-size: 10px;
    }

    .content-card__meta-item--publish i,
    .content-card__meta-item--cart i {
        font-size: 10px;
    }
}
