.content-page {
    --content-bg: #f4f6f8;
    --content-surface: rgba(255, 255, 255, 0.96);
    --content-surface-muted: #f7f8fa;
    --content-text: #18202c;
    --content-heading: #111827;
    --content-muted: #697386;
    --content-line: rgba(15, 23, 42, 0.09);
    --content-accent: #356df3;
    --content-accent-soft: #edf3ff;
    --content-danger: #c2414f;
    --content-shadow: 0 18px 54px rgba(24, 32, 44, 0.08), 0 2px 10px rgba(24, 32, 44, 0.04);
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    overflow-x: hidden;
    color: var(--content-text);
    background:
        radial-gradient(circle at 50% -12%, rgba(77, 122, 245, 0.09), transparent 34rem),
        var(--content-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

.content-page ::selection {
    color: #102049;
    background: #dce8ff;
}

.content-frame {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 28px 64px;
    padding: clamp(32px, 7vw, 64px) clamp(18px, 4.8vw, 36px) clamp(32px, 8vw, 72px);
}

.content-hero {
    margin: 0;
    padding: 0 6px 28px;
    padding: 0 6px clamp(22px, 4vw, 32px);
}

.content-kicker {
    margin: 0 0 10px;
    color: var(--content-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.16em;
}

.content-title {
    max-width: 18em;
    margin: 0;
    color: var(--content-heading);
    font-size: 36px;
    font-size: clamp(28px, 7vw, 42px);
    font-weight: 720;
    line-height: 1.2;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.content-subtitle {
    max-width: 42em;
    margin: 12px 0 0;
    color: var(--content-muted);
    font-size: 14px;
    line-height: 1.7;
}

.content-card {
    position: relative;
    min-width: 0;
    padding: 34px;
    padding: clamp(24px, 5.5vw, 42px);
    overflow: hidden;
    border: 1px solid var(--content-line);
    border-radius: 24px;
    background: var(--content-surface);
    box-shadow: var(--content-shadow);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.reading-progress {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    overflow: hidden;
    background: transparent;
    pointer-events: none;
}

.reading-progress-bar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, #4077ff, #77a0ff);
    box-shadow: 0 0 12px rgba(53, 109, 243, 0.34);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

.app-rich-content {
    min-width: 0;
    color: var(--content-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.86;
    letter-spacing: 0.008em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-rich-content > :first-child {
    margin-top: 0 !important;
}

.app-rich-content > :last-child {
    margin-bottom: 0 !important;
}

.app-rich-content .is-duplicate-title {
    display: none !important;
}

.app-rich-content p {
    margin: 0 0 1.1em;
}

.app-rich-content h1,
.app-rich-content h2,
.app-rich-content h3,
.app-rich-content h4,
.app-rich-content h5,
.app-rich-content h6 {
    margin: 1.8em 0 0.72em;
    color: var(--content-heading);
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -0.018em;
}

.app-rich-content h1 {
    font-size: 1.72em;
}

.app-rich-content h2 {
    font-size: 1.46em;
}

.app-rich-content h3 {
    font-size: 1.24em;
}

.app-rich-content h4,
.app-rich-content h5,
.app-rich-content h6 {
    font-size: 1.08em;
}

.app-rich-content ul,
.app-rich-content ol {
    display: block;
    margin: 0 0 1.25em;
    padding: 0 0 0 1.45em;
}

.app-rich-content ul {
    list-style: disc outside;
}

.app-rich-content ol {
    list-style: decimal outside;
}

.app-rich-content li {
    display: list-item;
    margin: 0.38em 0;
    padding-left: 0.2em;
}

.app-rich-content li::marker {
    color: var(--content-accent);
    font-weight: 700;
}

.app-rich-content a {
    color: var(--content-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(53, 109, 243, 0.28);
    transition: color 160ms ease, border-color 160ms ease;
}

.app-rich-content a:hover {
    color: #2459d3;
    border-bottom-color: currentColor;
}

.app-rich-content a:focus-visible,
.content-retry:focus-visible,
.faq-summary:focus-visible {
    outline: 3px solid rgba(53, 109, 243, 0.22);
    outline-offset: 3px;
}

.faq-summary:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 3px rgba(53, 109, 243, 0.22);
}

.app-rich-content strong,
.app-rich-content b {
    color: var(--content-heading);
    font-weight: 680;
}

.app-rich-content blockquote {
    margin: 1.4em 0;
    padding: 0.9em 1.05em;
    border: 0;
    border-left: 3px solid var(--content-accent);
    border-radius: 0 12px 12px 0;
    color: #4c5a70;
    background: var(--content-accent-soft);
}

.app-rich-content blockquote > :last-child {
    margin-bottom: 0;
}

.app-rich-content hr {
    height: 1px;
    margin: 2em 0;
    border: 0 !important;
    border-bottom: 0 !important;
    background: var(--content-line);
}

.app-rich-content img,
.app-rich-content svg,
.app-rich-content video,
.app-rich-content canvas {
    max-width: 100%;
    height: auto;
}

.app-rich-content img,
.app-rich-content video {
    display: block;
    margin: 1.35em auto;
    border-radius: 14px;
}

.app-rich-content iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 240px;
    margin: 1.35em 0;
    border: 0;
    border-radius: 14px;
}

.app-rich-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.35em 0;
    overflow-x: auto;
    border: 1px solid var(--content-line);
    border-spacing: 0;
    border-collapse: collapse;
    border-radius: 12px;
    background: var(--content-surface);
    -webkit-overflow-scrolling: touch;
}

.app-rich-content th,
.app-rich-content td {
    min-width: 96px;
    padding: 10px 12px;
    border: 1px solid var(--content-line);
    text-align: left;
    vertical-align: top;
}

.app-rich-content th {
    color: var(--content-heading);
    font-weight: 650;
    background: var(--content-surface-muted);
}

.app-rich-content pre {
    max-width: 100%;
    margin: 1.35em 0;
    padding: 16px;
    overflow: auto;
    border: 1px solid var(--content-line);
    border-radius: 14px;
    color: #dce6f6;
    background: #172033;
    font: 13px/1.72 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
}

.app-rich-content code {
    padding: 0.16em 0.4em;
    border-radius: 6px;
    color: #a33a4b;
    background: #f7eef0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.88em;
}

.app-rich-content pre code {
    padding: 0;
    color: inherit;
    background: transparent;
    font-size: inherit;
}

.content-state {
    display: grid;
    min-height: 220px;
    place-items: center;
    color: var(--content-muted);
    text-align: center;
}

.content-state[hidden],
.content-loaded[hidden] {
    display: none !important;
}

.content-state-inner {
    width: 100%;
    width: min(100%, 320px);
}

.content-state-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    place-items: center;
    border-radius: 16px;
    color: var(--content-accent);
    background: var(--content-accent-soft);
}

.content-state-title {
    margin: 0;
    color: var(--content-heading);
    font-size: 17px;
    font-weight: 680;
    line-height: 1.45;
}

.content-state-message {
    margin: 7px 0 0;
    color: var(--content-muted);
    font-size: 14px;
    line-height: 1.65;
}

.content-retry {
    min-width: 112px;
    min-height: 42px;
    margin: 18px 0 0;
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--content-accent);
    background-image: none !important;
    box-shadow: 0 8px 20px rgba(53, 109, 243, 0.22);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.content-retry:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(53, 109, 243, 0.18);
}

.content-skeleton {
    width: 100%;
}

.content-skeleton-line {
    display: block;
    height: 13px;
    margin: 0 0 13px;
    border-radius: 999px;
    background: linear-gradient(90deg, #edf0f4 20%, #f7f8fa 38%, #edf0f4 58%);
    background-size: 220% 100%;
    animation: content-shimmer 1.5s ease-in-out infinite;
}

.content-skeleton-line:nth-child(1) {
    width: 62%;
    height: 20px;
    margin-bottom: 25px;
}

.content-skeleton-line:nth-child(2) {
    width: 100%;
}

.content-skeleton-line:nth-child(3) {
    width: 88%;
}

.content-skeleton-line:nth-child(4) {
    width: 72%;
}

@keyframes content-shimmer {
    to {
        background-position-x: -220%;
    }
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    overflow: hidden;
    border: 1px solid var(--content-line);
    border-radius: 17px;
    background: var(--content-surface);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.faq-item[open] {
    border-color: rgba(53, 109, 243, 0.2);
    box-shadow: 0 10px 30px rgba(24, 32, 44, 0.06);
}

.faq-summary {
    display: flex;
    min-height: 64px;
    margin: 0;
    padding: 15px 16px;
    align-items: center;
    gap: 13px;
    color: var(--content-heading);
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-index {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 11px;
    color: var(--content-accent);
    background: var(--content-accent-soft);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.faq-title {
    min-width: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.faq-chevron {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    color: #8b96a8;
    transition: transform 180ms ease, color 180ms ease;
}

.faq-item[open] .faq-chevron {
    color: var(--content-accent);
    transform: rotate(180deg);
}

.faq-panel {
    margin: 0 16px;
    padding: 2px 0 18px 47px;
    border-top: 1px solid var(--content-line);
}

.faq-panel.app-rich-content {
    padding-top: 16px;
    font-size: 15px;
    line-height: 1.8;
}

.night .content-page {
    --content-bg: #0d1118;
    --content-surface: rgba(23, 29, 40, 0.97);
    --content-surface-muted: #1c2431;
    --content-text: #dce3ed;
    --content-heading: #f5f7fa;
    --content-muted: #98a4b5;
    --content-line: rgba(226, 232, 240, 0.1);
    --content-accent: #82a7ff;
    --content-accent-soft: rgba(85, 126, 223, 0.16);
    --content-danger: #ff8f9b;
    --content-shadow: 0 18px 58px rgba(0, 0, 0, 0.24);
    background:
        radial-gradient(circle at 50% -12%, rgba(75, 116, 211, 0.16), transparent 34rem),
        var(--content-bg) !important;
}

.night .content-page .content-card,
.night .content-page .faq-item {
    color: var(--content-text) !important;
    background-color: var(--content-surface) !important;
}

.night .content-page .app-rich-content blockquote {
    color: #bdc8d8;
}

.night .content-page .app-rich-content [style*="color"],
.night .content-page .app-rich-content [style*="background"] {
    color: var(--content-text) !important;
    background-color: transparent !important;
}

.night .content-page .app-rich-content code {
    color: #ffacb8;
    background: rgba(207, 80, 102, 0.14);
}

.night .content-page .app-rich-content pre,
.night .content-page .app-rich-content pre code {
    color: #dce6f6;
    background: #101724;
}

.night .content-page .content-retry {
    color: #102049 !important;
    background-color: #91b1ff !important;
    background-image: none !important;
}

.night .content-page .content-skeleton-line {
    background-image: linear-gradient(90deg, #202836 20%, #293342 38%, #202836 58%);
}

@media (max-width: 480px) {
    .content-frame {
        padding: 28px 15px 36px;
    }

    .content-hero {
        padding-right: 5px;
        padding-bottom: 21px;
        padding-left: 5px;
    }

    .content-title {
        font-size: 30px;
        font-size: clamp(27px, 8.5vw, 34px);
    }

    .content-card {
        padding: 23px 19px;
        border-radius: 21px;
    }

    .app-rich-content {
        font-size: 15.5px;
        line-height: 1.84;
    }

    .app-rich-content iframe {
        min-height: 190px;
    }

    .faq-summary {
        min-height: 60px;
        padding: 14px;
        gap: 11px;
    }

    .faq-index {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .faq-panel {
        margin: 0 14px;
        padding-right: 1px;
        padding-bottom: 16px;
        padding-left: 43px;
    }
}

@media (max-width: 350px) {
    .content-frame {
        padding-right: 11px;
        padding-left: 11px;
    }

    .content-card {
        padding-right: 16px;
        padding-left: 16px;
        border-radius: 18px;
    }

    .faq-panel {
        padding-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .content-page *,
    .content-page *::before,
    .content-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .content-page {
        min-height: 0;
        padding: 0;
        color: #111;
        background: #fff !important;
    }

    .content-frame {
        max-width: none;
        padding: 0;
    }

    .reading-progress,
    .content-kicker {
        display: none;
    }

    .content-card {
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .faq-item {
        break-inside: avoid;
    }
}
