.content-entry-page {
    min-width: 0;
    padding-top: 0;
}

.content-entry-main {
    padding: var(--mobile-shell-top-gap) 0 18px;
}

.content-entry-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
    min-height: 176px;
    padding: 22px 18px;
    border-radius: 8px;
    color: #fff7ea;
    box-shadow: none;
}

.content-entry-hero-course {
    background:
        radial-gradient(circle at 84% 18%, rgba(209, 165, 95, 0.28), transparent 30%),
        linear-gradient(135deg, #7f2c27, #2f5f55),
        #7f2c27;
}

.content-entry-hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 9px;
    min-width: 0;
}

.content-entry-hero span {
    width: fit-content;
    padding: 5px 10px;
    border: 1px solid rgba(255, 247, 234, 0.35);
    border-radius: 999px;
    color: rgba(255, 247, 234, 0.9);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.content-entry-hero h1 {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
}

.content-entry-hero p {
    max-width: 30em;
    margin: 0;
    color: rgba(255, 247, 234, 0.86);
    font-size: 15px;
    line-height: 1.65;
}

.content-entry-hero-mark {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 1px solid rgba(255, 247, 234, 0.22);
    border-radius: 50%;
    color: rgba(255, 247, 234, 0.78);
    background: rgba(255, 247, 234, 0.08);
}

.content-entry-hero-mark svg,
.content-entry-icon svg {
    width: 34px;
    height: 34px;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.content-entry-section {
    display: grid;
    gap: 14px;
    margin-top: 0;
    padding: 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.content-entry-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.content-entry-head h2,
.content-entry-head p {
    margin: 0;
}

.content-entry-head h2 {
    color: #2a211b;
    font-size: 20px;
    line-height: 1.3;
}

.content-entry-head p {
    color: #8d2d28;
    font-size: 13px;
    font-weight: 800;
}

.content-entry-list {
    display: grid;
    gap: 10px;
}

.content-entry-card {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 96px;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.72);
    box-shadow: none;
}

.content-entry-cover {
    display: block;
    width: 94px;
    aspect-ratio: 18 / 11;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    background: #f3eadc;
}

.content-entry-card-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.content-entry-card b {
    width: fit-content;
    padding: 2px 7px;
    border: 1px solid rgba(141, 45, 40, 0.16);
    border-radius: 999px;
    color: #8d2d28;
    font-size: 11px;
    line-height: 1.25;
}

.content-entry-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: #2a211b;
    font-size: 16px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.content-entry-card span {
    display: -webkit-box;
    overflow: hidden;
    color: #6f5a49;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.content-entry-card em {
    align-self: start;
    padding-top: 3px;
    color: #8b7969;
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
}

.course-page {
    min-width: 0;
}

.course-main {
    display: grid;
    gap: 10px;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
}

.course-slider {
    position: relative;
    width: 100%;
    height: var(--course-slide-height, 180px);
    min-height: var(--course-slide-height, 180px);
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    touch-action: pan-y;
    user-select: none;
}

.course-slides {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: var(--course-slide-height, 180px);
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    cursor: grab;
    scroll-behavior: smooth;
    scroll-padding: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.course-slides::-webkit-scrollbar {
    display: none;
}

.course-slides.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.course-slide {
    position: relative;
    display: block;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: var(--course-slide-height, 180px);
    overflow: hidden;
    border-radius: 12px;
    opacity: 0.74;
    scroll-snap-align: start;
    transform: scale(0.986);
    transition: opacity 0.24s ease, transform 0.24s ease;
    will-change: opacity, transform;
}

.course-slide.is-active {
    z-index: 1;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.course-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 1px;
    width: max-content;
    padding: 0;
    background: transparent;
    transform: translateX(-50%);
}

.course-dots button {
    position: relative;
    width: 9px;
    height: 14px;
    min-width: 9px;
    min-height: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 1;
    touch-action: manipulation;
}

.course-dots button::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 50%;
    background: transparent;
    content: "";
    transform: translate(-50%, -50%);
    transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.course-dots button.is-active::before {
    background: rgba(255, 255, 255, 0.62);
    opacity: 0.9;
}

.course-list-section {
    width: 100%;
    min-width: 0;
}

.course-empty {
    margin: 0;
    padding: 20px 0;
    color: #8a8f99;
    font-size: 14px;
    text-align: center;
}

.course-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.course-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.course-card-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
    background: #ead9c4;
}

.course-card-body {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 0 9px 10px;
}

.course-card h2 {
    margin: 0;
    min-width: 0;
}

.course-card h2 {
    display: -webkit-box;
    overflow: hidden;
    color: #151515;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.course-card span {
    color: #ff5a00;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.course-card:active {
    transform: translateY(1px);
}

.course-detail-page {
    min-width: 0;
}

.course-detail-main {
    display: grid;
    gap: 8px;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 12px);
}

.course-detail-head {
    position: sticky;
    top: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    min-height: 44px;
    background: var(--app-bg);
}

.course-detail-head h1 {
    margin: 0;
    color: #1d1d1f;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.course-detail-back {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 44px;
    min-height: 44px;
    color: #666;
    text-decoration: none;
}

.course-detail-back svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.course-subscribe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    color: #ff5a00;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    touch-action: manipulation;
}

