@font-face {
    font-family: 'CuanBao';
    src:
        url('/static/fonts/SXS-Cuanbaozibei.woff') format('woff'),
        url('/static/rili/fonts/SXS-Cuanbaozibei.woff') format('woff'),
        url('/static/zhuangzi/fonts/SXS-Cuanbaozibei.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #111111;
    --ink-soft: #2a2a2a;
    --paper: #f2f5ee;
    --paper-deep: #e8ebe4;
    --white: #f2f5ee;
    --muted: #6b6760;
    --muted-soft: #8a857c;
    --line: rgba(17, 17, 17, 0.12);
    --line-strong: rgba(17, 17, 17, 0.22);
    --shade: rgba(17, 17, 17, 0.06);
    --shade-strong: rgba(17, 17, 17, 0.1);
    --danger: #8a3d35;
    --ok: #2f5c45;
    --font-cuanbao: 'CuanBao', "Songti SC", "Noto Serif SC", serif;
    --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --max: 1080px;
    --radius: 4px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-cuanbao);
    color: var(--ink);
    background: var(--paper);
    position: relative;
    overflow-x: hidden;
    letter-spacing: 0.04em;
}

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

.portal-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(17, 17, 17, 0.04), transparent 55%),
        radial-gradient(ellipse 60% 45% at 90% 15%, rgba(17, 17, 17, 0.03), transparent 50%),
        linear-gradient(180deg, #f2f5ee 0%, var(--paper) 45%, var(--paper-deep) 100%);
}

.portal-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(17, 17, 17, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 17, 17, 0.03) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, #000 15%, transparent 78%);
}

.portal-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    backdrop-filter: blur(12px);
    background: rgba(242, 245, 238, 0.92);
    border-bottom: 1px solid var(--line);
}

.portal-nav__brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.portal-nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.portal-nav__user,
.portal-nav__link {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.portal-nav__link:hover {
    color: var(--ink);
}

.portal-nav__link--muted {
    opacity: 0.75;
}

.portal-nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 2px;
    background: var(--ink);
    color: var(--white);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    transition: background 0.2s ease, transform 0.2s ease;
}

.portal-nav__cta:hover {
    background: var(--ink-soft);
    transform: translateY(-1px);
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 2px;
    background: var(--ink);
    color: var(--white);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* —— 印章效果 —— */
.seal {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

.seal::before {
    content: none;
}

.seal__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 0;
}

.seal--nav {
    width: 44px;
    height: 44px;
    padding: 0;
    transform: none;
}

.seal--hero {
    width: min(38vw, 148px);
    height: min(38vw, 148px);
    padding: 0;
    transform: none;
    animation: seal-press 1.1s ease both;
}

.seal--hero:hover {
    transform: scale(1.02);
}

.portal-messages {
    max-width: var(--max);
    margin: 12px auto 0;
    padding: 0 20px;
}

.portal-message {
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--shade);
    border: 1px solid var(--line);
}

.hero {
    position: relative;
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px 64px;
    overflow: hidden;
}

.hero__veil {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 35%, rgba(17, 17, 17, 0.05), transparent 62%),
        linear-gradient(180deg, transparent 0%, rgba(242, 245, 238, 0.35) 70%, rgba(242, 245, 238, 0.95) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Cpath d='M120 460c140-90 250-50 360-110s190-50 280 10' stroke='%23111111' stroke-opacity='.08' stroke-width='1.5' fill='none'/%3E%3Cpath d='M60 180c80 40 140-20 220 10s160 30 240-20' stroke='%23111111' stroke-opacity='.05' stroke-width='1.2' fill='none'/%3E%3C/svg%3E") center/cover no-repeat;
}

