:root {
    --bg: #f5efe4;
    --surface: rgba(255, 253, 249, 0.92);
    --ink: #2d241f;
    --muted: #7e6d63;
    --line: rgba(45, 36, 31, 0.12);
    --accent: #ef6b3b;
    --accent-dark: #d75424;
    --accent-soft: rgba(239, 107, 59, 0.12);
    --success: #2f9e6d;
    --warn: #c17a15;
    --danger: #c74d4d;
    --shadow: 0 18px 42px rgba(80, 49, 24, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(239, 107, 59, 0.18), transparent 30%),
        linear-gradient(180deg, #fff9f0 0%, var(--bg) 54%, #efe5d6 100%);
    color: var(--ink);
}

body {
    padding: 18px 16px 40px;
}

.page-shell {
    max-width: 760px;
    margin: 0 auto;
}

.hero,
.panel,
.modal-card {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.hero {
    border-radius: 28px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -48px;
    top: -48px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 107, 59, 0.24), transparent 68%);
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: 30px;
    line-height: 1.14;
    max-width: 420px;
}

.hero-subtitle {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.7;
}

.wallet-card {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(45, 36, 31, 0.92), rgba(93, 58, 29, 0.92));
    color: #fff4eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wallet-card span {
    display: block;
    color: rgba(255, 244, 235, 0.7);
    font-size: 13px;
}

.wallet-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
}

.info-grid {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card,
.platform-card,
.material-card,
.record-card,
.friend-card,
.invite-box,
.invite-link-box {
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
}

.info-card {
    padding: 16px;
}

.info-card span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.info-card strong {
    display: block;
    font-size: 18px;
}

.panel {
    margin-top: 16px;
    padding: 18px;
    border-radius: 24px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-head p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.6;
}

.panel-head.tight {
    margin-bottom: 10px;
}

.platform-grid,
.material-list,
.friend-list,
.record-list {
    display: grid;
    gap: 12px;
}

.platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-card {
    padding: 16px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.platform-card.active {
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(239, 107, 59, 0.16);
    transform: translateY(-2px);
}

.platform-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
}

.platform-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.platform-card h3 {
    margin-top: 12px;
    font-size: 17px;
}

.platform-card p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}

.material-card {
    padding: 18px;
}

.material-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.reward-tag,
.status-tag {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(47, 158, 109, 0.12);
    color: var(--success);
    font-size: 12px;
}

.status-tag.pending {
    background: rgba(193, 122, 21, 0.16);
    color: var(--warn);
}

.status-tag.rejected {
    background: rgba(199, 77, 77, 0.14);
    color: var(--danger);
}

.material-copy,
.record-card p,
.friend-card p {
    color: var(--muted);
    line-height: 1.75;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.gallery {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.gallery img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid rgba(45, 36, 31, 0.08);
}

.material-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

button {
    border: none;
    cursor: pointer;
    font: inherit;
}

.primary-button,
.ghost-button {
    height: 42px;
    border-radius: 14px;
    padding: 0 16px;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}

.ghost-button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
}

.wide {
    width: 100%;
}

.invite-box,
.invite-link-box {
    padding: 16px;
}

.invite-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.invite-box span {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

.invite-box strong {
    display: block;
    font-size: 24px;
    margin-top: 6px;
}

.invite-link-box {
    margin-top: 12px;
}

.invite-link-box textarea {
    width: 100%;
    min-height: 84px;
    resize: none;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
}

.invite-link-box .primary-button {
    margin-top: 12px;
    width: 100%;
}

.friend-card,
.record-card {
    padding: 14px 16px;
}

.friend-card strong,
.record-card strong {
    display: block;
    margin-bottom: 6px;
}

.two-column {
    display: grid;
    gap: 14px;
}

.guide-content {
    margin: 0;
    white-space: pre-wrap;
    font: inherit;
    color: var(--muted);
    line-height: 1.85;
}

.empty-state {
    display: none;
    padding: 20px;
    text-align: center;
    color: var(--muted);
}

.empty-state.show {
    display: block;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(36, 24, 17, 0.48);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    z-index: 20;
}

.modal.hidden,
.toast.hidden {
    display: none;
}

.modal-card {
    width: min(100%, 640px);
    border-radius: 28px 28px 18px 18px;
    padding: 20px;
}

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

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(45, 36, 31, 0.08);
    font-size: 22px;
}

.modal-form {
    display: grid;
    gap: 12px;
}

.modal-form label span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--muted);
}

.modal-form input,
.modal-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.82);
    font: inherit;
    color: var(--ink);
}

.hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    min-width: 180px;
    max-width: calc(100vw - 40px);
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(45, 36, 31, 0.92);
    color: #fff;
    text-align: center;
    z-index: 40;
}

@media (min-width: 760px) {
    .two-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body {
        padding: 14px 12px 32px;
    }

    h1 {
        font-size: 26px;
    }

    .wallet-card {
        flex-direction: column;
        align-items: stretch;
    }

    .info-grid,
    .platform-grid,
    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery img {
        aspect-ratio: 4 / 3;
    }
}