.course-subscribe-btn.is-subscribed {
    color: #8a8f99;
}

.course-subscribe-btn:disabled {
    opacity: 1;
}

.course-detail-cover,
.course-video-card {
    overflow: hidden;
    width: 100%;
    background: #fff;
}

.course-detail-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    background: #e8edf0;
}

.course-video-card {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 202px;
    background: #111;
}

.course-video-card video {
    display: block;
    width: 100%;
    height: 100%;
    background: #111;
    object-fit: contain;
}

.course-video-state {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.course-video-state[hidden],
.course-video-watermark[hidden] {
    display: none;
}

.course-video-card.is-ready .course-video-state {
    display: none;
}

.course-video-watermark {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.66);
    background: rgba(0, 0, 0, 0.28);
    font-size: 11px;
    line-height: 1.2;
    pointer-events: none;
}

.course-detail-info {
    display: grid;
    gap: 6px;
    padding: 8px 0 10px;
    border-bottom: 6px solid rgba(0, 0, 0, 0.04);
}

.course-detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.course-detail-price-row strong {
    color: #ff4f00;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
}

.course-detail-price-row span {
    color: #ff6a21;
    font-size: 12px;
}

.course-detail-price-row em,
.course-detail-teacher,
.course-detail-info p {
    color: #8a8f99;
    font-size: 13px;
    font-style: normal;
    line-height: 1.45;
}

.course-detail-info h2 {
    margin: 0;
    color: #141414;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.course-detail-info p {
    margin: 0;
}

.course-detail-tabs {
    display: grid;
    gap: 0;
    background: transparent;
}

.course-detail-tabbar {
    position: sticky;
    top: 44px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 46px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--app-bg);
}

.course-detail-tabbar button {
    position: relative;
    min-height: 46px;
    border: 0;
    color: #333;
    background: transparent;
    font: inherit;
    font-size: 15px;
}

.course-detail-tabbar button.is-active {
    color: #111;
    font-weight: 600;
}

.course-detail-tabbar button.is-active::after {
    position: absolute;
    right: 38%;
    bottom: 0;
    left: 38%;
    height: 2px;
    background: #20a7c8;
    content: "";
}

.course-detail-panel {
    display: none;
}

.course-detail-panel.is-active {
    display: block;
}

.course-detail-panel[data-course-panel="detail"] {
    padding: 10px 0;
}

.course-detail-panel[data-course-panel="detail"] p,
.course-detail-panel[data-course-panel="detail"] div,
.course-detail-panel[data-course-panel="detail"] li {
    margin: 0 0 10px;
    color: #555;
    font-size: 14px;
    line-height: 1.75;
}

.course-detail-panel[data-course-panel="detail"] h2,
.course-detail-panel[data-course-panel="detail"] h3,
.course-detail-panel[data-course-panel="detail"] h4 {
    margin: 0 0 9px;
    color: #171717;
    font-size: 16px;
    line-height: 1.45;
}

.course-detail-panel[data-course-panel="detail"] ul,
.course-detail-panel[data-course-panel="detail"] ol {
    margin: 0 0 10px;
    padding-left: 18px;
}

.course-chapter-list {
    display: grid;
    gap: 0;
}