.hero__content {
    position: relative;
    width: min(100%, var(--max));
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__brand {
    margin: 0 0 28px;
    line-height: 0;
}

.hero__slogan {
    margin: 0 0 14px;
    font-family: var(--font-cuanbao);
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: normal;
    letter-spacing: 0.28em;
    color: var(--ink);
    text-indent: 0.28em;
}

.hero__lead {
    margin: 0 0 28px;
    max-width: 28rem;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 2px;
    border: 1px solid transparent;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.btn--primary {
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);
}

.btn--primary:hover {
    transform: translateY(-2px);
    background: var(--ink-soft);
    box-shadow: 0 14px 30px rgba(17, 17, 17, 0.2);
}

.btn--ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn--ghost:hover {
    border-color: var(--ink);
    background: var(--shade);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.apps,
.subscribe,
.coming {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 56px 20px 80px;
}

.section-head {
    margin-bottom: 28px;
    text-align: center;
}

.section-head h2 {
    margin: 0 0 8px;
    font-family: var(--font-cuanbao);
    font-size: 1.9rem;
    font-weight: normal;
    letter-spacing: 0.2em;
    color: var(--ink);
    text-indent: 0.2em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 720px) {
    .app-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

.app-tile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 180px;
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--white);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.app-tile:hover {
    transform: translateY(-3px);
    border-color: var(--ink);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

.app-tile__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.app-tile h3 {
    margin: 0;
    font-family: var(--font-cuanbao);
    font-size: 1.45rem;
    font-weight: normal;
    letter-spacing: 0.14em;
    color: var(--ink);
}

.app-tile p {
    margin: 0;
    flex: 1;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1rem;
}

.app-tile__cta {
    align-self: flex-start;
    font-size: 1rem;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 1px;
    letter-spacing: 0.1em;
}

.app-tile__tag {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 2px;
    background: var(--shade-strong);
    color: var(--muted);
    border: 1px solid var(--line);
    letter-spacing: 0.06em;
}

.app-tile--ink {
    box-shadow: inset 3px 0 0 var(--ink);
}

.app-tile--charcoal {
    box-shadow: inset 3px 0 0 #3a3a3a;
}

.app-tile--stone {
    box-shadow: inset 3px 0 0 #6e6a63;
}

.app-tile--ash {
    box-shadow: inset 3px 0 0 #9a958c;
}

.app-tile--soon {
    opacity: 0.88;
}

.coming {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
}

.coming__panel {
    width: 100%;
    padding: 36px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--white);
    text-align: center;
}

.coming__eyebrow {
    margin: 0 0 10px;
    color: var(--muted);
    letter-spacing: 0.22em;
    font-size: 0.95rem;
}

.coming__panel h1 {
    margin: 0 0 14px;
    font-family: var(--font-cuanbao);
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: normal;
    letter-spacing: 0.18em;
    color: var(--ink);
}

.coming__desc,
.coming__note {
    color: var(--muted);
    line-height: 1.8;
}

.coming__note {
    margin-bottom: 28px;
}

.member-status {
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--white);
    text-align: center;
}

.member-status p {
    margin: 0 0 6px;
}

.member-status__hint {
    color: var(--muted);
    font-size: 0.95rem;
}

.plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 720px) {
    .plan-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--white);
    text-align: center;
    align-items: center;
}

.plan-card--highlight {
    border-color: var(--ink);
    background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

.plan-card__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 2px;
    background: var(--ink);
    color: var(--white);
    letter-spacing: 0.08em;
}

.plan-card h3 {
    margin: 0;
    font-family: var(--font-cuanbao);
    font-weight: normal;
    letter-spacing: 0.14em;
    font-size: 1.35rem;
}

.plan-card__price {
    margin: 0;
    font-size: 2.4rem;
    color: var(--ink);
    line-height: 1;
}

.plan-card__currency {
    font-size: 1.1rem;
    margin-right: 2px;
}

.plan-card__unit {
    font-size: 1rem;
    color: var(--muted);
}

.plan-card ul {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    color: var(--muted);
    line-height: 1.9;
    flex: 1;
}

.subscribe-note {
    margin-top: 24px;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

.subscribe-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 40;
    min-width: min(90vw, 320px);
    padding: 12px 16px;
    border-radius: var(--radius);
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line-strong);
    box-shadow: 0 12px 30px rgba(17, 17, 17, 0.12);
    color: var(--ink);
    font-family: var(--font-cuanbao);
}

.subscribe-toast.is-ok {
    border-color: var(--ok);
    color: var(--ok);
}

.subscribe-toast.is-err {
    border-color: var(--danger);
    color: var(--danger);
}

.portal-footer {
    padding: 24px 20px 36px;
    text-align: center;
    color: var(--muted-soft);
    font-size: 0.9rem;
    border-top: 1px solid var(--line);
    letter-spacing: 0.1em;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: rise-in 0.8s ease forwards;
}

.reveal-delay-1 { animation-delay: 0.12s; }
.reveal-delay-2 { animation-delay: 0.24s; }
.reveal-delay-3 { animation-delay: 0.36s; }

.app-tile.reveal {
    animation-delay: calc(var(--stagger, 0) * 0.1s + 0.1s);
}

@keyframes rise-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes seal-press {
    0% {
        opacity: 0;
        transform: scale(1.12);
        filter: blur(1px);
    }
    55% {
        opacity: 1;
        transform: scale(0.98);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .app-tile.reveal,
    .seal--hero {
        animation: none;
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
