*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei','Noto Sans SC',sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;background:#EDEBE6;color:#3A3632;overflow-x:hidden}
/* 网格噪点背景纹理 — 模拟纸张/教科书的微质感 */
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background-image:radial-gradient(circle,#C8C4BD .5px,transparent .5px);background-size:18px 18px;opacity:.35}
::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#C8C4BD;border-radius:3px}
.app-wrapper{max-width:1440px;margin:0 auto;height:100vh;display:flex;flex-direction:column;position:relative;background:#F7F5F1}
.mobile-topbar{display:none;align-items:center;padding:12px 16px;background:#FDFCFA;border-bottom:1px solid #D6D1CA;z-index:30}
.mobile-topbar .hamburger{width:36px;height:36px;border-radius:8px;border:1px solid #D6D1CA;background:#FDFCFA;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;color:#8A8580}
.mobile-topbar .topbar-logo{display:flex;align-items:center;gap:8px;margin-left:12px}
.mobile-topbar .topbar-logo-icon{width:32px;height:32px;border-radius:8px;background:linear-gradient(135deg,#808C95,#9AA5AE);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:16px;color:#fff}
.mobile-topbar .topbar-logo-text{font-size:16px;font-weight:700;color:#3A3632}
.app-layout{display:flex;flex:1;overflow:hidden}

/* Sidebar — 直角 + 细线 */
.sidebar{width:240px;min-width:240px;background:#FDFCFA;border-right:1px solid #D6D1CA;display:flex;flex-direction:column;z-index:20;transition:transform .3s;border-radius:0}
.sidebar-logo{padding:20px 20px 16px;display:flex;align-items:center;gap:12px}
.sidebar-logo-icon{width:42px;height:42px;border-radius:8px;background:linear-gradient(135deg,#808C95,#9AA5AE);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:20px;color:#fff}
.sidebar-logo-text{font-size:18px;font-weight:700;color:#3A3632}
.sidebar-search{padding:0 16px 12px}
.sidebar-search input{width:100%;padding:8px 12px 8px 32px;border-radius:6px;border:1px solid #D6D1CA;font-size:12px;outline:none;background:#F7F5F1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23ABA6A1'%3E%3Cpath d='M10.5 9.5l3 3-1.5 1.5-3-3A5.5 5.5 0 117 12.5a5.5 5.5 0 013.5-3z'/%3E%3C/svg%3E") 10px center no-repeat;transition:border-color .2s}
.sidebar-search input:focus{border-color:#808C95;background-color:#FDFCFA}
.sidebar-nav{flex:1;padding:8px 12px;display:flex;flex-direction:column;gap:3px;overflow-y:auto}
.nav-item{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:6px;cursor:pointer;font-size:14px;font-weight:500;color:#8A8580;transition:all .15s;border:none;background:none;width:100%;text-align:left}
.nav-item:hover{background:#EAE7E2;color:#808C95}
.nav-item.active{background:#E6E9EC;color:#657078;font-weight:600}
.nav-item .nav-icon{font-size:17px;width:24px;text-align:center;flex-shrink:0}
.sidebar-footer{padding:16px;border-top:1px solid #EAE7E2;display:flex;align-items:center;gap:10px}
.sidebar-avatar{width:36px;height:36px;border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;box-shadow:inset 0 -3px 0 rgba(0,0,0,.1);display:flex;align-items:center;justify-content:center;font-size:16px;color:#fff;font-weight:700;flex-shrink:0}
.sidebar-user-name{font-size:13px;font-weight:600;color:#3A3632}
.sidebar-user-id{font-size:11px;color:#ABA6A1}

/* Main */
.main-content{flex:1;overflow-y:auto;padding:28px 36px}
.main-content-inner{max-width:1000px}
.page-header{margin-bottom:24px}
.page-title{font-size:24px;font-weight:700;color:#3A3632}
.page-subtitle{font-size:13px;color:#ABA6A1;margin-top:4px}
.page{display:none}.page.active{display:block}

/* Cards — 8px圆角 + 纯细线无阴影 */
.video-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:1200px){.video-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.video-grid{grid-template-columns:1fr}}
.video-card{background:#FDFCFA;border-radius:8px;overflow:hidden;cursor:pointer;transition:all .15s;border:1px solid #D6D1CA}
.video-card:hover{border-color:#808C95;background:#F0EEEA}
.video-card-cover{aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;font-size:36px;position:relative}
.video-card-duration{position:absolute;bottom:8px;right:8px;background:rgba(58,54,50,.65);color:#fff;font-size:11px;padding:2px 8px;border-radius:4px;font-weight:500}
.video-card-body{padding:14px}
.video-card-title{font-size:14px;font-weight:600;line-height:1.4;color:#3A3632;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:8px}
.video-card-meta{display:flex;align-items:center;gap:6px;font-size:12px;color:#ABA6A1}
.video-card-tag{font-size:11px;padding:3px 8px;border-radius:4px;background:#EAE7E2;color:#808C95;font-weight:500}
.video-card-author{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.knowledge-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
@media(max-width:640px){.knowledge-grid{grid-template-columns:1fr}}
.knowledge-card{background:#FDFCFA;border-radius:8px;overflow:hidden;cursor:pointer;transition:all .15s;border:1px solid #D6D1CA}
.knowledge-card:hover{border-color:#808C95}
.knowledge-card-visual{height:120px;display:flex;align-items:center;justify-content:center;font-size:42px;position:relative;overflow:hidden}
.knowledge-card-question{position:absolute;bottom:12px;left:16px;right:16px;font-size:14px;font-weight:700;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.3);line-height:1.3}
.knowledge-card-body{padding:14px}
.knowledge-card-title{font-size:15px;font-weight:700;color:#3A3632;margin-bottom:6px}
.knowledge-card-desc{font-size:12px;color:#8A8580;line-height:1.5;margin-bottom:8px}
.knowledge-card-time{font-size:11px;color:#ABA6A1}

/* Story/Sim */
.story-container,.sim-container{background:#FDFCFA;border-radius:8px;padding:32px;border:1px solid #D6D1CA;min-height:400px}
.story-stats{display:flex;gap:12px;margin-bottom:20px;flex-wrap:wrap}
.story-stat{font-size:13px;padding:6px 14px;border-radius:8px;color:#fff;font-weight:600}
.story-text{font-size:15px;line-height:1.8;color:#5A5550;min-height:120px;white-space:pre-line}
.story-character{font-weight:700;color:#808C95;margin-bottom:8px;font-size:14px}
.story-choices{display:flex;flex-direction:column;gap:10px;margin-top:20px}
.story-choice{background:#F7F5F1;border:1px solid #D6D1CA;border-radius:8px;padding:14px 18px;font-size:14px;font-weight:600;cursor:pointer;transition:all .15s;text-align:left;color:#3A3632}
.story-choice:hover{border-color:#808C95;background:#EAE7E2}
.sim-stats{display:flex;gap:16px;margin-bottom:20px}
.sim-stat{flex:1;background:#F7F5F1;border:1px solid #EAE7E2;border-radius:8px;padding:14px;text-align:center}
.sim-stat-val{font-size:28px;font-weight:800;color:#3A3632}
.sim-stat-label{font-size:11px;color:#8A8580;margin-top:4px}

/* Filters */
.filter-bar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.filter-btn{padding:7px 14px;border-radius:6px;border:1px solid #D6D1CA;background:#FDFCFA;font-size:13px;font-weight:500;color:#8A8580;cursor:pointer;transition:all .15s;white-space:nowrap}
.filter-btn:hover{border-color:#808C95;color:#808C95}
.filter-btn.active{background:#808C95;border-color:#808C95;color:#fff;font-weight:600}

/* Search results */
.search-results{display:none;position:absolute;top:100%;left:0;right:0;background:#FDFCFA;border:1px solid #D6D1CA;border-radius:6px;z-index:40;max-height:300px;overflow-y:auto;margin-top:4px}
.search-results.show{display:block}
.search-result-item{padding:10px 16px;cursor:pointer;border-bottom:1px solid #EAE7E2;font-size:13px;display:flex;align-items:center;gap:8px;color:#3A3632}
.search-result-item:hover{background:#EAE7E2}
.search-result-item:last-child{border-bottom:none}
.search-result-type{font-size:10px;padding:2px 6px;border-radius:3px;background:#E6E9EC;color:#657078;font-weight:600;flex-shrink:0}

/* AI Toggle + Float merge — 合并为一个扇形展开按钮 */
.float-hub{position:fixed;bottom:24px;right:24px;z-index:25;display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.float-hub-btn{width:48px;height:48px;border-radius:50%;border:none;background:#808C95;color:#fff;font-size:20px;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center}
.float-hub-btn:hover{background:#657078;transform:scale(1.05)}
.float-hub-expand{display:none;flex-direction:column;align-items:flex-end;gap:8px}
.float-hub.open .float-hub-expand{display:flex}
.float-hub-child{width:44px;height:44px;border-radius:50%;border:none;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;transition:all .2s;position:relative;text-decoration:none}
.float-hub-child:hover{transform:scale(1.08)}
.float-hub-child.ai{background:#A8907E;color:#fff}
.float-hub-child.mbti{background:linear-gradient(135deg,#8A9BA8,#A0B1BD);color:#fff}
.float-hub-label{position:absolute;right:52px;white-space:nowrap;font-size:11px;font-weight:600;color:#8A8580;background:#FDFCFA;border:1px solid #D6D1CA;padding:4px 10px;border-radius:4px;pointer-events:none;opacity:0;transition:opacity .2s}
.float-hub-child:hover .float-hub-label{opacity:1}

/* AI Panel */
.ai-panel{position:fixed;top:0;right:0;bottom:0;width:360px;background:#FDFCFA;border-left:1px solid #D6D1CA;z-index:30;transform:translateX(100%);transition:transform .3s;display:flex;flex-direction:column}
.ai-panel.open{transform:translateX(0)}
.ai-panel-header{padding:16px;border-bottom:1px solid #EAE7E2;display:flex;align-items:center;justify-content:space-between;font-weight:600;font-size:14px;color:#3A3632}
.ai-panel-close{width:32px;height:32px;border-radius:50%;border:none;background:#EAE7E2;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;color:#8A8580}
.ai-panel-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}
.ai-panel-input-area{padding:12px 16px;border-top:1px solid #EAE7E2;display:flex;gap:8px}
.ai-panel-input-area input{flex:1;padding:10px 14px;border-radius:8px;border:1px solid #D6D1CA;font-size:13px;outline:none;background:#F7F5F1}
.ai-panel-input-area input:focus{border-color:#808C95}
.ai-send-btn{min-width:40px;height:40px;border-radius:50%;border:none;background:#808C95;color:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center}

.chat-msg{display:flex;animation:fadeIn .3s ease}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.chat-msg.assistant{justify-content:flex-start}.chat-msg.user{justify-content:flex-end}
.chat-bubble{max-width:85%;padding:10px 14px;border-radius:8px;font-size:13px;line-height:1.6;word-break:break-word}
.chat-msg.assistant .chat-bubble{background:#EAE7E2;color:#3A3632;border-bottom-left-radius:2px}
.chat-msg.user .chat-bubble{background:#808C95;color:#fff;border-bottom-right-radius:2px}

/* Modal — 16px圆角 */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(58,54,50,.4);z-index:100;justify-content:center;align-items:center}
.modal-overlay.show{display:flex}
.modal-content{background:#FDFCFA;border-radius:16px;padding:28px;max-width:560px;width:90vw;max-height:80vh;overflow-y:auto;border:1px solid #D6D1CA;animation:modalIn .2s ease}
@keyframes modalIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
.modal-close-btn{position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;border:none;background:#EAE7E2;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;color:#8A8580}

.fav-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:1200px){.fav-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.fav-grid{grid-template-columns:1fr}}
.fav-card{background:#FDFCFA;border-radius:8px;padding:16px;border:1px solid #D6D1CA;position:relative}
.fav-card-remove{position:absolute;top:10px;right:10px;width:28px;height:28px;border-radius:50%;border:none;background:#F5EAEA;color:#C49595;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center}

.spinner{width:32px;height:32px;border:3px solid #EAE7E2;border-top-color:#808C95;border-radius:50%;animation:spin .7s linear infinite;margin:40px auto}
@keyframes spin{to{transform:rotate(360deg)}}
.section-title{font-size:16px;font-weight:700;margin-bottom:16px;color:#3A3632}

/* Banner */
.banner{background:linear-gradient(135deg,#808C95,#9AA5AE);border-radius:8px;padding:28px 32px;color:#fff;margin-bottom:24px;position:relative;overflow:hidden}
.banner::after{content:"";position:absolute;top:-30px;right:-30px;width:120px;height:120px;border-radius:50%;background:rgba(255,255,255,.08)}
.banner-title{font-size:22px;font-weight:800;margin-bottom:8px;position:relative;z-index:1}
.banner-text{font-size:14px;opacity:.85;position:relative;z-index:1}

/* ========== Desmos-style Home Page ========== */
.ds-hero{text-align:center;padding:40px 20px 20px}
.ds-hero-title{font-size:28px;font-weight:800;color:#3A3632;margin-bottom:8px;letter-spacing:-0.3px}
.ds-hero-sub{font-size:14px;color:#8A8580;margin-bottom:20px}
.ds-hero-canvas{display:block;margin:0 auto 20px;border-radius:8px;background:#FDFCFA;border:1px solid #D6D1CA;max-width:100%;height:auto}
.ds-hero-cta{padding:12px 32px;border-radius:8px;border:none;background:#A8907E;color:#fff;font-size:15px;font-weight:700;cursor:pointer;transition:all .15s}
.ds-hero-cta:hover{background:#927A6A;transform:translateY(-1px)}
.ds-section-title{font-size:18px;font-weight:700;color:#3A3632;margin:28px 0 16px}
.ds-card-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:8px}
.ds-card-grid-3{grid-template-columns:repeat(3,1fr)}
@media(max-width:640px){.ds-card-grid,.ds-card-grid-3{grid-template-columns:1fr}}
.ds-feature-card{background:#FDFCFA;border-radius:8px;padding:24px;border:1px solid #D6D1CA;cursor:pointer;transition:all .15s;text-align:center}
.ds-feature-card:hover{border-color:#808C95;background:#F0EEEA}
.ds-feature-card-icon{font-size:36px;margin-bottom:10px}
.ds-feature-card-name{font-size:15px;font-weight:700;color:#3A3632;margin-bottom:4px}
.ds-feature-card-desc{font-size:12px;color:#8A8580;line-height:1.5}
.ds-footer-note{padding:24px 0 8px;text-align:center;font-size:12px;color:#ABA6A1;border-top:1px solid #EAE7E2;margin-top:24px}

/* ========== Math Life Hub ========== */
.ml-theme-grid{margin-bottom:28px}
.ml-theme-card{position:relative}
.ml-theme-card.ml-theme-coming{cursor:default;opacity:.72}
.ml-theme-card.ml-theme-coming:hover{background:#FDFCFA;border-color:#D6D1CA}
.ml-coming-badge{display:inline-block;margin-top:10px;padding:3px 10px;border-radius:999px;background:#EAE7E2;color:#8A8580;font-size:11px;font-weight:600}
.ml-more{margin-top:28px;padding:22px 0 8px;border-top:1px solid #EAE7E2}
.ml-more-title{font-size:16px;font-weight:700;color:#3A3632;margin-bottom:6px}
.ml-more-sub{font-size:12px;color:#8A8580;margin-bottom:16px}
.ml-more-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media(max-width:900px){.ml-more-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.ml-more-grid{grid-template-columns:1fr}}
.ml-more-card{border:1px dashed #D6D1CA;border-radius:8px;padding:14px;text-align:center;background:#FDFCFA}
.ml-more-icon{font-size:26px;margin-bottom:6px}
.ml-more-name{font-size:13px;font-weight:600;color:#3A3632;margin-bottom:6px}
.ml-more-tag{font-size:11px;color:#ABA6A1}
.ml-player-header{display:flex;align-items:center;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.ml-back-btn{padding:8px 14px;border:1px solid #D6D1CA;border-radius:6px;background:#FDFCFA;color:#657078;font-size:12px;cursor:pointer}
.ml-back-btn:hover{background:#EAE7E2}
.ml-player-title{font-size:18px;font-weight:700;color:#3A3632}
.ml-player-sub{font-size:12px;color:#8A8580;flex:1;min-width:180px}
.ml-stats{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.ml-stat{display:flex;align-items:center;gap:8px;background:#F7F5F1;border:1px solid #EAE7E2;border-radius:8px;padding:8px 12px;font-size:12px}
.ml-stat b{font-size:16px}
.ml-stat span{color:#8A8580}
.ml-stat-icon{width:26px;height:26px;border-radius:6px;color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;flex-shrink:0}
.stats5{margin-top:12px;padding:10px 12px;background:#F7F5F1;border:1px solid #EAE7E2;border-radius:8px;text-align:left}
.stats5-row{display:flex;align-items:center;gap:8px;margin-bottom:6px;font-size:10px}
.stats5-row:last-child{margin-bottom:0}
.stats5-row span{width:32px;color:#8A8580;flex-shrink:0}
.stats5-track{flex:1;height:5px;background:#E8E5E0;border-radius:999px;overflow:hidden}
.stats5-track i{display:block;height:100%;background:linear-gradient(90deg,#A8907E,#C47F3A);border-radius:999px}
.stats5-row b{width:24px;text-align:right;color:#3A3632;font-weight:700}
.ml-more-desc{font-size:11px;color:#8A8580;line-height:1.4;margin-bottom:6px;padding:0 6px}
.ml-alumni{margin-top:28px;padding:22px 0 8px;border-top:1px solid #EAE7E2}
.ml-alumni-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.ml-alumni-title{font-size:16px;font-weight:700;color:#3A3632;margin-bottom:6px}
.ml-alumni-sub{font-size:12px;color:#8A8580}
.ml-alumni-preview-btn{padding:8px 16px;border-radius:999px;border:1.5px solid #A8907E;background:#FDFCFA;color:#A8907E;font-size:12px;font-weight:700;cursor:pointer;transition:all .15s}
.ml-alumni-preview-btn:hover{background:#A8907E;color:#fff}
.ml-alumni-entry{display:flex;align-items:center;gap:14px;width:100%;margin-top:26px;padding:18px 20px;border:1.5px solid #A8907E;border-radius:8px;background:#FDFCFA;cursor:pointer;transition:all .15s;font:inherit;text-align:left}
.ml-alumni-entry:hover{background:#FBF8F3;box-shadow:0 4px 14px rgba(0,0,0,.06)}
.ml-alumni-entry-icon{width:46px;height:46px;border-radius:50%;background:#EAE7E2;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.ml-alumni-entry-body{flex:1;min-width:0}
.ml-alumni-entry-body b{display:block;font-size:15px;color:#3A3632;margin-bottom:3px}
.ml-alumni-entry-body small{font-size:12px;color:#8A8580}
.ml-alumni-entry-arrow{font-size:18px;color:#A8907E;font-weight:700}
.ml-alumni-list-head{margin:18px 0 14px}
#alumniCards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.ml-alumni-card{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;padding:16px 12px;border:1px solid #D6D1CA;border-radius:8px;background:#FDFCFA;cursor:pointer;text-align:center;transition:all .15s;font:inherit}
.ml-alumni-card:hover{border-color:#A8907E;box-shadow:0 4px 14px rgba(0,0,0,.07);transform:translateY(-2px)}
.ml-alumni-card .ml-alumni-avatar{width:46px;height:46px;font-size:22px}
.ml-alumni-skill-tags{display:flex;flex-wrap:wrap;gap:4px;justify-content:center}
.ml-alumni-skill-tag{font-size:10px;padding:2px 7px;border-radius:999px;background:#F0EDE8;color:#8A8580;font-weight:600}
.ml-alumni-dim-row{display:flex;gap:6px;font-size:10px;color:#8A8580;flex-wrap:wrap;justify-content:center}
.ml-alumni-card-cta{font-size:11px;font-weight:700;color:#A8907E;margin-top:4px}
.ml-story-linear{max-width:720px;margin:0 auto;padding:18px 0}
.ml-story-progress{height:6px;background:#EAE7E2;border-radius:999px;overflow:hidden;margin-bottom:18px}
.ml-story-progress i{display:block;height:100%;background:linear-gradient(90deg,#A8907E,#C47F3A);border-radius:999px;transition:width .3s}
.ml-story-stage-name{font-size:15px;font-weight:700;color:#3A3632;margin-bottom:12px}
.ml-story-scene{font-size:15px;line-height:1.9;color:#3A3632;background:#F7F5F1;border:1px solid #EAE7E2;border-radius:8px;padding:18px 20px;margin-bottom:14px}
.ml-story-effect{font-size:12px;color:#8A8580;background:#FBF8F3;border:1px solid #EAE7E2;border-radius:8px;padding:10px 14px;margin-bottom:14px}
.ml-story-next{display:block;margin-left:auto;padding:10px 20px;border-radius:8px;border:1.5px solid #A8907E;background:#A8907E;color:#fff;font-size:13px;font-weight:700;cursor:pointer}
.ml-story-next:hover{background:#9A7D69}
.ml-story-ending{font-size:14px;color:#3A3632;background:#F7F5F1;border:1px dashed #D6D1CA;border-radius:8px;padding:18px;margin-bottom:14px;line-height:1.8}
.ml-story-timeline{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:16px}
.ml-story-stage{background:#F7F5F1;border:1px solid #EAE7E2;border-radius:8px;padding:14px;text-align:center}
.ml-story-stage span{width:24px;height:24px;border-radius:50%;background:#A8907E;color:#fff;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;margin-bottom:6px}
.ml-story-stage b{display:block;font-size:13px;color:#3A3632;margin-bottom:4px}
.ml-story-stage small{font-size:10px;color:#ABA6A1}
.ml-alumni-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.ml-alumni-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;border:1px dashed #D6D1CA;border-radius:8px;padding:16px 10px;background:#FDFCFA;text-align:center;min-height:122px}
.ml-alumni-slot.join{cursor:pointer;color:#8A8580;font:inherit}
.ml-alumni-slot.join:hover{border-color:#A8907E;color:#A8907E;background:#FBF8F3}
.ml-alumni-avatar{width:40px;height:40px;border-radius:50%;background:#EAE7E2;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.ml-alumni-code{font-size:10px;color:#ABA6A1;letter-spacing:.5px}
.ml-alumni-name{font-size:13px;font-weight:600;color:#3A3632}
.ml-alumni-meta{font-size:10px;color:#ABA6A1;line-height:1.4}
.ml-alumni-pipeline{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.ml-pipeline-step{display:flex;align-items:center;gap:8px;background:#F7F5F1;border:1px solid #EAE7E2;border-radius:8px;padding:10px 12px;font-size:12px;color:#8A8580}
.ml-pipeline-step span{width:22px;height:22px;border-radius:50%;background:#A8907E;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ml-pipeline-step b{font-size:12px;color:#3A3632}
.ml-alumni-scaffold{padding:20px 0}
.ml-scaffold-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.ml-alumni-empty{border:1px dashed #D6D1CA;border-radius:8px;padding:28px;text-align:center;color:#8A8580;font-size:13px;background:#FDFCFA}
.ml-alumni-draft{display:flex;align-items:center;gap:10px;border:1px solid #EAE7E2;border-radius:8px;padding:12px 14px;background:#FDFCFA;margin-bottom:10px;font-size:13px;color:#3A3632}
@media(max-width:900px){.ml-alumni-grid{grid-template-columns:repeat(2,1fr)}.ml-alumni-pipeline{grid-template-columns:repeat(2,1fr)}.ml-scaffold-grid{grid-template-columns:repeat(2,1fr)}#alumniCards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.ml-alumni-grid{grid-template-columns:1fr 1fr}.ml-alumni-slot{min-height:108px;padding:12px 8px}#alumniCards{grid-template-columns:1fr 1fr}.ml-story-timeline{grid-template-columns:repeat(2,1fr)}}

/* ========== Numberphile-style Discover Page ========== */
.np-greeting{font-size:14px;color:#8A8580;margin-bottom:24px;line-height:1.6}
.np-video-list{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
@media(max-width:1200px){.np-video-list{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.np-video-list{grid-template-columns:1fr;gap:16px}}
.np-card{background:#FDFCFA;border-radius:8px;overflow:hidden;border:1px solid #D6D1CA;cursor:pointer;transition:all .15s;display:flex;flex-direction:column}
.np-card:hover{border-color:#808C95}
.np-cover{position:relative;aspect-ratio:16/9;overflow:hidden;border-radius:8px 8px 0 0}
.np-cover-inner{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform .35s ease}
.np-cover-icon{font-size:40px;opacity:.3}
.np-cover-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.np-card:hover .np-cover-inner{transform:scale(1.05)}
.np-cover-duration{position:absolute;top:8px;left:8px;background:rgba(58,54,50,.55);backdrop-filter:blur(4px);color:#fff;font-size:11px;font-weight:500;padding:2px 8px;border-radius:4px;letter-spacing:.3px;z-index:2}
.np-cover-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:50%;background:rgba(58,54,50,.4);backdrop-filter:blur(4px);color:#fff;font-size:16px;display:flex;align-items:center;justify-content:center;padding-left:3px;opacity:0;transition:opacity .25s;pointer-events:none;z-index:2}
.np-card:hover .np-cover-play{opacity:1}
.np-cover-fav{position:absolute;top:8px;right:8px;width:30px;height:30px;border-radius:50%;border:none;background:rgba(58,54,50,.3);backdrop-filter:blur(4px);font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s;z-index:2}
.np-card:hover .np-cover-fav,.np-cover-fav.faved{opacity:1}
.np-body{padding:12px 14px 14px;display:flex;flex-direction:column;flex:1}
.np-card-title{font-size:14px;font-weight:600;line-height:1.45;color:#3A3632;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:8px;min-height:40px}
.np-stats{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#ABA6A1;margin-bottom:8px}
.np-stat{display:flex;align-items:center;gap:4px}
.np-uploader{display:flex;align-items:center;gap:8px;margin-top:auto}
.np-up-avatar{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;color:#fff;font-weight:600;flex-shrink:0}
.np-up-name{font-size:12px;color:#8A8580;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np-load-hint{grid-column:1/-1;text-align:center;font-size:12px;color:#ABA6A1;padding:16px 0 4px}

/* ========== Five-Dimension Ability Map ========== */
#dimMap{margin-bottom:18px}
.dim-map-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.dim-map-title{font-size:18px;font-weight:700;color:#3A3632}
.dim-map-sub{font-size:12px;color:#8A8580;margin-top:4px}
.dim-map-legend{display:flex;flex-wrap:wrap;gap:8px;padding-top:2px}
.dim-map-legend-item{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#8A8580}
.dim-map-legend-item i{width:8px;height:8px;border-radius:50%;background:var(--dim-color)}
.dim-map-board{position:relative;height:360px;background:linear-gradient(rgba(58,54,50,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(58,54,50,.045) 1px,transparent 1px),#F7F5F1;background-size:40px 40px;border:1px dashed #D6D1CA;border-radius:8px;overflow:hidden}
.dim-map-svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.dim-map-svg line{stroke:#C8C4BD;stroke-width:.45;stroke-dasharray:2.5 3}
.dim-map-svg .dim-map-spoke{stroke:#D6D1CA;stroke-width:.3}
.dim-map-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:76px;height:76px;border-radius:50%;background:#FDFCFA;border:1.5px solid #A8907E;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#3A3632;font-size:11px;box-shadow:0 3px 10px rgba(0,0,0,.08);z-index:2}
.dim-map-gourd{width:30px;height:42px;border-radius:15px 15px 16px 16px / 20px 20px 24px 24px;background:linear-gradient(160deg,#8A9BA8,#65707A);color:#fff;font-size:16px;font-weight:800;display:flex;align-items:center;justify-content:center}
.dim-map-node{position:absolute;transform:translate(-50%,-50%);min-width:104px;padding:10px 12px;border-radius:8px;background:#FDFCFA;border:1.5px solid var(--dim-color);box-shadow:0 3px 10px rgba(0,0,0,.06);cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px;transition:all .18s;z-index:3}
.dim-map-node:hover,.dim-map-node.active{transform:translate(-50%,-50%) scale(1.06);box-shadow:0 6px 18px rgba(58,54,50,.14)}
.dim-node-icon{font-size:22px;line-height:1}
.dim-node-name{font-size:13px;font-weight:700;color:#3A3632;white-space:nowrap}
.dim-node-value{font-size:12px;font-weight:800;color:var(--dim-color);min-width:30px;height:20px;border-radius:10px;background:rgba(58,54,50,.06);display:flex;align-items:center;justify-content:center}
.dim-map-foot{text-align:center;font-size:11px;color:#ABA6A1;margin-top:10px}
.dim-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.dim-tab{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;border:1.5px solid #D6D1CA;background:#FDFCFA;color:#3A3632;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}
.dim-tab:hover{border-color:var(--dim-color,#A8907E);color:var(--dim-color,#A8907E)}
.dim-tab.active{background:var(--dim-color,#A8907E);border-color:var(--dim-color,#A8907E);color:#fff}
.dim-tab span{font-size:11px;opacity:.78;font-weight:700}
.np-dim-badge{display:inline-flex;align-items:center;gap:4px;width:fit-content;font-size:11px;font-weight:700;color:var(--dim-color);background:rgba(58,54,50,.05);border:1px solid rgba(58,54,50,.12);border-radius:6px;padding:3px 8px;margin-bottom:8px}
.video-modal-top{margin-bottom:10px}
.video-modal-dim{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:var(--dim-color);background:rgba(58,54,50,.05);border:1px solid rgba(58,54,50,.12);border-radius:6px;padding:3px 8px;margin-bottom:8px}
.video-modal-title{font-size:18px;font-weight:700;color:#3A3632;line-height:1.4}
.video-modal-player{aspect-ratio:16/9;background:#111;border-radius:8px;margin:12px 0;overflow:hidden;display:flex;align-items:center;justify-content:center}
.video-modal-player iframe{width:100%;height:100%;border:0}
.video-modal-player.empty{background:#F1F5F9;color:#CBD5E1;font-size:48px}
.video-modal-desc{font-size:14px;color:#64748B;line-height:1.7;margin-bottom:8px}
.video-modal-meta{display:flex;gap:8px;flex-wrap:wrap;font-size:12px;color:#94A3B8}
.video-claim-box{margin-top:14px;padding-top:14px;border-top:1px solid #EAE7E2}
.video-claim-btn{width:100%;padding:12px;border-radius:8px;border:1.5px solid var(--dim-color,#5B6AF0);background:var(--dim-color,#5B6AF0);color:#fff;font-size:14px;font-weight:700;cursor:pointer}
.video-claim-btn:hover{opacity:.9}
.video-claim-btn.claimed{background:#E8E5E0;border-color:#D6D1CA;color:#8A8580;cursor:default;opacity:1}
.video-claim-hint{font-size:12px;color:#ABA6A1;line-height:1.6}
@media(max-width:760px){
  .dim-map-board{height:430px}
  .dim-map-node{min-width:76px;padding:6px}
  .dim-node-name{font-size:11px}
  .dim-node-value{font-size:10px;height:18px;min-width:24px}
  .dim-map-legend{display:none}
}

/* Profile */
.profile-card{background:linear-gradient(135deg,#808C95,#9AA5AE);border-radius:8px;padding:28px;color:#fff;display:flex;align-items:center;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.profile-avatar-lg{width:72px;height:72px;border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;box-shadow:inset 0 -3px 0 rgba(0,0,0,.08);background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;font-size:32px;font-weight:800;flex-shrink:0}
.profile-name-lg{font-size:22px;font-weight:800;margin-bottom:4px}
.profile-id-lg{font-size:13px;opacity:.8}
.profile-stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:20px}
.profile-stat-card{background:#FDFCFA;border-radius:8px;padding:20px;text-align:center;border:1px solid #D6D1CA}
.profile-stat-card .num{font-size:32px;font-weight:800;color:#808C95}
.profile-stat-card .label{font-size:12px;color:#8A8580;margin-top:4px}

/* Pet display on home */
.pet-card{background:linear-gradient(135deg,#8A9BA8,#9AADBA);border-radius:8px;padding:24px 28px;color:#fff;display:flex;align-items:center;gap:20px;margin-bottom:24px;position:relative;overflow:hidden}
.pet-card::after{content:"";position:absolute;top:-20px;right:-20px;width:100px;height:100px;border-radius:50%;background:rgba(255,255,255,.1)}
.pet-avatar{width:80px;height:80px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:40px;font-weight:800;background:rgba(255,255,255,.2);flex-shrink:0;position:relative;z-index:1}
.pet-info{position:relative;z-index:1}
.pet-name{font-size:20px;font-weight:800;margin-bottom:4px}
.pet-type{font-size:13px;opacity:.85;margin-bottom:6px}
.pet-exp-bar{height:6px;background:rgba(255,255,255,.25);border-radius:3px;overflow:hidden;width:200px}
.pet-exp-fill{height:100%;background:#FDFCFA;border-radius:3px;transition:width .5s /* 注意：JS 中使用 requestAnimationFrame 实现跳动动画，覆盖此 transition */};
.pet-level{font-size:12px;margin-top:4px;opacity:.8}
.pet-dims{display:grid;grid-template-columns:repeat(5,minmax(96px,1fr));gap:8px;margin:12px 0;max-width:680px}
.pet-dim{display:grid;grid-template-columns:18px 30px 1fr 26px;align-items:center;gap:6px;background:rgba(255,255,255,.14);border-radius:6px;padding:6px 8px;font-size:10px}
.pet-dim-name{color:rgba(255,255,255,.88);white-space:nowrap}
.pet-dim-track{height:5px;background:rgba(255,255,255,.25);border-radius:999px;overflow:hidden}
.pet-dim-track i{display:block;height:100%;border-radius:999px}
.pet-dim b{text-align:right;color:#fff;font-variant-numeric:tabular-nums}
@media(max-width:900px){.pet-dims{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.pet-dims{grid-template-columns:1fr 1fr}.pet-card{align-items:flex-start}}

/* Toolbox */
.tool-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:24px}
@media(max-width:640px){.tool-grid{grid-template-columns:1fr}}
.tool-card{background:#FDFCFA;border-radius:8px;padding:20px;border:1px solid #D6D1CA;cursor:pointer;transition:all .15s;text-align:center}
.tool-card:hover{border-color:#808C95;background:#F0EEEA}
.tool-card-icon{font-size:36px;margin-bottom:10px}
.tool-card-name{font-size:15px;font-weight:700;color:#3A3632;margin-bottom:4px}
.tool-card-desc{font-size:12px;color:#8A8580}
.tool-modal-body{padding:0;min-height:300px}

/* Mental math game */
.math-race .question{font-size:28px;font-weight:800;text-align:center;padding:20px;color:#3A3632}
.math-race .answer-area{display:flex;gap:10px;padding:0 20px 20px;justify-content:center}
.math-race input{width:120px;padding:12px;border:1px solid #D6D1CA;border-radius:6px;font-size:20px;text-align:center;outline:none}
.math-race input:focus{border-color:#808C95}
.math-race .result{text-align:center;padding:10px;font-weight:700}
.math-race .stats{display:flex;justify-content:center;gap:30px;padding:10px;font-size:13px;color:#8A8580}
.math-race .timer-bar{height:4px;background:#EAE7E2;margin:0 20px 20px;border-radius:2px;overflow:hidden}
.math-race .timer-fill{height:100%;background:#8AA68A;transition:width .1s linear}

/* Symbol lookup */
.symbol-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:16px}
.symbol-btn{padding:10px;border:1px solid #D6D1CA;border-radius:6px;background:#FDFCFA;cursor:pointer;text-align:center;font-weight:600;transition:all .15s;font-size:13px}
.symbol-btn:hover{border-color:#808C95;background:#EAE7E2}
.symbol-detail{padding:0 20px 20px;text-align:center;font-size:13px;color:#8A8580;line-height:1.6;min-height:60px}

/* Function grapher */
.graph-container{padding:16px;text-align:center}
.graph-container canvas{border:1px solid #D6D1CA;border-radius:8px;display:block;margin:0 auto}
.graph-inputs{display:flex;gap:8px;padding:0 16px 16px;justify-content:center}
.graph-inputs input{padding:8px 12px;border:1px solid #D6D1CA;border-radius:6px;font-size:13px;outline:none;width:200px;background:#F7F5F1}
.graph-inputs input:focus{border-color:#808C95}
.graph-inputs button{padding:8px 16px;border-radius:6px;border:none;background:#808C95;color:#fff;font-size:13px;cursor:pointer;transition:all .15s}
.graph-inputs button:hover{background:#657078}

/* Sidebar overlay */
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:25}

/* Responsive */
@media(max-width:1366px){.app-wrapper{max-width:100%}.main-content{padding:24px 28px}}
@media(max-width:768px){
  body{overflow-x:hidden}.app-wrapper{max-width:100%;height:100dvh}
  .mobile-topbar{display:flex}
  .sidebar{position:fixed;top:0;left:0;bottom:0;height:100dvh;transform:translateX(-100%);z-index:30;border-right:1px solid #D6D1CA;border-radius:0}
  .sidebar.open{transform:translateX(0)}.sidebar-overlay.active{display:block}
  .main-content{padding:20px 16px}.main-content-inner{max-width:100%}
  .video-grid{grid-template-columns:1fr}.fav-grid{grid-template-columns:1fr}.knowledge-grid{grid-template-columns:1fr}
  .story-container,.sim-container{padding:20px;border-radius:8px}.banner{padding:20px}.banner-title{font-size:18px}
  .ai-panel{width:100%;max-width:100%}
}

/* ========== UI Polish ========== */
.nav-icon svg{width:17px;height:17px;display:block;margin:0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* 语言切换按钮 */
.lang-switch{display:flex;gap:2px;margin-left:auto}
.lang-btn{padding:2px 6px;border-radius:4px;border:1px solid #D6D1CA;background:transparent;font-size:11px;font-weight:600;color:#ABA6A1;cursor:pointer;transition:all .15s;min-width:28px}
.lang-btn.active{background:#808C95;color:#fff;border-color:#808C95}
.lang-btn:hover:not(.active){color:#808C95;border-color:#808C95}
.lang-switch.mobile-lang{margin-left:auto}
/* 交互 */
::selection{background:#E6E9EC;color:#657078}
button:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:2px solid #808C95;outline-offset:2px}
.nav-item:active,.filter-btn:active,.ds-hero-cta:active,.symbol-btn:active,.graph-inputs button:active,.ai-send-btn:active{transform:scale(.97)}
.ds-feature-card:active,.tool-card:active{transform:translateY(-1px) scale(.98)}
::-webkit-scrollbar-thumb:hover{background:#ABA6A1}
.sim-stat-val,.profile-stat-card .num,.math-race .stats,.np-cover-duration,.pet-type{font-variant-numeric:tabular-nums}
.page-title,.ds-section-title,.section-title{letter-spacing:-0.01em}
.sidebar-search input:focus,.math-race input:focus,.graph-inputs input:focus,.ai-panel-input-area input:focus{box-shadow:0 0 0 3px rgba(128,140,149,.12)}
@keyframes fadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* ========== Skeleton Screen (骨架屏) ========== */
@keyframes skeletonShimmer{0%{background-position:-400px 0}100%{background-position:400px 0}}
.skeleton{background:linear-gradient(90deg,#EAE7E2 25%,#DED9D2 37%,#EAE7E2 63%);background-size:400px 100%;animation:skeletonShimmer 1.5s ease-in-out infinite;border-radius:4px}
.skeleton-card{width:100%;height:180px;border-radius:8px;border:1px solid #EAE7E2;padding:14px;display:flex;flex-direction:column;gap:10px}
.skeleton-line{height:12px;border-radius:3px}
.skeleton-line.w80{width:80%}.skeleton-line.w60{width:60%}.skeleton-line.w40{width:40%}
.skeleton-avatar{width:28px;height:28px;border-radius:50%}

/* ========== Toast ========== */
.toast-container{position:fixed;top:20px;right:20px;z-index:200;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast{background:#3A3632;color:#FDFCFA;padding:10px 18px;border-radius:6px;font-size:13px;font-weight:500;animation:toastIn .3s ease,toastOut .3s ease 2s forwards;max-width:280px;box-shadow:0 2px 8px rgba(58,54,50,.15)}
@keyframes toastIn{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}
@keyframes toastOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(20px)}}

/* ========== 粒子爆发动画 ========== */
@keyframes particleBurst{0%{opacity:1;transform:translate(0,0) scale(1)}100%{opacity:0;transform:translate(var(--px),var(--py)) scale(0)}}
.particle{position:fixed;pointer-events:none;z-index:300;animation:particleBurst .7s ease-out forwards}

/* ========== MathBTI sidebar promocard (醒目入口) ========== */
.sidebar-mbti-card{margin:0 12px 8px;padding:14px;border-radius:6px;background:linear-gradient(135deg,#8A9BA8,#99A9B5);color:#fff;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;line-height:1.5}
.sidebar-mbti-card:hover{background:linear-gradient(135deg,#7A8B9A,#8A9AA8);transform:scale(1.01)}
.sidebar-mbti-card .mbti-card-icon{font-size:20px;margin-bottom:4px}
.sidebar-mbti-card .mbti-card-arrow{float:right;opacity:.7;font-size:14px}

/* ========== 葫芦元素 ========== */
.sidebar-logo-icon,.topbar-logo-icon{border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;box-shadow:inset 0 -3px 0 rgba(0,0,0,.1)}
.vine-divider{height:1px;background:linear-gradient(90deg,transparent,#C8C4BD 15%,#A8B886 50%,#C8C4BD 85%,transparent);margin:20px 0;position:relative}
.vine-divider::after{content:"🏮";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:14px;background:#F7F5F1;padding:0 8px}
#toastBox .toast{border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;padding:12px 24px}
.skeleton-card{border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;padding:20px 16px 16px}
.skeleton-card::before{content:"";display:block;width:40px;height:16px;background:linear-gradient(90deg,#E8E5E0 25%,#F0EEEA 50%,#E8E5E0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:8px;margin-bottom:12px}

/* ========== 抽卡按钮 ========== */
.float-hub-child.cards{background:#A8907E}
.float-hub-child.cards:hover{background:#B8956E}
.draw-btn{display:inline-flex;align-items:center;gap:8px;padding:10px 24px;border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;border:none;background:linear-gradient(135deg,#A8907E,#C47F3A);color:#fff;font-size:14px;font-weight:700;cursor:pointer;transition:all .2s;box-shadow:0 3px 12px rgba(164,126,94,.3)}
.draw-btn:hover{transform:scale(1.03);box-shadow:0 6px 20px rgba(164,126,94,.45)}
.draw-btn:disabled{opacity:.5;cursor:not-allowed;transform:none;box-shadow:none}

/* ========== 知识页抽卡进度条 ========== */
.draw-progress-bar{background:#F7F5F1;border-radius:8px;padding:14px 18px;border:1px solid #D6D1CA;display:flex;align-items:center;gap:12px;font-size:13px;color:#8A8580;margin-top:16px;cursor:pointer;transition:all .15s}
.draw-progress-bar:hover{border-color:#A8907E;background:#FDF8F4}
.draw-progress-track{flex:1;height:8px;background:#E8E5E0;border-radius:4px;overflow:hidden}
.draw-progress-fill{height:100%;background:linear-gradient(90deg,#A8907E,#C47F3A);border-radius:4px;transition:width .4s cubic-bezier(.34,1.56,.64,1)}
.draw-progress-icon{font-size:20px;flex-shrink:0}
.draw-progress-ready{background:#FDF4EC;border-color:#C47F3A;animation:pulse-glow 2s infinite}
@keyframes pulse-glow{0%,100%{box-shadow:0 0 0 0 rgba(196,127,58,.2)}50%{box-shadow:0 0 0 6px rgba(196,127,58,0)}}

/* ========== 葫芦摇晃 + 卡片翻转动画 ========== */
@keyframes gourd-shake{0%,100%{transform:rotate(0)}10%{transform:rotate(-8deg)}20%{transform:rotate(8deg)}30%{transform:rotate(-6deg)}40%{transform:rotate(6deg)}50%{transform:rotate(-3deg)}60%{transform:rotate(3deg)}70%{transform:rotate(-1deg)}80%{transform:rotate(1deg)}}
.gourd-shaking{animation:gourd-shake .8s ease-in-out}
@keyframes gourd-bounce{0%{transform:scale(1.2)}50%{transform:scale(.9)}70%{transform:scale(1.05)}100%{transform:scale(1)}}
@keyframes card-flip{0%{transform:perspective(600px) rotateY(0)}50%{transform:perspective(600px) rotateY(90deg)}100%{transform:perspective(600px) rotateY(0)}}
.card-flip-in{animation:card-flip .6s ease-in-out}

/* ========== 抽卡弹窗 ========== */
.gacha-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:500;display:flex;align-items:center;justify-content:center;animation:fadeIn .25s}
.gacha-modal{background:#FDFCFA;border-radius:16px;padding:28px 24px;max-width:360px;width:90%;text-align:center;position:relative;animation:gourd-bounce .5s ease-out}
.gacha-gourd{font-size:72px;display:block;margin:0 auto 16px;cursor:pointer;user-select:none;transition:all .2s;filter:drop-shadow(0 4px 8px rgba(0,0,0,.15))}
.gacha-gourd:hover{transform:scale(1.08)}
.gacha-title{font-size:20px;font-weight:700;color:#3A3632;margin-bottom:4px}
.gacha-sub{font-size:12px;color:#ABA6A1;margin-bottom:12px}
.gacha-draws{font-size:13px;color:#8A8580;margin-bottom:8px}
.gacha-draws b{color:#A8907E;font-size:16px}
.gacha-close{position:absolute;top:12px;right:16px;background:none;border:none;font-size:20px;color:#ABA6A1;cursor:pointer;padding:4px}
.gacha-card-reveal{margin-top:16px;animation:gourd-bounce .5s ease-out}
.gacha-card-portrait{width:100px;height:100px;border-radius:50%;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;font-size:48px;overflow:hidden;border:3px solid var(--clan-color,#A8907E)}
.gacha-card-portrait img{width:100%;height:100%;object-fit:cover}
.gacha-card-name{font-size:18px;font-weight:700;color:#3A3632;margin-bottom:2px}
.gacha-card-type{font-size:12px;color:#ABA6A1;margin-bottom:4px}
.gacha-card-clan{font-size:12px;padding:3px 12px;border-radius:12px;display:inline-block;margin-bottom:8px}
.gacha-card-tagline{font-size:13px;color:#8A8580;font-style:italic;margin-bottom:12px}
.gacha-card-dupe{font-size:12px;color:#C49595;margin-bottom:8px;font-style:italic}
.gacha-card-detail-btn{padding:6px 18px;border-radius:20px;border:1px solid #D6D1CA;background:#FDFCFA;color:#8A8580;font-size:12px;cursor:pointer;transition:all .15s}
.gacha-card-detail-btn:hover{border-color:#A8907E;color:#A8907E}

/* ========== 卡片图鉴条 (首页) ========== */
.card-gallery-wrap{position:relative;margin:8px 0 20px}
.card-gallery-scroll{display:flex;gap:10px;overflow-x:auto;padding:4px 2px 8px;scrollbar-width:none}
.card-gallery-scroll::-webkit-scrollbar{display:none}
.card-gallery-item{flex-shrink:0;width:72px;text-align:center;cursor:pointer;transition:all .15s}
.card-gallery-item:hover{transform:translateY(-3px)}
.card-gallery-item .cg-icon{width:56px;height:56px;border-radius:50%;margin:0 auto 4px;display:flex;align-items:center;justify-content:center;font-size:24px;border:2px solid transparent;transition:all .2s;overflow:hidden;position:relative}
.card-gallery-item .cg-icon img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.card-gallery-item:hover .cg-icon{border-color:var(--clan-color,#A8907E);box-shadow:0 3px 12px rgba(0,0,0,.1)}
.card-gallery-item .cg-name{font-size:10px;color:#8A8580;line-height:1.3;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card-gallery-empty{text-align:center;padding:20px;color:#ABA6A1;font-size:13px;border:1px dashed #D6D1CA;border-radius:8px}
.card-gallery-empty .cg-empty-icon{font-size:28px;display:block;margin-bottom:6px}

/* ========== 卡片详情弹窗 ========== */
.card-detail-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:510;display:flex;align-items:center;justify-content:center;animation:fadeIn .25s}
.card-detail-modal{background:#FDFCFA;border-radius:16px;padding:0;max-width:400px;width:90%;overflow:hidden;position:relative;animation:gourd-bounce .5s ease-out}
.card-detail-header{padding:32px 24px 20px;text-align:center;position:relative}
.card-detail-header .card-detail-bg{position:absolute;inset:0;opacity:.12}
.card-detail-portrait{width:80px;height:80px;border-radius:50%;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;font-size:40px;overflow:hidden;border:3px solid #FDFCFA;position:relative;z-index:1;box-shadow:0 3px 12px rgba(0,0,0,.1)}
.card-detail-name{font-size:22px;font-weight:700;color:#3A3632;position:relative;z-index:1;margin-bottom:2px}
.card-detail-binary{font-size:12px;color:#ABA6A1;letter-spacing:2px;position:relative;z-index:1;margin-bottom:6px}
.card-detail-clan{display:inline-block;padding:4px 14px;border-radius:12px;font-size:12px;font-weight:600;position:relative;z-index:1;margin-bottom:6px}
.card-detail-tagline{font-size:13px;color:#8A8580;font-style:italic;position:relative;z-index:1}
.card-detail-body{padding:20px 24px 24px;border-top:1px solid #EAE7E2}
.card-detail-section{margin-bottom:16px}
.card-detail-section-title{font-size:12px;font-weight:700;color:#ABA6A1;text-transform:uppercase;letter-spacing:1px;margin-bottom:8px}
.card-detail-section p{font-size:14px;color:#5A5652;line-height:1.7}
.card-detail-fact{background:#F7F5F1;border-radius:10px;padding:14px;display:flex;gap:10px;align-items:flex-start;font-size:13px;color:#8A8580;line-height:1.6}
.card-detail-fact .fact-emoji{font-size:18px;flex-shrink:0}
.card-detail-obtain{background:#F7F5F1;border-radius:10px;padding:12px 14px;font-size:12px;color:#ABA6A1;display:flex;align-items:center;gap:8px;margin-top:12px}
.card-detail-obtain .obtain-icon{font-size:16px}
.card-detail-close{position:absolute;top:12px;right:16px;z-index:2;background:rgba(255,255,255,.8);border:none;border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:16px;color:#8A8580;cursor:pointer}

@keyframes gacha-particle-key{0%{opacity:1;transform:translate(0,0) scale(1)}100%{opacity:0;transform:translate(var(--gpx),var(--gpy)) scale(0) rotate(360deg)}}
.gacha-particle{position:fixed;pointer-events:none;z-index:520;width:10px;height:10px;border-radius:50%;animation:gacha-particle-key 1s ease-out forwards}

.knowledge-card-read{position:absolute;top:8px;right:8px;background:rgba(255,255,255,.85);border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-size:14px;z-index:2}
.knowledge-card-read.unread{opacity:.4}

/* ========== 卡册页网格 ========== */
.cards-collection-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media(max-width:1000px){.cards-collection-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:640px){.cards-collection-grid{grid-template-columns:repeat(2,1fr)}}
.cc-card{background:#FDFCFA;border:1px solid #D6D1CA;border-radius:8px;padding:16px 12px;text-align:center;transition:all .15s}
.cc-card.owned{cursor:pointer}
.cc-card.owned:hover{border-color:var(--clan-color,#A8907E);box-shadow:0 3px 12px rgba(0,0,0,.08);transform:translateY(-2px)}
.cc-card.locked{opacity:.45;filter:grayscale(.5)}
.cc-card-icon{width:52px;height:52px;border-radius:50%;margin:0 auto 8px;display:flex;align-items:center;justify-content:center;font-size:24px;overflow:hidden;position:relative}
.cc-card-icon img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.cc-card.locked .cc-card-icon::after{content:'🔒';position:absolute;right:-1px;bottom:-1px;width:18px;height:18px;line-height:18px;font-size:11px;background:rgba(255,255,255,.9);border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.15);color:#8A8580}
.cc-card-icon.locked-icon{background:#E8E5E0!important;color:#C8C4BD}
.cc-card-name{font-size:13px;font-weight:600;color:#3A3632;margin-bottom:2px}
.cc-card-type{font-size:10px;color:#ABA6A1;letter-spacing:1px;margin-bottom:4px}
.cc-card-clan{font-size:10px;padding:2px 8px;border-radius:8px;display:inline-block}