.course-chapter {
    display: grid;
    gap: 3px;
    width: 100%;
    min-height: 66px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.course-chapter.is-active strong {
    color: #ff5a00;
}

.course-chapter.is-locked {
    opacity: 0.72;
}

.course-chapter:not(.is-locked) i {
    display: none;
}

.course-chapter div {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.course-chapter div > span {
    flex: 0 0 auto;
    color: #ff6a21;
    font-size: 12px;
    line-height: 1.2;
}

.course-chapter div > em {
    flex: 0 0 auto;
    color: #8a8f99;
    font-size: 12px;
    font-style: normal;
    line-height: 1.2;
}

.course-chapter i {
    position: relative;
    flex: 0 0 auto;
    width: 13px;
    height: 12px;
    border: 1.5px solid #9ca3af;
    border-radius: 2px;
}

.course-chapter i::before {
    position: absolute;
    left: 2px;
    top: -7px;
    width: 7px;
    height: 7px;
    border: 1.5px solid #9ca3af;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    content: "";
}

.course-chapter strong {
    overflow: hidden;
    color: #1f2933;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-chapter p {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    color: #8a8f99;
    font-size: 12px;
    line-height: 1.35;
}

.course-chapter p span {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.course-toast {
    position: fixed;
    right: 50%;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
    z-index: 180;
    max-width: min(292px, calc(100% - 32px));
    padding: 10px 13px;
    border-radius: 8px;
    color: #fff;
    background: rgba(36, 36, 36, 0.9);
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translateX(50%) translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.course-toast.is-visible {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

@media (min-width: 720px) {
    .course-main {
        gap: 12px;
    }

    .course-card-grid {
        gap: 10px;
    }

    .course-card h2 {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .course-slide,
    .course-card,
    .course-dots button::before {
        transition: none;
    }

    .course-card:active {
        transform: none;
    }
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.article-card {
    display: grid;
    gap: 10px;
    min-height: 132px;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: none;
}

.article-card.compact {
    gap: 5px;
    min-height: 108px;
}

.article-card.compact h3 {
    margin-bottom: 0;
}

.article-card.compact p {
    margin-bottom: 0;
    line-height: 1.45;
}

.article-card.compact p:empty {
    display: none;
}

.article-card.compact span {
    margin-top: 0;
}

.article-card img {
    width: 100%;
    height: 112px;
    object-fit: cover;
    border-radius: 6px;
    background: #eadcc5;
}

.article-card h2,
.article-card h3 {
    margin: 0 0 10px;
    color: #2a211b;
}

.article-card h2 {
    font-size: 18px;
    line-height: 1.35;
}

.article-card h3 {
    font-size: 17px;
    line-height: 1.35;
}

.article-card p {
    margin: 0 0 10px;
    color: #6b5847;
    line-height: 1.65;
    font-size: 14px;
}

.article-card span,
.article-meta {
    color: #9a8268;
    font-size: 14px;
}

.article-detail {
    max-width: 860px;
    margin: 0 auto;
    padding: 38px;
    background: #fffaf0;
    border: 1px solid #e3d2b7;
    border-radius: 8px;
}

.article-detail h1 {
    margin: 12px 0;
    font-size: 36px;
    line-height: 1.25;
}

.article-cover {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    margin: 24px 0;
    border-radius: 8px;
    background: #eadcc5;
}

.article-summary {
    margin: 18px 0;
    padding: 16px 18px;
    color: #6b5847;
    line-height: 1.8;
    background: #f5ead8;
    border-left: 4px solid #c89b4d;
}

.article-content {
    color: #3f332a;
    font-size: 17px;
    line-height: 2;
}

/* Auth page */
.auth-mobile-page {
    min-height: 100%;
    overflow-x: hidden;
    overscroll-behavior: none;
}

.auth-page {
    min-height: 0;
    margin: 0 auto;
    padding: var(--mobile-shell-top-gap) 0 calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 24px);
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.auth-page::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.auth-mobile-page .site-bottom-spacer {
    display: none;
}

.auth-panel {
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 40px 4px 0;
}

.auth-copy {
    display: grid;
    text-align: left;
}

.auth-copy h1 {
    margin: 0;
    color: #111111;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: 0;
}

.auth-form {
    display: grid;
    gap: 15px;
    padding: 0;
    color: #151515;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.auth-form label {
    display: grid;
    gap: 8px;
    color: #222222;
    font-size: 14px;
    font-weight: 400;
}

.auth-form input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(20, 20, 20, 0.12);
    border-radius: 8px;
    color: #111111;
    background: #ffffff;
    font: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-form input::placeholder {
    color: #a0a0a0;
}

.auth-form input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 16%, transparent);
}

.auth-form button[type="submit"] {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--color-accent);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-form button[type="submit"]:active {
    transform: translateY(1px);
}

.auth-form button[type="submit"]:disabled {
    cursor: wait;
    opacity: 0.66;
    transform: none;
}

.auth-wechat-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(20, 20, 20, 0.1);
    border-radius: 8px;
    color: #1f1f1f;
    background: #ffffff;
    font-size: 15px;
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.auth-wechat-link svg {
    width: 20px;
    height: 20px;
    color: #15a85f;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.auth-wechat-link:active {
    background: rgba(20, 20, 20, 0.04);
}

.auth-switch {
    margin: 0;
    color: #777777;
    font-size: 14px;
    text-align: center;
}

.auth-switch a {
    color: var(--color-accent);
    font-weight: 400;
}

.auth-result {
    display: none;
}

.auth-toast {
    position: fixed;
    right: 50%;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
    z-index: 180;
    max-width: min(292px, calc(100% - 32px));
    padding: 10px 13px;
    border-radius: 8px;
    color: #fff;
    background: rgba(36, 36, 36, 0.9);
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translateX(50%) translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-toast.is-visible {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

@media (min-width: 720px) {
    .auth-page {
        display: grid;
        align-items: center;
        padding: var(--mobile-shell-top-gap) 0 calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 36px);
    }

    .auth-panel {
        max-width: 420px;
        padding-top: 0;
    }

    .auth-copy h1 {
        font-size: 34px;
    }
}
@media (max-width: 719px) {
    .content-entry-section {
        padding: 0;
    }

    .content-entry-card {
        grid-template-columns: 88px minmax(0, 1fr) auto;
        padding: 8px;
    }

    .content-entry-cover {
        width: 88px;
    }

    .article-grid,
    .article-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-detail {
        padding: 20px 16px;
    }

    .article-detail h1 {
        font-size: 28px;
    }


}

@media (min-width: 720px) {
    .article-grid,
    .article-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 921px) {
    .article-grid,
    .article-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

