/* ==========================================================================
   至臻学校 · 前台设计系统(目录电商风格)
   品牌主色取自校徽与老站视觉(暖红),整体走传统课程商城的高密度热闹版式。
   ========================================================================== */

:root {
    --primary: #e04642;
    --primary-dark: #c1332f;
    --primary-deep: #a8231f;
    --primary-soft: #fdf1f0;
    --primary-line: #f6d9d7;
    --orange: #ff7d29;
    --orange-soft: #fff3e8;
    --gold: #ffe9b0;
    --accent: #0a9d6c;
    --accent-soft: #e9f7f1;
    --ink: #23272f;
    --ink-soft: #454b57;
    --muted: #7b818d;
    --surface: #fff;
    --soft: #faf6f3;
    --border: #ece5e0;
    --danger: #dc2626;
    --max: 1200px;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(35, 39, 47, .06);
    --shadow-md: 0 8px 24px rgba(35, 39, 47, .09);
    --shadow-lg: 0 18px 44px rgba(35, 39, 47, .14);
    --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { font-family: var(--font); color: var(--ink); background: var(--surface); line-height: 1.65; -webkit-font-smoothing: antialiased; }
/* overflow-x 用 clip 而不是 hidden:挡住 100vw 全出血元素带来的横向滚动,又不会生成滚动容器、不影响 position: sticky */
body { margin: 0; overflow-x: clip; }
img { max-width: 100%; }
a { color: inherit; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .75rem; z-index: 99; }

/* ---------- 顶部通告条 ---------- */
.top-ribbon { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); color: #ffe9e2; font-size: .84rem; }
.top-ribbon-inner { max-width: var(--max); min-height: 34px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ribbon-left, .ribbon-right { display: flex; align-items: center; gap: 14px; }
.ribbon-hi { color: #fff; font-weight: 700; }
.top-ribbon a { color: #ffe9e2; text-decoration: none; }
.top-ribbon a:hover { color: #fff; text-decoration: underline; }

/* ---------- 通用元件 ---------- */
.eyebrow { color: var(--primary); font-weight: 800; letter-spacing: .14em; font-size: .82rem; margin: 0 0 6px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 24px; border: 0; border-radius: var(--radius-sm); background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; font-size: .98rem; cursor: pointer; transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.button:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.button:active { transform: scale(.97); }
.button-quiet { background: var(--primary-soft); color: var(--primary); }
.button-quiet:hover { background: var(--primary-line); box-shadow: none; }
.button-ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.button-ghost:hover { background: var(--primary-soft); }
.button-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .8); }
.button-outline-light:hover { background: rgba(255, 255, 255, .16); box-shadow: none; }
.button-full { width: 100%; }
.button-lg { min-height: 50px; padding: 12px 32px; font-size: 1.05rem; }
.button-sm { min-height: 34px; padding: 5px 16px; font-size: .88rem; }
.button:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid #f3b3b1; outline-offset: 3px; }
.text-link { color: var(--primary); font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 3px; font-size: .76rem; font-weight: 700; }
.badge-preview { background: var(--accent-soft); color: var(--accent); }
.badge-category { background: var(--primary-soft); color: var(--primary); }
.badge-hot { background: var(--orange-soft); color: var(--orange); }

.page-shell { max-width: var(--max); margin: auto; padding: 28px 24px 72px; }
.page-heading { max-width: 760px; margin-bottom: 30px; }
.page-heading h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin: 6px 0 10px; letter-spacing: -.01em; }
.page-heading > p { color: var(--muted); margin: 0; }
.empty-state { grid-column: 1/-1; background: var(--soft); border: 1px dashed var(--border); padding: 48px 32px; border-radius: var(--radius); text-align: center; }
.empty-state h2 { margin: 0 0 8px; }
.empty-state p { color: var(--muted); margin: 0 0 18px; }

/* ---------- 页头 ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { max-width: var(--max); margin: auto; padding: 16px 24px; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 44px; width: auto; }
.header-search-wrap { flex: 1; max-width: 520px; }
.header-search { display: flex; border: 2px solid var(--primary); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.header-search input { flex: 1; min-width: 0; border: 0; padding: 9px 14px; font: inherit; color: var(--ink); }
.header-search input:focus { outline: none; }
.header-search button { border: 0; background: var(--primary); color: #fff; font-weight: 800; font-size: .96rem; padding: 0 22px; cursor: pointer; }
.header-search button:hover { background: var(--primary-dark); }
.hot-words { margin: 6px 2px 0; font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px; }
.hot-words a { color: var(--muted); text-decoration: none; }
.hot-words a:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; margin-left: auto; }
.header-account { display: flex; align-items: center; gap: 14px; }
.header-account > a { font-weight: 700; color: var(--primary); text-decoration: none; }

/* ---------- 账户菜单(头像触发) ---------- */
.account-menu { position: relative; }
.account-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff !important; font-weight: 800; font-size: .95rem; text-decoration: none; flex-shrink: 0; border: 2px solid transparent; transition: box-shadow .15s ease; }
.account-avatar:hover, .account-menu.is-open .account-avatar { box-shadow: 0 0 0 3px var(--primary-soft); }
.account-avatar-lg { width: 44px; height: 44px; font-size: 1.15rem; cursor: default; }

.account-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 70; width: 250px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
/* 头像与面板之间留了 10px 缝隙,鼠标穿过时会脱离 :hover 导致闪烁;
   用一块透明桥接区把缝填上。面板隐藏时它跟着隐藏,不会挡住下面的元素。 */
.account-panel::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
/* 面板内首尾项要贴合圆角,原先靠 overflow:hidden,但那样会把上面的桥接区裁掉 */
.account-id { border-radius: var(--radius) var(--radius) 0 0; }
.account-group:last-child a:last-child, .account-group:last-child button { border-radius: 0 0 var(--radius) var(--radius); }
.account-menu.is-open .account-panel, .account-menu:focus-within .account-panel { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (pointer: fine) {
    .account-menu:hover .account-panel { opacity: 1; visibility: visible; transform: none; }
}
/* 身份块:确认「我登录的是哪个账号」,手机号只到后四位 */
.account-id { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); background: var(--soft); }
.account-id strong { display: block; font-size: .95rem; line-height: 1.3; }
.account-id span { color: var(--muted); font-size: .8rem; }
.account-group { padding: 6px 0; border-bottom: 1px solid var(--border); }
.account-group:last-child { border-bottom: 0; }
.account-group a, .account-group button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 18px; color: var(--ink-soft) !important; font: inherit; font-size: .9rem; font-weight: 400; text-align: left; text-decoration: none; background: none; border: 0; cursor: pointer; }
.account-group a:hover, .account-group button:hover { background: var(--primary-soft); color: var(--primary) !important; }
.account-group form { margin: 0; }
.account-group button { color: var(--muted) !important; }
.account-badge { margin-left: auto; background: var(--primary); color: #fff; font-style: normal; font-size: .68rem; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 999px; }
@media (max-width: 860px) { .header-learning { display: none; } }

/* ---------- 管理员身份 ---------- */
/* 页头的「管理后台」比「学习中心」更该被看见:管理员每次登录就是奔它来的 */
.header-admin { padding: 6px 12px; border: 1px solid var(--primary); border-radius: 999px; }
.header-admin:hover { background: var(--primary); color: #fff !important; }
.account-role { margin-left: auto; align-self: flex-start; background: var(--primary); color: #fff; font-style: normal; font-size: .66rem; font-weight: 800; line-height: 1; padding: 4px 7px; border-radius: 999px; white-space: nowrap; }
.account-group .account-link-strong { color: var(--primary) !important; font-weight: 700; }
/* 管理员进到学习中心时的提示条:说明这里为什么是空的,并给一条出去的路 */
.account-admin-hint { margin: 0 0 16px; padding: 11px 16px; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); background: var(--soft); color: var(--ink-soft); font-size: .88rem; line-height: 1.6; }
.account-admin-hint a { margin-left: 8px; color: var(--primary); font-weight: 700; white-space: nowrap; }

/* ---------- 红色主导航 ---------- */
.main-nav { background: var(--primary); position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 8px rgba(160, 30, 26, .25); }
.main-nav-inner { max-width: var(--max); margin: auto; padding: 0 24px; display: flex; align-items: stretch; gap: 4px; }
/* 分类菜单:深红块是「菜单入口」而非选中态,靠右侧小三角表明可展开 */
.nav-explore { position: relative; flex-shrink: 0; margin-right: 12px; }
.nav-allcourses { display: inline-flex; align-items: center; gap: 10px; background: var(--primary-deep); color: #fff; font-weight: 800; text-decoration: none; padding: 12px 22px; }
.nav-allcourses:hover, .nav-explore.is-open .nav-allcourses { background: #921c18; }
.nav-caret { width: 7px; height: 7px; border-right: 2px solid rgba(255, 255, 255, .85); border-bottom: 2px solid rgba(255, 255, 255, .85); transform: translateY(-2px) rotate(45deg); transition: transform .18s ease; }
.nav-explore.is-open .nav-caret { transform: translateY(1px) rotate(-135deg); }

/* 单列平铺是默认形态(小机构分类少);有子分类时切成自适应多列,分类多也不会挤 */
.explore-panel { position: absolute; top: 100%; left: 0; z-index: 60; min-width: 280px; background: #fff; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-lg); padding: 18px 22px 14px; display: grid; grid-template-columns: 1fr; gap: 4px 28px;
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.explore-panel-tree { min-width: 520px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 28px; }
.nav-explore.is-open .explore-panel, .nav-explore:focus-within .explore-panel { opacity: 1; visibility: visible; transform: none; }
/* 只有真正的鼠标才用悬停展开;触屏靠点击,免得菜单展开后收不回去 */
@media (hover: hover) and (pointer: fine) {
    .nav-explore:hover .explore-panel { opacity: 1; visibility: visible; transform: none; }
}
.explore-col h3 { margin: 0 0 8px; font-size: .82rem; letter-spacing: .05em; }
.explore-col h3 a { color: var(--muted); text-decoration: none; font-weight: 700; }
.explore-col h3 a:hover { color: var(--primary); }
.explore-col a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; margin: 0 -10px; border-radius: var(--radius-sm); color: var(--ink-soft); text-decoration: none; font-size: .9rem; }
.explore-col > a:hover, .explore-col h3 + a:hover { background: var(--primary-soft); color: var(--primary); }
.explore-col .explore-leaf { color: var(--ink); font-weight: 700; font-size: .94rem; padding: 8px 10px; }
.explore-col em { font-style: normal; color: var(--muted); font-weight: 400; font-size: .82rem; }
.explore-foot { grid-column: 1 / -1; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; gap: 22px; }
.explore-foot a { color: var(--primary); text-decoration: none; font-weight: 700; font-size: .88rem; }
.explore-foot a:hover { text-decoration: underline; }
.nav-burger { display: inline-grid; gap: 3px; }
.nav-burger i { display: block; width: 16px; height: 2px; background: #fff; border-radius: 2px; }
.site-nav { display: flex; align-items: stretch; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { display: inline-flex; align-items: center; color: #fff; text-decoration: none; font-weight: 700; padding: 12px 16px; white-space: nowrap; }
.site-nav a:hover { background: var(--primary-dark); }
.site-nav a.is-current { background: var(--primary-dark); box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .9); }

/* ---------- 首屏三栏 ---------- */
.home-hero-band { background: linear-gradient(180deg, rgba(253, 238, 234, .94) 0%, rgba(255, 255, 255, .97) 90%), url('/assets/img/hero/band-red.jpg') right top / cover no-repeat; border-bottom: 1px solid var(--border); }
.home-hero { max-width: var(--max); margin: auto; padding: 16px 24px 0; display: grid; grid-template-columns: 230px minmax(0, 1fr) 250px; gap: 14px; align-items: stretch; }
.cat-rail { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.cat-rail h2 { margin: 0; background: var(--primary); color: #fff; font-size: .95rem; padding: 10px 16px; }
.cat-rail ul { list-style: none; margin: 0; padding: 4px 0; }
.cat-rail li { padding: 9px 16px 10px; border-bottom: 1px dashed var(--border); transition: background .15s ease; }
.cat-rail li:last-child { border-bottom: 0; }
.cat-rail li:hover { background: var(--primary-soft); }
.cat-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; text-decoration: none; }
.cat-main strong { font-size: .98rem; }
.cat-main span { color: var(--orange); font-size: .76rem; font-weight: 700; flex-shrink: 0; }
.cat-rail li:hover .cat-main strong { color: var(--primary); }
.cat-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.cat-sub a { color: var(--muted); font-size: .8rem; text-decoration: none; }
.cat-sub a:hover { color: var(--primary); }
/* 所有 slide 叠在同一个 grid 单元里:高度取最高那张,切换时不跳动;
   并且左边"课程分类"列更高时 stretch 会把舞台拉高,grid 项默认拉伸,slide 能填满,
   不会像 absolute 方案那样在 banner 下面留一条空白。 */
.hero-stage { position: relative; display: grid; grid-template-areas: "slide"; border-radius: var(--radius); overflow: hidden; min-height: 380px; box-shadow: var(--shadow-sm); }
.hero-slide { grid-area: slide; display: flex; flex-direction: column; justify-content: center; padding: 30px 44px; color: #fff; background-size: cover; background-position: center; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.slide-art { position: absolute; right: 40px; bottom: 0; height: 86%; width: auto; max-width: 42%; object-fit: contain; object-position: bottom; pointer-events: none; }
.hero-slide > *:not(.slide-art) { position: relative; z-index: 1; }
.slide-tag { display: inline-block; align-self: flex-start; background: var(--gold); color: var(--primary-deep); font-weight: 800; font-size: .82rem; border-radius: 999px; padding: 2px 14px; margin: 0 0 14px; }
.hero-slide h1, .hero-slide h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.22; margin: 0 0 10px; max-width: 560px; text-shadow: 0 2px 10px rgba(60, 8, 6, .25); }
.slide-copy { font-size: 1.02rem; color: rgba(255, 255, 255, .94); margin: 0 0 22px; max-width: 480px; }
.slide-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.slide-actions .button { background: #fff; color: var(--primary); }
.slide-actions .button:hover { background: #ffe9e2; }
.slide-actions .button-outline-light { background: transparent; color: #fff; }
.slide-actions .button-outline-light:hover { background: rgba(255, 255, 255, .16); }
.hero-dots { position: absolute; left: 44px; bottom: 18px; display: flex; gap: 8px; z-index: 3; }
.hero-dots button { width: 22px; height: 6px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .45); cursor: pointer; padding: 0; transition: background .2s ease, width .2s ease; }
.hero-dots button.is-active { background: #fff; width: 34px; }
.hero-side { display: grid; gap: 12px; align-content: stretch; grid-template-rows: auto 1fr; }
.side-welcome { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px; }
.side-hi { margin: 0; font-weight: 800; font-size: 1.05rem; }
.side-sub { margin: 0 0 10px; color: var(--muted); font-size: .84rem; }
.side-auth { display: flex; gap: 8px; }
.side-auth .button { flex: 1; padding-left: 6px; padding-right: 6px; }
/* 数据 + 快捷入口同处一张卡:上半格状数据(带分隔线,数字等宽对齐),下半 2×2 文字入口 */
.side-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; }
.side-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; flex: 1; align-content: stretch; }
.side-stats li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 14px 6px; line-height: 1.3; text-align: center; border-bottom: 1px solid var(--border); }
.side-stats li:nth-child(odd) { border-right: 1px solid var(--border); }
.side-stats strong { color: var(--primary); font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.side-stats span { color: var(--muted); font-size: .76rem; }
.side-quick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.side-quick li:nth-child(odd) a { border-right: 1px solid var(--border); }
.side-quick li:nth-child(-n+2) a { border-bottom: 1px solid var(--border); }
.side-quick a { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 42px; padding: 0 12px; text-decoration: none; font-weight: 700; font-size: .82rem; white-space: nowrap; color: var(--ink-soft); transition: color .15s ease, background .15s ease; }
.side-quick a::after { content: "›"; color: var(--muted); font-weight: 400; }
.side-quick a:hover { color: var(--primary); background: var(--primary-soft); }
.side-quick a:hover::after { color: var(--primary); }

/* ---------- 促销色块条 ---------- */
.promo-strip { max-width: var(--max); margin: 14px auto 0; padding: 0 24px 18px; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.promo-strip a { display: grid; gap: 2px; padding: 14px 18px; border-radius: var(--radius); color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.promo-strip a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.promo-strip strong { font-size: 1.02rem; }
.promo-strip span { font-size: .8rem; opacity: .88; }
.promo-a a { background: linear-gradient(120deg, #e0503f, #ff9c6e); }
.promo-b a { background: linear-gradient(120deg, #14967f, #62d9a5); }
.promo-c a { background: linear-gradient(120deg, #8d4fe0, #c99cff); }
.promo-d a { background: linear-gradient(120deg, #e08a1e, #ffc35c); }

/* ---------- 公告 ticker ---------- */
.notice-bar { max-width: var(--max); margin: 18px auto 0; padding: 0 14px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--primary-line); background: var(--primary-soft); border-radius: var(--radius-sm); min-height: 44px; width: calc(100% - 48px); }
.notice-label { flex-shrink: 0; background: var(--primary); color: #fff; font-weight: 800; font-size: .78rem; border-radius: 3px; padding: 2px 10px; }
.notice-ticker { flex: 1; min-width: 0; position: relative; height: 1.65em; overflow: hidden; }
.notice-ticker p { margin: 0; position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; opacity: 0; transition: opacity .4s ease; white-space: nowrap; overflow: hidden; }
.notice-ticker p.is-active, .notice-ticker p:only-child { opacity: 1; }
.notice-ticker a { text-decoration: none; color: var(--ink-soft); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; }
.notice-ticker a:hover { color: var(--primary); }
.notice-ticker time { color: var(--muted); font-size: .78rem; flex-shrink: 0; }
.notice-more { flex-shrink: 0; color: var(--primary); font-size: .84rem; font-weight: 700; text-decoration: none; }

/* ---------- 区块通用 ---------- */
.section { max-width: var(--max); margin: auto; padding: 46px 24px 6px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 4px 0 0; letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin: 4px 0 0; font-size: .9rem; }
.section-head-bar h2 { border-left: 5px solid var(--primary); padding-left: 14px; line-height: 1.25; }
.section-head-bar p { padding-left: 19px; }
.section-more { flex-shrink: 0; white-space: nowrap; }
.head-fire { display: inline-flex; align-items: center; background: linear-gradient(120deg, var(--primary), var(--orange)); color: #fff; font-size: .72rem; font-weight: 800; border-radius: 3px; padding: 2px 8px; margin-right: 10px; vertical-align: 4px; letter-spacing: .06em; }

/* ---------- 课程卡 ---------- */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.course-grid-4 { grid-template-columns: repeat(4, 1fr); }
.course-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
.course-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--soft); display: block; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.course-card:hover .course-cover img { transform: scale(1.04); }
.course-cover .badge-category { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .55); color: #fff; }
.cover-ribbon { position: absolute; top: 0; left: 0; background: linear-gradient(120deg, var(--orange), #ffab52); color: #fff; font-size: .74rem; font-weight: 800; padding: 3px 12px; border-radius: 0 0 var(--radius-sm) 0; }
/* 学习中心的课程卡:封面右下角直接给进度,不用等看到下面的进度条 */
.cover-progress { position: absolute; right: 8px; bottom: 8px; background: rgba(20, 18, 24, .72); color: #fff; font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.course-body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
/* 学习中心「我的课程」卡还在用:徽章 + 课时数一行 */
.course-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; margin: 0 0 10px; }
.course-teacher { color: var(--muted); font-size: .8rem; margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 课时数/时长/有效期这类事实做成小胶囊,比「·」分隔的一长串更好扫 */
.course-facts-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.course-facts-chips span { border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px; color: var(--muted); font-size: .74rem; line-height: 1.5; white-space: nowrap; }
.course-body h3, .course-body h2 { font-size: 1.02rem; margin: 0 0 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.course-body h3 a, .course-body h2 a { text-decoration: none; }
.course-body h3 a:hover, .course-body h2 a:hover { color: var(--primary); }
.course-summary { color: var(--muted); font-size: .84rem; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.course-facts-inline { color: var(--muted); font-size: .82rem; display: flex; gap: 12px; }
.price { color: var(--primary); font-weight: 800; }
.price .yuan { font-size: .8rem; }
.price .amount { font-size: 1.28rem; }
.price-original { color: var(--muted); font-size: .78rem; text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.price-consult { color: var(--accent); font-weight: 700; font-size: .92rem; }
.course-pop { color: var(--orange); font-size: .78rem; font-weight: 700; flex-shrink: 0; }
.course-pop-new { color: var(--primary); }

/* ---------- 热门课程榜 ---------- */
.rank-grid { position: relative; }
.rank-item { position: relative; display: flex; }
.rank-item .course-card { flex: 1; }
.rank-no { position: absolute; top: -8px; left: 10px; z-index: 2; background: #4b5563; color: #fff; font-size: .72rem; font-weight: 800; border-radius: 3px; padding: 2px 8px; box-shadow: var(--shadow-sm); }
.rank-no.rank-top { background: linear-gradient(120deg, var(--primary), var(--orange)); }
.rank-item .cover-ribbon { left: auto; right: 0; border-radius: 0 0 0 var(--radius-sm); }

/* ---------- 分方向课程区块 ---------- */
.cat-section { margin-top: 40px; }
.cat-section .tone-set { display: none; }
.tone-0 { --tone1: #e0503f; --tone2: #ff9c6e; --toneline: #f4c6bd; }
.tone-1 { --tone1: #14967f; --tone2: #62d9a5; --toneline: #bfe5da; }
.tone-2 { --tone1: #8d4fe0; --tone2: #c99cff; --toneline: #ddc9f4; }
.tone-3 { --tone1: #e08a1e; --tone2: #ffc35c; --toneline: #f2ddba; }
.cat-section-inner { max-width: var(--max); margin: auto; padding: 0 24px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 232px; gap: 16px; align-items: stretch; border-bottom: 2px solid var(--toneline, var(--border)); padding-bottom: 34px; }
.cat-panel { border-radius: var(--radius); padding: 22px 20px; color: #fff; background: linear-gradient(160deg, var(--tone1), var(--tone2)); display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.cat-panel h2 { margin: 0; font-size: 1.4rem; }
.cat-count { margin: 2px 0 14px; font-size: .82rem; color: rgba(255, 255, 255, .9); }
.cat-points { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-points a { display: block; text-align: center; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius-sm); color: #fff; text-decoration: none; font-size: .84rem; font-weight: 700; padding: 6px 4px; }
.cat-points a:hover { background: rgba(255, 255, 255, .32); }
.cat-coupon { margin-top: auto; background: rgba(255, 255, 255, .95); border-radius: var(--radius-sm); padding: 12px; color: var(--ink); }
.coupon-title { margin: 0 0 8px; font-weight: 800; font-size: .88rem; color: var(--primary); }
.coupon-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--border); }
.coupon-item div { display: grid; line-height: 1.35; }
.coupon-item strong { font-size: .88rem; }
.coupon-item span { color: var(--muted); font-size: .74rem; }
.coupon-item a { flex-shrink: 0; background: var(--primary); color: #fff; text-decoration: none; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 4px 12px; }
.coupon-item a:hover { background: var(--primary-dark); }
.cat-body { min-width: 0; display: flex; flex-direction: column; }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cat-head h3 { margin: 0; font-size: 1.1rem; border-left: 4px solid var(--tone1, var(--primary)); padding-left: 10px; line-height: 1.3; }
.cat-body .course-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-side { display: grid; gap: 12px; align-content: start; }
.cat-rank { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.cat-rank h4, .cat-guide h4 { margin: 0 0 10px; font-size: .95rem; }
.cat-rank ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.cat-rank li { display: flex; align-items: baseline; gap: 8px; font-size: .86rem; }
.cat-rank a { flex: 1; min-width: 0; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-rank a:hover { color: var(--primary); }
.cat-rank em { font-style: normal; color: var(--orange); font-size: .74rem; flex-shrink: 0; }
.mini-no { flex-shrink: 0; width: 18px; height: 18px; border-radius: 3px; background: #e5e0dc; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; }
.cat-rank li:nth-child(-n+3) .mini-no, .mini-no-top { background: linear-gradient(120deg, var(--primary), var(--orange)); color: #fff; }

/* ---------- 学员心声 ---------- */
.voice-section { margin-top: 46px; background: linear-gradient(180deg, #fff7f0, #fff); border-top: 1px solid #f5e4d5; border-bottom: 1px solid #f5e4d5; }
.voice-inner { max-width: var(--max); margin: auto; padding: 44px 24px 48px; }
.voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.voice-grid article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.voice-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.voice-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(140deg, var(--primary), var(--orange)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.voice-user strong { display: block; font-size: .9rem; line-height: 1.3; }
.voice-stars { color: #f5a623; font-size: .78rem; letter-spacing: 2px; }
.voice-grid p { margin: 0 0 10px; color: var(--ink-soft); font-size: .88rem; }
.voice-grid footer { color: var(--muted); font-size: .78rem; border-top: 1px dashed var(--border); padding-top: 8px; }

/* ---------- 为什么选择至臻 ---------- */
.why-section { background: var(--soft); margin-top: 46px; }
.why-inner { max-width: var(--max); margin: auto; padding: 52px 24px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.why-points { display: grid; gap: 20px; margin-top: 24px; }
.why-points article { display: flex; gap: 16px; }
.why-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; }
.why-points h3 { margin: 0 0 4px; font-size: 1.05rem; }
.why-points p { margin: 0; color: var(--muted); font-size: .92rem; }
.why-cta { margin-top: 28px; }
/* 配图交给 .media-frame(content.css)统一控宽高比,这里只管排布 */
.why-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.why-photos > .media-frame-wide { grid-column: 1 / -1; }

/* ---------- 教师卡片 ---------- */
.teacher-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.teacher-card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 24px 20px; text-align: center; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.teacher-card-stats { color: var(--primary); font-size: .84rem; font-weight: 700; margin-top: 10px; }
.teacher-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
/* 整卡可点:姓名链接用伪元素铺满卡片(拉伸链接),既保持只有一个可聚焦链接、无障碍名称仍是教师姓名,
   又符合「卡片看起来可点就应该可点」的预期。键盘 Tab 到姓名时给整卡描边。 */
.teacher-card { position: relative; cursor: pointer; }
.teacher-card h3 a::after { content: ""; position: absolute; inset: 0; }
.teacher-card:hover h3 a { color: var(--primary); }
.teacher-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.teacher-card h3 a:focus-visible { outline: none; }
.teacher-avatar { width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 50%; overflow: hidden; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; }
.teacher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.teacher-card h3 { margin: 0 0 2px; font-size: 1.1rem; }
.teacher-card h3 a { text-decoration: none; }
.teacher-card h3 a:hover { color: var(--primary); }
.teacher-role { color: var(--primary); font-size: .84rem; font-weight: 700; margin: 0 0 8px; }
.teacher-card p:last-child { color: var(--muted); font-size: .86rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 资讯卡片 ---------- */
.news-split { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.news-split .news-grid { grid-template-columns: repeat(3, 1fr); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-cover { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--primary-soft), #ffe9df); overflow: hidden; }
.news-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.news-body time { color: var(--muted); font-size: .78rem; }
.news-body h3 { font-size: 1rem; margin: 6px 0 8px; line-height: 1.45; }
.news-body h3 a { text-decoration: none; }
.news-body h3 a:hover { color: var(--primary); }
.news-body p { color: var(--muted); font-size: .86rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-list { list-style: none; margin: 0; padding: 6px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.news-list li { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.news-list li:last-child { border-bottom: 0; }
.news-list li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); flex-shrink: 0; align-self: center; }
.news-list a { flex: 1; min-width: 0; text-decoration: none; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list a:hover { color: var(--primary); }
.news-list time { color: var(--muted); font-size: .78rem; flex-shrink: 0; }

/* ---------- 通知偏好 ---------- */
.pref-form { max-width: 680px; }
.pref-group + .pref-group { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.pref-group h2 { font-size: 1.02rem; margin: 0 0 12px; }
.pref-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px dashed var(--border); cursor: pointer; }
.pref-item:last-child { border-bottom: 0; }
.pref-item input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--primary); }
.pref-item strong { display: block; font-size: .94rem; font-weight: 700; }
.pref-item em { display: block; margin-top: 2px; font-style: normal; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.pref-locked-note { color: var(--muted); font-size: .88rem; margin: 0 0 8px; }
.pref-locked-list { margin: 0; padding-left: 20px; color: var(--muted); font-size: .88rem; }
.pref-locked-list li { margin-bottom: 4px; }
.pref-form .button { margin-top: 26px; }

/* ---------- 继续学习(登录后首页顶部) ---------- */
.resume-band { background: var(--soft); border-bottom: 1px solid var(--border); }
.resume-inner { max-width: var(--max); margin: auto; padding: 22px 24px 26px; }
.resume-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.resume-head h2 { margin: 0; font-size: 1.25rem; }
.resume-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.resume-list > li > a { display: flex; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.resume-list > li > a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
.resume-cover { flex: 0 0 96px; margin: 0; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; background: var(--primary-soft); }
.resume-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resume-body { flex: 1; min-width: 0; }
.resume-course { margin: 0; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-body strong { display: block; margin: 2px 0 4px; font-size: .95rem; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resume-meta { margin: 0 0 8px; display: flex; gap: 10px; font-size: .76rem; color: var(--muted); }
.resume-meta span:last-child { color: var(--primary); font-weight: 700; }
.resume-progress { display: block; height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; }
.resume-progress i { display: block; height: 100%; background: var(--primary); }
.resume-percent { margin: 5px 0 0; font-size: .72rem; color: var(--muted); }
@media (max-width: 1024px) { .resume-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .resume-list { grid-template-columns: 1fr; } }

/* ---------- 咨询转化条 ---------- */
.cta-band { margin-top: 56px; background: linear-gradient(120deg, #c1332f, #e2564a 60%, #ef7a5d); color: #fff; }
.cta-inner { max-width: var(--max); margin: auto; padding: 44px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-inner h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 2rem); }
.cta-inner p { margin: 0; color: #ffe3d9; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
/* 反白按钮只在深红 cta-band 里成立;article-cta(米白底)共用 .cta-actions,必须让它退回默认红色按钮 */
.cta-band .cta-actions .button { background: #fff; color: var(--primary); }
.cta-band .cta-actions .button-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }

/* ---------- 左侧锚点导航(大屏) ---------- */
.anchor-rail { display: none; position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 30; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 6px; }
.anchor-rail a { display: block; padding: 8px 12px; text-decoration: none; font-size: .82rem; font-weight: 700; color: var(--ink-soft); border-radius: var(--radius-sm); text-align: center; }
.anchor-rail a:hover { background: var(--primary); color: #fff; }
@media (min-width: 1500px) { .anchor-rail { display: block; } }

/* ---------- 课程列表(货架) ---------- */
.shelf-shell { padding-top: 18px; }
.shelf-shell .breadcrumbs { margin-bottom: 14px; }
.shelf-filter { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 11px 0; }
.filter-row + .filter-row { border-top: 1px dashed var(--border); }
.filter-label { flex-shrink: 0; color: var(--muted); font-size: .86rem; width: 70px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; }
.filter-options a { text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--ink-soft); padding: 3px 13px; border-radius: 999px; border: 1px solid transparent; }
.filter-options a em { font-style: normal; color: var(--muted); font-size: .78rem; margin-left: 2px; }
.filter-options a:hover { color: var(--primary); }
.filter-options a.active { background: var(--primary); color: #fff; }
.filter-options a.active em { color: #ffd9d0; }
.filter-subjects a { border-color: var(--border); }
.filter-subjects a:hover { border-color: var(--primary); }
.course-search { display: flex; margin-left: auto; }
.course-search input { min-width: 200px; border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); padding: 7px 14px; font: inherit; font-size: .9rem; }
.course-search input:focus { outline: none; border-color: var(--primary); }
.course-search button { border: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--primary); color: #fff; font-weight: 700; padding: 0 20px; cursor: pointer; }
.course-search button:hover { background: var(--primary-dark); }
.shelf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 16px; margin-bottom: 16px; }
.shelf-toolbar p { margin: 0; color: var(--muted); font-size: .9rem; }
.shelf-toolbar strong { color: var(--primary); font-size: 1.1rem; }
.shelf-toolbar em { font-style: normal; color: var(--primary); }
.toolbar-actions { display: flex; align-items: center; gap: 14px; }
.shelf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 18px; align-items: start; }
.course-grid-shelf { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shelf-side { display: grid; gap: 14px; position: sticky; top: 64px; }
.side-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.side-card h3 { margin: 0 0 12px; font-size: 1rem; border-left: 4px solid var(--primary); padding-left: 10px; line-height: 1.3; }
.side-rank ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.side-rank li { display: flex; gap: 9px; align-items: flex-start; }
.side-rank li > div { flex: 1; min-width: 0; }
.side-rank .mini-no { margin-top: 3px; }
.side-rank a { display: block; text-decoration: none; font-size: .88rem; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-rank a:hover { color: var(--primary); }
.side-rank p { margin: 2px 0 0; display: flex; align-items: baseline; gap: 8px; font-size: .78rem; }
.side-rank .price { font-size: .85rem; }
.side-rank em { font-style: normal; color: var(--orange); }
.side-promise ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.side-promise li { position: relative; padding-left: 22px; color: var(--ink-soft); font-size: .86rem; }
.side-promise li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }

/* ---------- 课程详情 ---------- */
/* 详情页外壳:一个网格,左列 = hero 文案 + 正文,右列 = 纵跨两行的购课栏。
   hero 底色用 ::before 全出血铺开(高度只跟文案走),购课卡在栏内 sticky 跟随滚动,
   跟随范围自然止于正文底部——这是主流网课详情页的浮动价格卡布局。 */
.course-page { max-width: var(--max); margin: auto; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; column-gap: 40px; align-items: start; }
.course-hero { grid-column: 1; grid-row: 1; position: relative; padding: 30px 0 40px; }
/* course-hero 只是网格左列,不在视口正中,不能用 left:50% 定中;按「页面内容左缘到视口左缘」的距离反推偏移 */
.course-hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: min(-24px, calc((var(--max) - 100vw) / 2 - 24px)); width: 100vw; background: linear-gradient(180deg, #fdeeea, #fff); border-bottom: 1px solid var(--border); z-index: -1; }
.course-rail { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; padding: 30px 0 40px; }
.course-hero .breadcrumbs { margin-bottom: 14px; }
.breadcrumbs { color: var(--muted); font-size: .86rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.course-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.22; margin: 6px 0 12px; }
.course-hero-summary { color: var(--ink-soft); font-size: 1.02rem; margin: 0 0 16px; max-width: 620px; }
.course-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.course-facts span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 5px 15px; font-size: .86rem; color: var(--ink-soft); }
/* 详情页主栏的结构化模块:你将学到(卡片 + 双列 ✓ 网格)、报名前须知 / 适合人群(圆点条目) */
.detail-highlights { border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; padding: 22px 24px 20px; margin-bottom: 30px; }
.detail-highlights .detail-h2 { margin-bottom: 14px; }
.learn-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.learn-grid li { position: relative; padding-left: 26px; color: var(--ink-soft); font-size: .95rem; line-height: 1.55; }
.learn-grid li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 800; }
.detail-block { margin-top: 30px; }
.instructor-card { display: flex; gap: 20px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px 22px; }
.instructor-avatar { width: 84px; height: 84px; margin: 0; font-size: 1.9rem; flex-shrink: 0; }
.instructor-body { flex: 1; min-width: 0; }
.instructor-body h3 { margin: 0; font-size: 1.1rem; }
.instructor-body h3 a { text-decoration: none; }
.instructor-body h3 a:hover { color: var(--primary); }
.instructor-role { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.instructor-summary { margin: 10px 0 14px; color: var(--ink-soft); line-height: 1.65; }
.instructor-card .teacher-stats { margin-top: 10px; }
.instructor-card .teacher-stats + .instructor-summary { margin-top: 12px; }
.detail-bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.detail-bullets li { position: relative; padding-left: 20px; color: var(--ink-soft); line-height: 1.6; }
.detail-bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.purchase-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden; position: sticky; top: 74px; z-index: 5; }
.purchase-cover { aspect-ratio: 16/9; background: var(--soft); position: relative; }
.purchase-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.purchase-body { padding: 18px 22px 24px; }
.purchase-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.purchase-price .price .amount { font-size: 2rem; }
.purchase-pop { margin-left: auto; color: var(--orange); font-size: .82rem; font-weight: 700; }
.purchase-validity { color: var(--muted); font-size: .86rem; margin: 0 0 14px; }
.purchase-body .button + .button { margin-top: 10px; }
.purchase-includes-head { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--border); font-weight: 800; font-size: .92rem; }
.purchase-assurance { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 7px; color: var(--ink-soft); font-size: .88rem; }
.purchase-assurance li { position: relative; padding-left: 20px; }
.purchase-assurance li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.course-description { grid-column: 1; grid-row: 2; padding: 38px 0 40px; }
.detail-h2, .course-description h2, .syllabus > h2 { font-size: 1.25rem; margin: 0 0 16px; border-left: 5px solid var(--primary); padding-left: 12px; line-height: 1.3; }
.syllabus > h2 small { color: var(--muted); font-size: .8rem; font-weight: 400; margin-left: 8px; }
.course-description { min-width: 0; }
.course-description img { border-radius: var(--radius-sm); }
/* 课程内容:主栏手风琴目录,原生 details/summary,CSP 下零 JS */
.syllabus { margin-bottom: 30px; }
.syllabus-list { display: grid; gap: 10px; }
.syllabus details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.syllabus summary { display: flex; align-items: center; gap: 12px; padding: 13px 18px; cursor: pointer; font-weight: 700; font-size: .98rem; background: var(--soft); list-style: none; }
.syllabus summary::-webkit-details-marker { display: none; }
.syllabus summary::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .18s ease; }
.syllabus details[open] summary::before { transform: rotate(45deg); }
.syllabus details[open] summary { border-bottom: 1px solid var(--border); }
.syllabus-chapter { flex: 1; min-width: 0; }
.syllabus-count { color: var(--muted); font-size: .84rem; font-weight: 400; white-space: nowrap; }
.syllabus-summary { margin: 12px 18px 0; color: var(--muted); font-size: .88rem; }
.syllabus ol { list-style: none; padding: 6px 18px 12px; margin: 0; }
.syllabus li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.syllabus li:last-child { border-bottom: 0; }
.lesson-type { flex-shrink: 0; width: 30px; height: 20px; border-radius: 3px; background: var(--soft); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 800; }
.syllabus a { text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.syllabus a:hover { color: var(--primary); }
.syllabus .locked { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.lesson-duration { flex-shrink: 0; color: var(--muted); font-size: .78rem; }
.teacher-inline { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-top: 24px; max-width: 680px; }
.teacher-inline .teacher-avatar { width: 56px; height: 56px; margin: 0; font-size: 1.3rem; flex-shrink: 0; }
.teacher-inline > div:not(.teacher-avatar) { flex: 1; min-width: 0; }
.teacher-inline h3 { margin: 0; font-size: 1.02rem; }
.teacher-inline h3 a { text-decoration: none; }
.teacher-inline h3 a:hover { color: var(--primary); }
.teacher-inline p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.detail-assurance { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--border); }
.detail-assurance > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.detail-assurance article { background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.detail-assurance strong { display: block; margin-bottom: 5px; color: var(--primary); }
.detail-assurance span { color: var(--muted); font-size: .86rem; }
.related-section { padding-bottom: 30px; }

/* ---------- 结算弹窗 ---------- */
/* 常驻 display:flex,靠 opacity/visibility 过渡开合(display 切换没法做动画);
   visibility 收尾时才隐藏,关闭动画播得完,隐藏后也和 display:none 一样不可聚焦。 */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 18, 24, .55); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease; }
.modal-backdrop > * { transform: translateY(14px) scale(.97); transition: transform .22s ease; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal-backdrop.open > * { transform: none; }
.checkout-modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: min(420px, 100%); padding: 30px 30px 26px; text-align: center; position: relative; }
.checkout-modal h2 { margin: 0 0 4px; font-size: 1.3rem; }
.checkout-modal .checkout-amount { color: var(--primary); font-weight: 800; font-size: 1.5rem; margin: 4px 0 14px; }
.checkout-qr { width: 240px; height: 240px; margin: 0 auto 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: var(--soft); }
.checkout-qr img { width: 100%; height: 100%; }
.checkout-status { color: var(--muted); font-size: .9rem; min-height: 24px; margin: 0 0 6px; }
.checkout-status[data-state="paid"] { color: var(--accent); font-weight: 700; }
.checkout-status[data-state="error"] { color: var(--danger); }
.checkout-hint { color: var(--muted); font-size: .82rem; margin: 0; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 1.1rem; cursor: pointer; line-height: 1; }
.modal-close:hover { background: var(--border); color: var(--ink); }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border); text-decoration: none; font-weight: 600; padding: 0 12px; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .disabled { color: var(--muted); opacity: .5; }

/* ---------- 学习中心 ---------- */
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 34px; }
.account-stats article { background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
.account-stats strong { display: block; font-size: 1.8rem; color: var(--primary); }
.account-stats span { color: var(--muted); font-size: .88rem; }
.continue-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(120deg, var(--primary), #ef7a5d); color: #fff; border-radius: var(--radius); padding: 22px 28px; margin-bottom: 34px; }
.continue-banner h2 { margin: 0 0 2px; font-size: 1.2rem; }
.continue-banner p { margin: 0; color: #ffe3d9; font-size: .9rem; }
.continue-banner .button { background: #fff; color: var(--primary); }
/* 学习中心页头:标题与导航压在一起,整体高度约为原先的一半 */
.account-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.account-header-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
.account-header-main h1 { font-size: 1.45rem; margin: 0; line-height: 1.3; }
.account-header-main p { margin: 0; color: var(--muted); font-size: .88rem; }

/* 分组导航:每组一个小标签 + 若干胶囊,组间用竖线分隔。窄屏横向滚动,不换行撑高页头 */
.account-nav { display: flex; gap: 8px 18px; align-items: center; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.account-nav::-webkit-scrollbar { display: none; }
.account-nav-group { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.account-nav-group + .account-nav-group { padding-left: 18px; border-left: 1px solid var(--border); }
.account-nav-label { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .06em; flex-shrink: 0; }
.account-nav a { text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--ink-soft); padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.account-nav a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.account-nav a:not(.active):hover { border-color: var(--primary); color: var(--primary); }
.learning-progress { margin: 12px 0 14px; }
.learning-progress > div { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); margin-bottom: 4px; }
.learning-progress progress { width: 100%; height: 8px; appearance: none; border: 0; }
.learning-progress progress::-webkit-progress-bar { background: var(--soft); border-radius: 999px; }
.learning-progress progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.order-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.order-table th, .order-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.order-table th { background: var(--soft); color: var(--ink-soft); font-weight: 700; }
.order-table tr:last-child td { border-bottom: 0; }
.order-status { font-weight: 700; }
.order-status[data-status="PAID"] { color: var(--accent); }
.order-status[data-status="PENDING"] { color: #d97706; }
.order-status[data-status="EXPIRED"], .order-status[data-status="CANCELLED"] { color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* ---------- 登录/表单 ---------- */
/* 密码相关的表单卡:限宽并居中,不要在宽屏上拉成一整行输入框 */
.auth-card-narrow { width: min(480px, 100%); }
.auth-flow .auth-card-narrow, .auth-flow .page-heading { margin-inline: auto; }
.auth-flow .page-heading { width: min(480px, 100%); }
.auth-card { margin-top: 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 1.7rem; margin: 5px 0 22px; }
.auth-card label { display: block; font-weight: 700; margin: 15px 0 6px; }
.auth-card input { width: 100%; min-height: 48px; border: 1px solid #d6cfc9; border-radius: var(--radius-sm); padding: 10px 14px; font: inherit; }
.auth-card input:focus { border-color: var(--primary); }
/* 提交按钮要和最后一个输入框拉开距离;auth.css 里那条只写给了登录面板 .auth-panel,这里补上 */
.auth-card .button { margin-top: 22px; }
.form-note { color: var(--muted); font-size: .85rem; margin-top: 18px; }
.form-error { background: #fdf0ef; color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; }
.form-success { background: var(--accent-soft); color: var(--accent); border-radius: var(--radius-sm); padding: 10px 14px; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(260px, 1fr); gap: 28px; align-items: start; }
.profile-layout .auth-card { margin-top: 0; }
.profile-side { background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.profile-side h2 { margin: 0 0 10px; font-size: 1.2rem; }
.profile-side p { color: var(--muted); margin: 0 0 12px; }


/* ---------- 页脚 ---------- */
.site-footer { background: #241f1e; color: #e9e2dd; }
.footer-grid { max-width: var(--max); margin: auto; padding: 48px 24px 36px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr 1.1fr; gap: 34px; }
/* 深色页脚用白色单色剪影:img 引外部 SVG 改不了内部 fill,靠 filter 整体置白 */
.footer-brand img { height: 38px; width: auto; filter: brightness(0) invert(1); }
.footer-brand p { color: #b3a9a3; margin: 14px 0 0; font-size: .92rem; }
.footer-slogan { letter-spacing: .3em; font-size: .74rem !important; color: #7d726c !important; }
.footer-col h3 { font-size: .95rem; margin: 4px 0 14px; color: #fff; }
.footer-col a { display: block; color: #b3a9a3; text-decoration: none; margin-bottom: 9px; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.footer-contact p { color: #b3a9a3; margin: 0 0 9px; font-size: .9rem; }
.footer-contact a { display: inline; margin: 0; }
.footer-bottom { border-top: 1px solid #3a3331; }
.footer-bottom small { display: block; max-width: var(--max); margin: auto; padding: 18px 24px; color: #7d726c; }

/* ---------- 右侧悬浮服务 ---------- */
.float-service { position: fixed; right: 14px; bottom: 72px; z-index: 35; display: grid; gap: 8px; }
.float-top { width: 76px; min-height: 36px; border: 1px solid var(--primary-line); border-radius: var(--radius-sm); background: var(--primary); color: #fff; font-weight: 800; font-size: .78rem; cursor: pointer; letter-spacing: .1em; }
.float-top:hover { background: var(--primary-dark); }

/* ---------- 响应式 ---------- */
@media (max-width: 1120px) {
    .home-hero { grid-template-columns: 200px minmax(0, 1fr); }
    .hero-side { display: none; }
    .cat-section-inner { grid-template-columns: 200px minmax(0, 1fr); }
    .cat-side { display: none; }
    .course-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .course-grid, .news-grid, .news-split .news-grid, .course-grid-shelf { grid-template-columns: repeat(2, 1fr); }
    .teacher-grid, .voice-grid { grid-template-columns: repeat(2, 1fr); }
    .news-split { grid-template-columns: 1fr; }
    .why-inner { grid-template-columns: 1fr; gap: 36px; }
    .course-page { grid-template-columns: 1fr; }
    .course-hero, .course-rail, .course-description { grid-column: 1; grid-row: auto; }
    .course-rail { padding: 26px 0 0; align-self: auto; }
    .course-description { padding-top: 30px; }
    .detail-assurance > div, .profile-layout, .learn-grid { grid-template-columns: 1fr; }
    .purchase-card { position: static; }
    .shelf-layout { grid-template-columns: 1fr; }
    .shelf-side { position: static; grid-template-columns: repeat(2, 1fr); align-items: stretch; }
    .side-promise { grid-column: 1/-1; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .home-hero { grid-template-columns: 1fr; }
    .cat-rail { display: none; }
    .hero-stage { min-height: 320px; }
    .cat-section-inner { grid-template-columns: 1fr; }
    .cat-panel { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
    .cat-panel h2 { font-size: 1.2rem; }
    .cat-count { margin: 0; }
    .cat-points { grid-template-columns: repeat(4, 1fr); width: 100%; margin: 10px 0 0; }
    .cat-coupon { display: none; }
    .cat-body .course-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .top-ribbon-inner { padding: 5px 14px; }
    .ribbon-right a { display: none; }
    .header-inner { flex-wrap: wrap; padding: 12px 14px; gap: 10px 14px; }
    .brand img { height: 34px; }
    .header-actions { margin-left: auto; }
    .header-search-wrap { order: 3; flex-basis: 100%; max-width: none; }
    .hot-words { display: none; }
    .main-nav-inner { padding: 0 8px; }
    .nav-allcourses { padding: 10px 14px; margin-right: 4px; }
    .site-nav a { padding: 10px 12px; font-size: .92rem; }
    .home-hero { padding: 12px 14px 0; }
    .hero-slide { padding: 24px 22px; }
    .slide-art { height: 48%; right: 6px; opacity: .85; }
    .hero-dots { left: 22px; }
    .hero-stage { min-height: 300px; }
    .promo-strip { grid-template-columns: 1fr 1fr; padding: 0 14px 14px; }
    .notice-bar { width: calc(100% - 28px); }
    .section { padding: 36px 14px 6px; }
    .page-shell { padding: 20px 14px 56px; }
    .voice-inner { padding: 36px 14px 40px; }
    .voice-grid, .teacher-grid { grid-template-columns: 1fr; }
    .course-grid, .course-grid-4, .course-grid-shelf, .cat-body .course-grid, .news-grid, .news-split .news-grid { grid-template-columns: 1fr; }
    .cat-section-inner { padding: 0 14px 28px; }
    .cat-points { grid-template-columns: repeat(2, 1fr); }
    .why-inner { padding: 40px 14px; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .filter-label { width: 100%; }
    .course-search { margin-left: 0; width: 100%; }
    .course-search input { flex: 1; min-width: 0; }
    .shelf-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
    .shelf-side { grid-template-columns: 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .float-service { left: 0; right: 0; top: auto; bottom: 0; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--border); background: #fff; }
    .float-service a { width: auto; border: 0; border-radius: 0; box-shadow: none; min-height: 54px; }
    .float-top { width: auto; border: 0; border-radius: 0; background: var(--primary); }
    body { padding-bottom: 54px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}

/* ==========================================================================
   互动与学习中心扩展(评价/收藏/通知/笔记/答疑/证书/搜索/分页)
   ========================================================================== */

/* ---------- 通知铃与徽标 ---------- */
.header-bell { position: relative; display: inline-flex; align-items: center; color: var(--ink-soft) !important; }
.header-bell:hover { color: var(--primary) !important; }
.bell-dot { position: absolute; top: -6px; left: 12px; background: var(--primary); color: #fff; font-size: .66rem; font-style: normal; font-weight: 800; line-height: 1; padding: 2px 5px; border-radius: 999px; border: 2px solid #fff; }
.nav-dot { margin-left: 6px; background: var(--primary); color: #fff; font-style: normal; font-weight: 800; font-size: .7rem; padding: 1px 6px; border-radius: 999px; }
.account-nav a.active .nav-dot { background: #fff; color: var(--primary); }

/* ---------- 星级与评分 ---------- */
.stars { display: inline-flex; gap: 1px; line-height: 1; }
.stars-fill { color: #dcd6d1; font-size: .95rem; }
.stars-fill.on { color: #ffa41c; }
.course-rating { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .82rem; color: var(--muted); }
.course-rating strong { color: #d9700f; font-size: .9rem; }
.course-rating em { font-style: normal; }
.hero-rating { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .9rem; }
.hero-rating strong { color: #d9700f; font-size: 1.05rem; }

/* ---------- 收藏 ---------- */
.favorite-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 40px; margin-top: 10px; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--ink-soft); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.favorite-toggle:hover { border-color: var(--primary); color: var(--primary); }
.favorite-toggle .favorite-icon { color: #cfc8c3; font-size: 1.05rem; }
.favorite-toggle.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.favorite-toggle.on .favorite-icon { color: var(--primary); }
.favorite-toggle[disabled] { opacity: .6; cursor: progress; }

/* ---------- 排序与分页 ---------- */
.sort-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sort-tabs a { text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--ink-soft); padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; }
.sort-tabs a:hover { border-color: var(--primary); color: var(--primary); }
.sort-tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 30px; }
.pager a, .pager .pager-disabled { min-width: 40px; text-align: center; text-decoration: none; font-weight: 700; color: var(--ink-soft); padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .pager-disabled { color: #c3bcb7; background: var(--soft); }

/* ---------- 课程评价 ---------- */
.review-section { padding-top: 8px; }
.review-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.review-overview { background: var(--soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; text-align: center; }
.review-score { display: block; font-size: 2.4rem; line-height: 1.1; color: #d9700f; font-weight: 800; }
.review-overview p { color: var(--muted); font-size: .86rem; margin: 8px 0 0; }
.review-bars { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.review-bars li { display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.review-bars i { display: block; height: 6px; background: #e8e2dd; border-radius: 999px; overflow: hidden; }
.review-bars b { display: block; height: 100%; background: #ffa41c; }
.review-bars em { font-style: normal; text-align: right; }
.review-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px; }
.review-form h3 { margin: 0 0 12px; font-size: 1rem; }
.rating-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rating-picker label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; cursor: pointer; }
.rating-picker label:has(input:checked) { border-color: #ffa41c; background: #fff8ec; color: #b45f06; font-weight: 700; }
.rating-picker input { accent-color: #ffa41c; }
.review-form textarea, .note-form textarea, .question-form textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; resize: vertical; }
.review-form textarea:focus, .note-form textarea:focus, .question-form textarea:focus { outline: 2px solid var(--primary-line); border-color: var(--primary); }
.review-form-foot, .panel-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.form-feedback { font-size: .84rem; color: var(--muted); }
.form-feedback[data-state="ok"] { color: var(--accent); }
.form-feedback[data-state="error"] { color: var(--danger); }
.review-locked, .review-empty, .search-empty, .panel-empty, .table-note { color: var(--muted); font-size: .88rem; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.review-list > li { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-author { font-weight: 700; }
.review-head time { color: var(--muted); font-size: .8rem; margin-left: auto; }
.review-list p { margin: 0; color: var(--ink-soft); }
.review-body-empty { color: var(--muted) !important; font-size: .86rem; }
.review-reply { margin-top: 12px; background: var(--primary-soft); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 10px 14px; }
.review-reply strong { display: block; color: var(--primary-deep); font-size: .84rem; margin-bottom: 4px; }

/* ---------- 答疑(详情页精选 + 学习中心归档) ---------- */
.faq-list, .qa-list, .qa-archive { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.faq-list > li, .qa-list > li, .qa-archive > li { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; background: #fff; }
.qa-q, .faq-q { margin: 0; font-weight: 600; color: var(--ink); }
.qa-a, .faq-a { margin: 10px 0 0; color: var(--ink-soft); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 14px; }
.qa-q > span, .faq-q > span, .qa-a > span, .faq-a > span { display: inline-block; margin-right: 8px; font-size: .76rem; font-weight: 800; color: #fff; background: var(--primary); border-radius: 4px; padding: 1px 7px; vertical-align: 1px; }
.qa-a > span, .faq-a > span { background: var(--accent); }
.qa-pending { margin: 10px 0 0; color: var(--muted); font-size: .84rem; }
.qa-archive-head, .note-archive-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .84rem; color: var(--muted); }
.qa-archive-head strong { color: var(--ink); }
.qa-archive-head time, .note-archive-head time { margin-left: auto; }
.qa-state { font-weight: 800; font-size: .74rem; border-radius: 4px; padding: 1px 8px; background: var(--orange-soft); color: #b4560b; }
.qa-archive > li.answered .qa-state { background: var(--accent-soft); color: #06714d; }

/* ---------- 笔记归档 ---------- */
.note-archive { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.note-archive > li { border: 1px solid var(--border); border-left: 3px solid var(--primary-line); border-radius: var(--radius); padding: 14px 18px; background: #fff; }
.note-archive p { margin: 0; color: var(--ink-soft); white-space: pre-wrap; }
.note-archive-head em { font-style: normal; font-weight: 700; color: var(--primary); }

/* ---------- 通知列表 ---------- */
.notice-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; color: var(--muted); font-size: .88rem; }
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.notice-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.notice-list > li.unread { border-left: 3px solid var(--primary); background: #fffdfd; }
.notice-main { flex: 1 1 320px; min-width: 0; }
.notice-main h2 { margin: 0 0 4px; font-size: 1rem; }
.notice-list > li.read .notice-main h2 { color: var(--ink-soft); font-weight: 600; }
.notice-main p { margin: 0 0 6px; color: var(--ink-soft); font-size: .9rem; }
.notice-main time { color: var(--muted); font-size: .78rem; }

/* ---------- 学习报告 ---------- */
.study-report { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 26px; box-shadow: var(--shadow-sm); }
.study-report-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.study-report-head h2 { margin: 0; font-size: 1.15rem; }
.study-report-head p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }
.study-report-facts { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.study-report-facts span { display: block; color: var(--muted); font-size: .78rem; }
.study-report-facts strong { font-size: 1.05rem; }
.study-chart { display: flex; align-items: flex-end; gap: 6px; height: 128px; }
.study-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.study-bar i { display: block; width: 100%; max-width: 34px; min-height: 3px; background: var(--border); border-radius: 4px 4px 0 0; }
.study-bar i.on { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); }
.study-bar span { color: var(--muted); font-size: .68rem; white-space: nowrap; }
.study-chart-empty { margin: 14px 0 0; color: var(--muted); font-size: .86rem; }

/* ---------- 证书 ---------- */
.certificate-strip { background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 26px; }
.certificate-strip h2 { margin: 0 0 10px; font-size: 1rem; }
.certificate-strip ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.certificate-strip li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .9rem; }
.certificate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.certificate-card { border: 1px solid var(--primary-line); border-radius: var(--radius); background: linear-gradient(160deg, #fffdfb, var(--primary-soft)); padding: 22px 24px; }
.certificate-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.certificate-seal { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: .82rem; }
.certificate-kicker { margin: 0; color: var(--primary-deep); font-weight: 800; letter-spacing: .12em; font-size: .74rem; }
.certificate-card h2 { margin: 0 0 4px; font-size: 1.1rem; }
.certificate-holder { margin: 0 0 14px; color: var(--ink-soft); font-weight: 700; }
.certificate-card dl { display: grid; gap: 6px; margin: 0 0 16px; }
.certificate-card dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: .84rem; }
.certificate-card dt { color: var(--muted); margin: 0; }
.certificate-card dd { margin: 0; font-weight: 600; }
.certificate-card footer { display: flex; align-items: center; gap: 14px; }
.certificate-sheet { max-width: 720px; margin: 0 auto; border: 2px solid var(--primary-line); border-radius: var(--radius); background: linear-gradient(170deg, #fff, #fffaf8); padding: 44px 48px; text-align: center; box-shadow: var(--shadow-md); }
.certificate-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.certificate-sheet h2 { margin: 0 0 24px; font-size: 1.7rem; letter-spacing: .3em; }
.certificate-line { margin: 0 0 10px; font-size: 1.02rem; color: var(--ink-soft); }
.certificate-line strong { color: var(--ink); }
.certificate-meta { display: flex; justify-content: center; gap: 42px; margin: 28px 0 20px; }
.certificate-meta span { display: block; color: var(--muted); font-size: .76rem; }
.certificate-foot { color: var(--primary-deep); font-weight: 700; letter-spacing: .08em; margin: 0; }
.certificate-actions { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }

/* ---------- 搜索页 ---------- */
.search-hero { display: flex; gap: 10px; margin-bottom: 12px; }
.search-hero input { flex: 1; min-height: 46px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 0 16px; font: inherit; }
.search-hero input:focus { outline: 2px solid var(--primary-line); border-color: var(--primary); }
.search-hot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: .86rem; margin: 0 0 30px; }
.search-hot a { color: var(--ink-soft); text-decoration: none; border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; }
.search-hot a:hover { border-color: var(--primary); color: var(--primary); }
.search-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.search-list > li { border-bottom: 1px dashed var(--border); padding-bottom: 12px; }
.search-title { font-weight: 700; text-decoration: none; font-size: 1rem; }
.search-title:hover { color: var(--primary); }
.search-list p { margin: 4px 0 0; color: var(--ink-soft); font-size: .88rem; }
.search-list time { color: var(--muted); font-size: .78rem; }

/* ---------- 订单表补充 ---------- */
.order-coupon { display: inline-block; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 4px; padding: 1px 6px; margin-left: 4px; }
.order-status[data-status="REFUNDED"] { background: #f2eff5; color: #6b4fa0; }
.table-note { margin-top: 12px; }

/* ---------- 收银台优惠码 ---------- */
.checkout-coupon { text-align: left; margin: 0 0 14px; }
.checkout-coupon label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; font: inherit; text-transform: uppercase; }
.coupon-row input:focus { outline: 2px solid var(--primary-line); border-color: var(--primary); }
.coupon-feedback { min-height: 20px; margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.coupon-feedback[data-state="ok"] { color: var(--accent); }
.coupon-feedback[data-state="error"] { color: var(--danger); }
.checkout-cut { display: block; font-style: normal; font-size: .82rem; font-weight: 700; color: var(--accent); }

@media (max-width: 900px) {
    .review-layout { grid-template-columns: 1fr; }
    .study-report-facts { gap: 16px; }
    .certificate-sheet { padding: 30px 22px; }
    .certificate-meta { gap: 22px; }
}

@media print {
    .top-ribbon, .site-header, .main-nav, .site-footer, .float-service,
    .page-heading, .certificate-actions { display: none !important; }
    .certificate-sheet { box-shadow: none; border-color: #999; }
}
.purchase-renew-note { margin: 12px 0 8px; color: var(--muted); font-size: .82rem; }
.quiz-state { font-weight: 700; font-size: .8rem; border-radius: 4px; padding: 1px 8px; }
.quiz-state.pass { background: var(--accent-soft); color: #06714d; }
.quiz-state.fail { background: var(--orange-soft); color: #b4560b; }

/* ---------- 注销账号 ---------- */
.deletion-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.deletion-note { color: var(--ink-soft); font-size: .9rem; margin: 0 0 10px; }
.deletion-list { margin: 0 0 18px; padding-left: 20px; color: var(--ink-soft); font-size: .9rem; }
.deletion-list li { margin-bottom: 6px; }
.button-danger { background: var(--danger); }
.button-danger:hover { background: #b91c1c; }
.form-note-quiet a { color: var(--muted); }
.form-note-quiet a:hover { color: var(--danger); }
@media (max-width: 900px) { .deletion-layout { grid-template-columns: 1fr; } }

/* ---------- 选课指引卡(取代原来的二维码/电话咨询卡) ---------- */
.cat-guide { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.cat-guide ol, .side-guide ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.cat-guide li, .side-guide li { color: var(--ink-soft); font-size: .86rem; line-height: 1.55; }
.side-guide ol { margin-bottom: 0; }
.side-guide li strong { display: block; color: var(--ink); font-size: .88rem; }
.footer-contact-link { display: inline-block; margin-top: 10px; color: #d9cfc9; text-decoration: none; font-size: .86rem; }
.footer-contact-link:hover { color: #fff; text-decoration: underline; }

/* 收银台的付款方式切换:只有这所学校开通了两条以上通道时才出现 */
.checkout-channels { display: flex; gap: 8px; margin: 4px 0 12px; }
.checkout-channels:empty { display: none; }
.checkout-channel {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.checkout-channel.is-active { border-color: var(--primary); color: var(--primary); font-weight: 600; }
