/* PsyLearn 首页多端壳层：自动学习看板、iPad App 导航、账号与微信入口 */

.learning-dashboard {
    background: linear-gradient(145deg, #ffffff 0%, #fff8fb 100%);
    border: 1px solid rgba(255, 95, 143, 0.18);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 10px 32px rgba(26, 26, 46, 0.07);
}

.learning-dashboard-header {
    margin-bottom: 18px;
}

.learning-dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d9467d;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.learning-dashboard-header h2 {
    color: var(--pl-text-main, #17172f);
    font-size: 22px;
    line-height: 1.35;
    margin: 0 0 6px;
}

.learning-dashboard-header p,
.learning-dashboard-source {
    color: var(--pl-text-muted, #6b7280);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.learning-dashboard-content {
    color: var(--pl-text-main, #17172f);
    font-size: 14px;
}

.learning-dashboard-list {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.learning-dashboard-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(34, 197, 94, 0.16);
    border-radius: 12px;
    line-height: 1.5;
}

.learning-dashboard-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    background: #dcfce7;
    color: #16803a;
    font-size: 11px;
}

.learning-dashboard-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--pl-text-muted, #6b7280);
    line-height: 1.6;
}

.learning-dashboard-empty-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: #f9a8c4;
    box-shadow: 0 0 0 5px rgba(249, 168, 196, 0.18);
}

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

.learning-dashboard-stat {
    padding: 14px 8px;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(23, 23, 47, 0.07);
    border-radius: 12px;
}

.learning-dashboard-stat strong {
    display: block;
    color: #d9467d;
    font-size: 24px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.learning-dashboard-stat span {
    display: block;
    margin-top: 5px;
    color: var(--pl-text-muted, #6b7280);
    font-size: 11px;
    line-height: 1.3;
}

.learning-dashboard-encouragement {
    margin: 0;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fff1f5;
    color: #9f315b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.learning-dashboard-recent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #fff;
    color: var(--pl-text-main, #17172f);
    font-size: 13px;
    text-decoration: none;
}

.learning-dashboard-recent i {
    color: #d9467d;
    margin-right: 5px;
}

.learning-dashboard-source {
    margin-top: 10px;
    font-size: 11px;
}

.learning-dashboard--home .learning-dashboard-source {
    display: none;
}

.learning-dashboard--loading [data-dashboard-content] {
    color: var(--pl-text-muted, #6b7280);
}

.desktop-learning-dashboard {
    scroll-margin-top: 24px;
}

.development-status-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    border: 1px solid rgba(88, 110, 190, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, #f8faff 0%, #fff 70%);
    box-shadow: 0 10px 30px rgba(35, 52, 105, 0.07);
}

.development-status-card[hidden] {
    display: none !important;
}

.development-status-card-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, #d299c2, #fef9d7);
    color: #8e477e;
    font-size: 25px;
}

.development-status-card-copy {
    min-width: 0;
}

.development-status-card-eyebrow {
    display: inline-block;
    margin-bottom: 5px;
    color: #6574ad;
    font-size: 12px;
    font-weight: 700;
}

.development-status-card h2 {
    margin: 0 0 6px;
    color: var(--pl-text-main, #17172f);
    font-size: 21px;
    line-height: 1.35;
}

.development-status-card p {
    margin: 0;
    color: var(--pl-text-muted, #6b7280);
    font-size: 13px;
    line-height: 1.65;
}

.development-status-card a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #5b5fc7;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.card-grid.card-grid--learning-tools {
    grid-template-columns: repeat(2, minmax(280px, 420px));
}

.tool-card--planned {
    border: 1px dashed #d8dce5;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: none;
}

.tool-card--planned:hover {
    transform: none;
}

.tool-card--planned .tool-card-icon {
    background: linear-gradient(135deg, #e0e7ff, #fce7f3);
    color: #6772b8;
}

.exam-track-list {
    display: grid;
    gap: 7px;
    margin: 14px 0;
    text-align: left;
}

.exam-track-list span {
    padding: 9px 10px;
    border-radius: 9px;
    background: #f7f7fb;
    color: var(--pl-text-muted, #6b7280);
    font-size: 12px;
    line-height: 1.45;
}

.exam-track-list strong {
    color: #5b5fc7;
}

.course-card--planned {
    border: 1px dashed #d8dce5;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.68);
}

.course-card--planned:hover {
    transform: none;
    box-shadow: none;
}

.course-card-icon--educational,
.mobile-course-item-icon--educational {
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    color: #5b5fc7;
}

.course-card-icon--developmental,
.mobile-course-item-icon--developmental {
    background: linear-gradient(135deg, #dcfce7, #fef3c7);
    color: #2f855a;
}

.course-card-icon--social,
.mobile-course-item-icon--social {
    background: linear-gradient(135deg, #e0f2fe, #fce7f3);
    color: #3974a8;
}

.course-card-icon--personality,
.mobile-course-item-icon--personality {
    background: linear-gradient(135deg, #fae8ff, #ffedd5);
    color: #a04b93;
}

.mobile-course-item--planned {
    cursor: default;
    box-shadow: none;
    border: 1px dashed #d8dce5;
    background: rgba(255, 255, 255, 0.66);
}

.mobile-course-item--planned:active {
    transform: none;
}

.mobile-course-item-arrow {
    margin-left: auto;
    color: var(--pl-text-light, #a1a1aa);
    font-size: 12px;
}

.mobile-profile-item {
    width: 100%;
    border: 0;
    text-align: left;
    font-family: inherit;
}

.mobile-profile-item-copy {
    flex: 1;
    min-width: 0;
}

.mobile-profile-item-desc {
    margin-top: 3px;
    color: var(--pl-text-muted, #6b7280);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.mobile-profile-item-icon--wechat {
    color: #169b62;
    background: #e9fbf2;
}

.desktop-account-shell {
    position: relative;
}

.desktop-account-trigger {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.desktop-account-trigger:hover {
    background: #fff1f5;
}

.desktop-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1200;
    width: 220px;
    padding: 8px;
    border: 1px solid rgba(23, 23, 47, 0.08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(23, 23, 47, 0.16);
}

.desktop-account-menu[hidden],
.psylearn-wechat-modal[hidden] {
    display: none !important;
}

.desktop-account-menu button,
.desktop-account-menu a {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--pl-text-main, #17172f);
    font: inherit;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.desktop-account-menu button:hover,
.desktop-account-menu a:hover {
    background: #fff1f5;
    color: #c6346e;
}

.psylearn-wechat-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.psylearn-wechat-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.56);
}

.psylearn-wechat-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(430px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 26px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    text-align: center;
}

.psylearn-wechat-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f5f5f7;
    color: #606070;
    font-size: 17px;
    cursor: pointer;
}

.psylearn-wechat-modal-dialog h2 {
    margin: 4px 34px 6px;
    color: var(--pl-text-main, #17172f);
    font-size: 21px;
}

.psylearn-wechat-modal-dialog > p {
    margin: 0 0 16px;
    color: var(--pl-text-muted, #6b7280);
    font-size: 13px;
    line-height: 1.6;
}

.psylearn-wechat-qr {
    display: block;
    width: min(320px, 100%);
    height: auto;
    margin: 0 auto;
    border-radius: 14px;
}

.psylearn-wechat-tip {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f0fdf4;
    color: #27734e;
    font-size: 12px;
    line-height: 1.55;
}

body.modal-open {
    overflow: hidden;
}

.mobile-profile-item-icon--dashboard {
    color: #5b5fc7;
    background: #eef0ff;
}

@media (max-width: 599px) {
    html body.learn-home-page {
        min-height: 100dvh;
    }

    html body.learn-home-page > .container {
        min-height: calc(100dvh - 56px) !important;
    }

    html body.learn-home-page #mobile-tab-wrapper,
    html body.learn-home-page .mobile-tab-content.active,
    html body.learn-home-page .mobile-content {
        min-height: calc(100dvh - 56px - 80px);
    }
    .learning-dashboard {
        padding: 17px 15px;
        margin-bottom: 16px;
        border-radius: 15px;
    }

    .learning-dashboard-header {
        margin-bottom: 14px;
    }

    .learning-dashboard-header h2 {
        font-size: 17px;
    }

    .learning-dashboard-header p {
        font-size: 12px;
    }

    .learning-dashboard-stats {
        gap: 7px;
    }

    .learning-dashboard-stat {
        padding: 11px 5px;
    }

    .learning-dashboard-stat strong {
        font-size: 20px;
    }

    .learning-dashboard-row {
        font-size: 13px;
    }

    .psylearn-wechat-modal-dialog {
        padding: 24px 16px 18px;
        border-radius: 18px;
    }
    .development-status-card {
        align-items: flex-start;
        gap: 13px;
        margin-bottom: 16px;
        padding: 16px;
        border-radius: 15px;
    }

    .development-status-card-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 12px;
        font-size: 19px;
    }

    .development-status-card h2 {
        font-size: 17px;
    }
}

/* iPad/触屏大屏：首页使用与手机一致的 App 心智模型；普通 PC 仍保留聚合首页。 */
@media (min-width: 600px) and (max-width: 1024px),
       (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) {
    html body {
        padding: 0 !important;
        background: var(--pl-bg-page, #f7f7f5) !important;
    }

    html body.learn-home-page {
        min-height: 100dvh;
    }

    html .container {
        max-width: 100% !important;
        min-height: calc(100dvh - 68px) !important;
        display: block !important;
        padding: 0 0 calc(88px + env(safe-area-inset-bottom, 0px)) !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    html nav.top-nav,
    html .desktop-only {
        display: none !important;
    }

    html .mobile-only {
        display: block !important;
    }

    html #mobile-tab-wrapper {
        display: block !important;
    }

    html body.learn-home-page #mobile-tab-wrapper,
    html body.learn-home-page .mobile-tab-content.active,
    html body.learn-home-page .mobile-content {
        min-height: calc(100dvh - 68px - 88px);
    }

    html .mobile-top-bar {
        position: sticky;
        top: 0;
        z-index: 1000;
        height: 68px;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 10px max(24px, env(safe-area-inset-left, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid rgba(23, 23, 47, 0.07);
        backdrop-filter: blur(18px);
    }

    html body.recitation-subjects-page > .container {
        width: min(100% - 40px, 980px);
        padding: 22px 0 calc(100px + env(safe-area-inset-bottom, 0px)) !important;
    }

    html .mobile-top-bar-brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    html .mobile-top-bar-brand > i {
        color: var(--pl-brand-pink, #ff5f8f);
        font-size: 26px;
    }

    html .mobile-top-bar-brand-text h1 {
        margin: 0;
        color: var(--pl-text-main, #17172f);
        font-size: 19px;
        line-height: 1.2;
    }

    html .mobile-top-bar-brand-text p {
        margin: 2px 0 0;
        color: var(--pl-text-muted, #6b7280);
        font-size: 11px;
    }

    html .mobile-top-bar-actions button {
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--pl-brand-pink-2, #ec6bd9), var(--pl-brand-pink, #ff5f8f));
        color: #fff;
    }

    html .mobile-content {
        width: min(100% - 40px, 980px);
        margin: 0 auto;
        padding: 22px 0 8px;
    }

    html .mobile-section {
        margin-bottom: 22px;
    }

    html .mobile-section-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
        color: var(--pl-text-main, #17172f);
        font-size: 17px;
        font-weight: 700;
    }

    html .mobile-section-title i {
        color: var(--pl-brand-pink, #ff5f8f);
    }

    html #tab-course .mobile-section {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: min(840px, calc(100dvh - 68px - 118px));
        grid-template-rows: auto repeat(4, minmax(82px, 1fr));
        align-content: stretch;
        gap: 14px;
    }

    html #tab-course .mobile-section-title {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    html .mobile-course-item,
    html .mobile-profile-auth-card,
    html .mobile-profile-item {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 82px;
        margin: 0;
        padding: 16px;
        border-radius: 14px;
        background: #fff;
        color: inherit;
        text-decoration: none;
        box-shadow: 0 3px 12px rgba(23, 23, 47, 0.07);
    }

    html .mobile-course-item--planned {
        background: rgba(255, 255, 255, 0.66);
        box-shadow: none;
    }

    html .mobile-course-item-icon {
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 50px;
        border-radius: 13px;
        font-size: 21px;
    }

    html .mobile-course-item-icon--general {
        background: linear-gradient(135deg, var(--pl-brand-pink-2, #ec6bd9), var(--pl-brand-pink, #ff5f8f));
        color: #fff;
    }

    html .mobile-course-item-icon--experimental {
        background: linear-gradient(135deg, #a8edea, #fed6e3);
        color: #d9467d;
    }

    html .mobile-course-item-icon--statistics {
        background: linear-gradient(135deg, #ffecd2, #fcb69f);
        color: #d9467d;
    }

    html .mobile-course-item-icon--measurement {
        background: linear-gradient(135deg, #d299c2, #fef9d7);
        color: #d9467d;
    }

    html .mobile-course-item-content,
    html .mobile-profile-item-copy,
    html .mobile-profile-info {
        flex: 1;
        min-width: 0;
    }

    html .mobile-course-item-title,
    html .mobile-profile-item-text,
    html .mobile-profile-username {
        color: var(--pl-text-main, #17172f);
        font-size: 16px;
        font-weight: 700;
    }

    html .mobile-course-item-status {
        display: inline-block;
        margin-top: 5px;
        padding: 3px 9px;
        border-radius: 999px;
        font-size: 11px;
    }

    html .mobile-course-item-status--active {
        background: #e8f5e9;
        color: #2e7d32;
    }

    html .mobile-course-item-status--planned {
        background: #f2f3f5;
        color: #8b92a1;
    }

    html .mobile-profile-auth-card,
    html .mobile-profile-item {
        margin-bottom: 12px;
    }

    html .mobile-profile-avatar {
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--pl-brand-pink-2, #ec6bd9), var(--pl-brand-pink, #ff5f8f));
        color: #fff;
        font-size: 20px;
        font-weight: 700;
    }

    html .mobile-profile-plan,
    html .mobile-profile-item-desc {
        margin-top: 3px;
        color: var(--pl-text-muted, #6b7280);
        font-size: 12px;
    }

    html .mobile-profile-item-icon {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        border-radius: 11px;
        background: #f8eef3;
        color: #d9467d;
        font-size: 18px;
    }

    html .mobile-profile-item-icon--wechat {
        color: #169b62;
        background: #e9fbf2;
    }

    html .mobile-profile-logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 46px;
        border: 1px solid #eadfe4;
        border-radius: 11px;
        background: #fff;
        color: #c2415e;
        font-size: 14px;
        font-weight: 600;
    }

    html #mobile-bottom-nav.mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1500;
        height: calc(70px + env(safe-area-inset-bottom, 0px));
        display: flex !important;
        align-items: flex-start;
        justify-content: space-around;
        padding: 6px 0 env(safe-area-inset-bottom, 0px);
        border-top: 1px solid rgba(23, 23, 47, 0.08);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -8px 26px rgba(23, 23, 47, 0.07);
        backdrop-filter: blur(18px);
    }

    html .mobile-bottom-nav-item {
        flex: 1;
        min-height: 58px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 0;
        background: transparent;
        color: #9298a6;
    }

    html .mobile-bottom-nav-item i {
        font-size: 21px;
    }

    html .mobile-bottom-nav-item span {
        font-size: 11px;
        font-weight: 600;
    }

    html .mobile-bottom-nav-item.active {
        color: var(--pl-brand-pink, #ff5f8f);
    }

    html .page-footer {
        padding: 24px 20px 100px;
        font-size: 12px;
    }

    html .learning-dashboard {
        margin-bottom: 22px;
    }

    html .development-status-card {
        margin-bottom: 22px;
    }
}
