/* =========================================================
   EduSafeNet H5 移动端样式（独立于 PC，移动优先）
   ========================================================= */
:root {
    --h5-primary: #1f6fd6;
    --h5-primary-dark: #1759b0;
    --h5-bg: #f4f6f9;
    --h5-card: #ffffff;
    --h5-text: #26303c;
    --h5-text-sub: #8a94a3;
    --h5-line: #e8ecf1;
    --h5-danger: #e54d42;
    --h5-success: #2fa356;
    --h5-warn: #f39800;
    --h5-header-h: 48px;
    --h5-tabbar-h: 54px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body.es-h5 {
    background: var(--h5-bg);
    color: var(--h5-text);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    padding-top: var(--h5-header-h);
    padding-bottom: calc(var(--h5-tabbar-h) + env(safe-area-inset-bottom, 0px) + 10px);
}
body.es-h5.no-tabbar { padding-bottom: 20px; }

/* ---------- 顶部栏 ---------- */
.es-h5-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--h5-header-h);
    display: flex; align-items: center;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--h5-primary), var(--h5-primary-dark));
    color: #fff;
    box-shadow: 0 1px 6px rgba(31,111,214,.25);
}
.es-h5-title {
    flex: 1; text-align: center;
    font-size: 17px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.es-h5-back {
    width: 34px; height: 34px; flex: 0 0 auto;
    position: relative; z-index: 1;
}
.es-h5-back::before {
    content: ""; position: absolute; left: 12px; top: 50%;
    width: 10px; height: 10px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: translateY(-50%) rotate(45deg);
}
/* 顶栏左右槽等宽，保证标题真正居中 */
.es-h5-header-left, .es-h5-header-right {
    flex: 0 0 78px; display: flex; align-items: center; min-width: 0;
}
.es-h5-header-right { justify-content: flex-end; }
.es-h5-header-link { color: rgba(255,255,255,.92); font-size: 13px; text-decoration: none; white-space: nowrap; }
.es-h5-header-profile { display: inline-flex; align-items: center; gap: 3px; }
.es-h5-header-profile svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.es-h5-header-avatar {
    width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.6);
    box-shadow: 0 2px 8px rgba(10,30,90,.2); text-decoration: none;
    color: #fff; font-size: 14px; font-weight: 700; font-style: normal;
}
.es-h5-header-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.es-h5-header-avatar span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* ---------- 内容区 ---------- */
.es-h5-main { padding: 12px 12px 0; max-width: 720px; margin: 0 auto; }

.es-h5-toast {
    position: relative; z-index: 5;
    padding: 10px 14px; border-radius: 10px; margin-bottom: 12px;
    font-size: 14px;
}
.es-h5-toast-ok { background: #e6f7ee; color: #1c7a43; border: 1px solid #bfe8cf; }
.es-h5-toast-err { background: #fdecec; color: #c0392b; border: 1px solid #f5c6c2; }

/* ---------- 卡片 ---------- */
.es-card {
    background: var(--h5-card);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(38,48,60,.06);
}
.es-card-title {
    font-size: 15px; font-weight: 600; margin: 0 0 10px;
    display: flex; align-items: center; justify-content: space-between;
}
.es-card-title .sub { font-size: 12px; color: var(--h5-text-sub); font-weight: 400; }

/* ---------- 首页统计块 ---------- */
.es-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.es-stat {
    background: var(--h5-card); border-radius: 12px;
    text-align: center; padding: 12px 4px;
    box-shadow: 0 1px 4px rgba(38,48,60,.06);
    text-decoration: none; display: block;
}
.es-stat b {
    display: block; font-size: 22px; font-weight: 700; line-height: 1.25;
    background: linear-gradient(135deg, #38bdf8, var(--h5-primary-dark));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.es-stat span { font-size: 12px; color: var(--h5-text-sub); }

/* ---------- 列表项 ---------- */
.es-item {
    display: flex; align-items: center;
    background: var(--h5-card); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(38,48,60,.06);
    color: var(--h5-text); text-decoration: none;
}
.es-item-main { flex: 1; min-width: 0; }
.es-item-main h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.es-item-main p { margin: 0; font-size: 12px; color: var(--h5-text-sub); }
.es-item-right { flex: 0 0 auto; margin-left: 10px; text-align: right; }
.es-item .arrow { color: #c3cad4; font-size: 18px; margin-left: 8px; }

/* ---------- 徽标 / 标签 ---------- */
.es-badge {
    display: inline-block; padding: 2px 8px; border-radius: 9px;
    font-size: 11px; line-height: 16px; vertical-align: middle;
}
.es-badge-blue { background: #e8f1fd; color: var(--h5-primary); }
.es-badge-red { background: #fdecec; color: var(--h5-danger); }
.es-badge-green { background: #e6f7ee; color: var(--h5-success); }
.es-badge-orange { background: #fff4e0; color: var(--h5-warn); }
.es-badge-gray { background: #eef1f5; color: var(--h5-text-sub); }

/* ---------- 按钮 ---------- */
.es-btn {
    display: inline-block; border: 0; border-radius: 9px;
    padding: 8px 16px; font-size: 14px; line-height: 20px;
    background: var(--h5-primary); color: #fff; text-decoration: none;
    text-align: center; cursor: pointer;
}
.es-btn:active { opacity: .85; }
.es-btn-block { display: block; width: 100%; }
.es-btn-outline {
    background: #fff; color: var(--h5-primary);
    border: 1px solid var(--h5-primary);
}
.es-btn-danger { background: var(--h5-danger); }
.es-btn-danger-outline { background: #fff; color: var(--h5-danger); border: 1px solid var(--h5-danger); }
.es-btn-warn { background: var(--h5-warn); }
.es-btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.es-btn[disabled] { opacity: .5; pointer-events: none; }
.es-btn-row { display: flex; gap: 8px; margin-top: 10px; }
.es-btn-row .es-btn { flex: 1; }

/* ---------- 表单 ---------- */
.es-field { margin-bottom: 14px; }
.es-field label { display: block; font-size: 13px; color: var(--h5-text-sub); margin-bottom: 6px; }
.es-field input[type="text"],
.es-field input[type="password"],
.es-field input[type="date"],
.es-field input[type="datetime-local"],
.es-field select,
.es-field textarea {
    width: 100%; border: 1px solid var(--h5-line); border-radius: 9px;
    padding: 10px 12px; font-size: 15px; background: #fff; color: var(--h5-text);
    outline: none;
}
.es-field input:focus, .es-field textarea:focus, .es-field select:focus { border-color: var(--h5-primary); }
.es-field textarea { min-height: 90px; resize: vertical; }
.es-validation { color: var(--h5-danger); font-size: 13px; margin: 6px 0 12px; white-space: pre-wrap; }

/* ---------- 键值行 ---------- */
.es-kv { display: flex; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed var(--h5-line); }
.es-kv:last-child { border-bottom: 0; }
.es-kv .k { flex: 0 0 84px; color: var(--h5-text-sub); }
.es-kv .v { flex: 1; word-break: break-all; }

/* ---------- 表格（清单用，横向可滚） ---------- */
.es-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.es-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.es-table th, .es-table td { padding: 9px 8px; border-bottom: 1px solid var(--h5-line); text-align: left; vertical-align: middle; }
.es-table th { color: var(--h5-text-sub); font-weight: 500; background: #fafbfc; white-space: nowrap; }
.es-table .op-btns { display: flex; gap: 6px; flex-wrap: nowrap; }
.es-table .op-btns .es-btn { flex: 0 0 auto; white-space: nowrap; }

/* ---------- 空态 ---------- */
.es-empty { text-align: center; color: var(--h5-text-sub); padding: 48px 0; font-size: 14px; }
.es-empty::before { content: "·"; display: block; font-size: 40px; line-height: 1; color: #cfd6de; margin-bottom: 8px; }

/* ---------- 分段控件 ---------- */
.es-seg { display: flex; background: #e9edf3; border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.es-seg a { flex: 1; text-align: center; padding: 7px 0; font-size: 14px; color: var(--h5-text-sub); border-radius: 8px; text-decoration: none; }
.es-seg a.on { background: #fff; color: var(--h5-primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- 搜索栏 ---------- */
.es-search { display: flex; gap: 8px; margin-bottom: 12px; }
.es-search input { flex: 1; border: 1px solid var(--h5-line); border-radius: 9px; padding: 9px 12px; font-size: 14px; outline: none; background: #fff; }
.es-search button { border: 0; border-radius: 9px; background: var(--h5-primary); color: #fff; padding: 0 16px; font-size: 14px; }

/* ---------- 分页 ---------- */
.es-pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 14px 0; font-size: 14px; }
.es-pager a { color: var(--h5-primary); text-decoration: none; }
.es-pager span { color: var(--h5-text-sub); }

/* ---------- 课程封面 ---------- */
/* 整卡是 <a>：必须显式去掉链接下划线/访问色，否则标题与副标题都会带下划线并变紫 */
.es-course-card {
    display: flex; background: var(--h5-card); border-radius: 12px; overflow: hidden;
    margin-bottom: 10px; box-shadow: 0 1px 4px rgba(38,48,60,.06);
    text-decoration: none; color: var(--h5-text); -webkit-tap-highlight-color: transparent;
}
.es-course-card:hover, .es-course-card:visited, .es-course-card:active, .es-course-card:focus,
.es-course-card:hover h4, .es-course-card:visited h4 {
    text-decoration: none; color: var(--h5-text);
}
.es-course-card * { text-decoration: none; }
.es-course-cover { flex: 0 0 118px; background: #dfe6ee; position: relative; min-height: 84px; }
.es-course-cover img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.es-course-info { flex: 1; min-width: 0; padding: 10px 12px; }
.es-course-info h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--h5-text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.es-course-info p { margin: 0; font-size: 12px; color: var(--h5-text-sub); }
.es-progress { height: 5px; border-radius: 3px; background: #edf0f4; margin-top: 8px; overflow: hidden; }
.es-progress i { display: block; height: 100%; background: var(--h5-success); border-radius: 3px; }

/* ---------- 视频学习 ---------- */
.es-video-box { background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.es-video-box video { display: block; width: 100%; max-height: 56vw; }
.es-text-content { background: var(--h5-card); border-radius: 12px; padding: 14px; font-size: 15px; overflow-wrap: break-word; }
.es-text-content img, .es-text-content video { max-width: 100% !important; height: auto; }
.es-text-content table { display: block; overflow-x: auto; }

/* ---------- 聊天 ---------- */
.es-chat { padding: 4px 0 8px; }
.es-bubble { max-width: 78%; margin-bottom: 12px; }
.es-bubble .meta { font-size: 11px; color: var(--h5-text-sub); margin-bottom: 3px; }
.es-bubble .body { padding: 9px 12px; border-radius: 12px; font-size: 14px; word-break: break-all; }
.es-bubble.me { margin-left: auto; text-align: right; }
.es-bubble.me .body { background: var(--h5-primary); color: #fff; border-top-right-radius: 3px; }
.es-bubble.them .body { background: #fff; border: 1px solid var(--h5-line); border-top-left-radius: 3px; }
.es-reply-bar { display: flex; gap: 8px; margin-top: 6px; }
.es-reply-bar textarea { flex: 1; border: 1px solid var(--h5-line); border-radius: 9px; padding: 9px 12px; font-size: 14px; min-height: 44px; resize: none; outline: none; }
.es-reply-bar .es-btn { flex: 0 0 auto; align-self: flex-end; }

/* ---------- 底部 Tab（科技风） ---------- */
.es-h5-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    display: flex;
    height: calc(var(--h5-tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,249,253,.98));
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid rgba(31,111,214,.12);
    box-shadow: 0 -6px 22px rgba(13,40,90,.10);
}
/* 顶部发光细线（青→蓝→紫） */
.es-h5-tabbar::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,.75), rgba(124,58,237,.75), transparent);
}
.es-h5-tabbar a {
    position: relative;
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; text-decoration: none; color: var(--h5-text-sub); font-size: 11px;
    transition: color .25s ease;
}
.es-h5-tabbar a:active { transform: scale(.94); }
.es-h5-tabbar a.on { color: var(--h5-primary); font-weight: 700; }
.es-h5-tabbar a span { transition: color .25s ease; }

/* 图标容器：激活态圆形发光底盘 */
.es-h5-tabbar .tb-ic {
    width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 50%;
    transition: background .28s ease, box-shadow .28s ease, transform .28s ease;
}
.es-h5-tabbar a.on .tb-ic {
    background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(124,58,237,.20));
    box-shadow: 0 0 16px rgba(59,130,246,.38), inset 0 0 0 1px rgba(59,130,246,.18);
    transform: translateY(-1px) scale(1.04);
}
.es-h5-tabbar .tb-svg { width: 24px; height: 24px; display: block; transition: transform .28s ease; }
.es-h5-tabbar .tb-svg path {
    fill: none; stroke: var(--h5-text-sub); stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
    transition: stroke .28s ease;
}
/* 激活态：青→蓝→紫渐变描边 + 外发光 */
.es-h5-tabbar a.on .tb-svg path { stroke: url(#h5TabGrad); }
.es-h5-tabbar a.on .tb-svg { filter: drop-shadow(0 1px 5px rgba(59,130,246,.55)); }

/* 激活项顶部发光指示条 */
.es-h5-tabbar a.on::after {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 26px; height: 3px; border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #22d3ee, #3b82f6, #7c3aed);
    box-shadow: 0 0 10px rgba(59,130,246,.8);
}

/* ---------- 登录页：沉浸式科技风 + 图形验证码 ---------- */
/* 🔴 必须带 body.es-h5 提升特异性，否则被 body.es-h5{background:var(--h5-bg)} 覆盖成浅色底 */
body.es-h5.es-login-page {
    min-height: 100vh; min-height: 100dvh; padding-bottom: 20px !important;
    background:
        radial-gradient(90% 55% at 82% 6%, rgba(56, 189, 248, .30), transparent 60%),
        radial-gradient(80% 50% at 8% 32%, rgba(124, 58, 237, .28), transparent 65%),
        radial-gradient(100% 60% at 50% 100%, rgba(37, 99, 235, .22), transparent 70%),
        linear-gradient(165deg, #0a1c42 0%, #0b2350 45%, #101a44 100%);
}
.es-login-page::before {
    content: ""; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(130, 195, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(130, 195, 255, .045) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
    mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.es-login-page .es-h5-header { background: transparent; box-shadow: none; }
.es-login-page .es-h5-title { color: rgba(255, 255, 255, .9); font-weight: 600; }
.es-login-page .es-h5-header-link { color: rgba(255, 255, 255, .85); }
.es-login-page .es-h5-main { position: relative; z-index: 1; padding: 0 18px; max-width: 480px; }

.lg-hero { position: relative; overflow: hidden; padding: 30px 4px 26px; text-align: center; }
.lg-glow {
    position: absolute; left: 50%; top: -90px; transform: translateX(-50%);
    width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, .28), transparent 68%);
    filter: blur(8px); pointer-events: none; animation: lgFloat 7s ease-in-out infinite alternate;
}
/* 🔴关键帧必须保留 translateX(-50%)，否则动画会覆盖居中 transform，光晕偏成右侧矩形 */
@keyframes lgFloat {
    from { transform: translate(-50%, 0); }
    to { transform: translate(-50%, 14px); }
}
.lg-orbit {
    position: absolute; left: 50%; top: -64px; transform: translateX(-50%);
    width: 230px; height: 230px; border-radius: 50%;
    border: 1px solid rgba(125, 200, 255, .14);
    box-shadow: 0 0 0 26px rgba(125, 200, 255, .03), 0 0 0 54px rgba(125, 200, 255, .02);
    pointer-events: none;
}
.lg-brand { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; }
.lg-logo {
    width: 50px; height: 50px; flex: 0 0 50px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, #38bdf8, #4f46e5);
    box-shadow: 0 10px 26px rgba(56, 189, 248, .4), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.lg-logo svg { width: 29px; height: 29px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lg-brand-txt { text-align: left; }
.lg-brand-txt h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 2px; color: #fff; text-shadow: 0 2px 12px rgba(8, 30, 80, .4); }
.lg-brand-txt p { margin: 3px 0 0; font-size: 9px; letter-spacing: 2.4px; color: rgba(160, 205, 250, .75); }
.lg-brand-sub {
    position: relative; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 11px; letter-spacing: 1px; color: rgba(200, 225, 255, .7);
}
.lg-brand-sub i { width: 26px; height: 1px; background: linear-gradient(90deg, transparent, rgba(125, 211, 252, .7)); }
.lg-brand-sub i:last-child { transform: rotate(180deg); }

.lg-card {
    position: relative; border-radius: 24px; padding: 22px 20px 20px; margin-bottom: 16px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
    border: 1px solid rgba(190, 220, 255, .22);
    box-shadow: 0 20px 46px rgba(3, 14, 45, .36), inset 0 1px 0 rgba(255, 255, 255, .25);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.lg-card::before {
    content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
}
.lg-card-head { margin-bottom: 20px; }
.lg-card-head b { display: block; font-size: 21px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.lg-card-head span { display: block; margin-top: 4px; font-size: 12px; color: rgba(200, 225, 255, .65); }
.lg-alert { margin-bottom: 14px; padding: 9px 12px; border-radius: 10px; font-size: 12px; color: #ffd9d9; background: rgba(229, 77, 66, .18); border: 1px solid rgba(255, 150, 150, .32); }

.lg-field { margin-bottom: 16px; }
.lg-field > label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .5px; color: rgba(215, 235, 255, .85); margin-bottom: 7px; }
.lg-input {
    display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 12px; border-radius: 13px;
    background: rgba(8, 24, 60, .32); border: 1px solid rgba(170, 205, 250, .22);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.lg-input:focus-within { border-color: rgba(125, 211, 252, .85); box-shadow: 0 0 0 3px rgba(56, 189, 248, .16); background: rgba(8, 24, 60, .42); }
.lg-input > svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: rgba(160, 205, 250, .8); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 15px; }
.lg-input input::placeholder { color: rgba(190, 215, 245, .45); }
.lg-input input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 1000px #123054 inset; }
.lg-eye { width: 30px; height: 30px; flex: 0 0 30px; border: 0; background: transparent; padding: 5px; cursor: pointer; opacity: .6; }
.lg-eye svg { width: 100%; height: 100%; fill: none; stroke: #dceeff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-eye.on { opacity: 1; }

.lg-captcha { display: flex; gap: 9px; align-items: stretch; }
.lg-input-code { flex: 1; min-width: 0; }
.lg-input-code input { letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
#captchaImg {
    width: 128px; height: 48px; flex: 0 0 128px; border-radius: 13px; cursor: pointer;
    object-fit: cover; background: #fff; border: 1px solid rgba(190, 220, 255, .35);
    box-shadow: 0 4px 12px rgba(3, 14, 45, .22); transition: transform .15s;
}
#captchaImg:active { transform: scale(.97); }
.lg-captcha-tip { margin-top: 7px; font-size: 10.5px; color: rgba(180, 210, 245, .55); letter-spacing: .2px; }

.lg-remember { display: flex; align-items: center; gap: 8px; margin: 2px 0 16px; font-size: 12.5px; color: rgba(215, 235, 255, .82); cursor: pointer; }
.lg-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.lg-remember i { position: relative; width: 34px; height: 19px; flex: 0 0 34px; border-radius: 999px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(190, 220, 255, .28); transition: background .2s; }
.lg-remember i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .2s; }
.lg-remember input:checked + i { background: linear-gradient(90deg, #38bdf8, #6366f1); border-color: transparent; }
.lg-remember input:checked + i::after { transform: translateX(15px); }
.lg-remember em { margin-left: auto; font-style: normal; font-size: 9px; letter-spacing: 1.4px; color: rgba(160, 200, 245, .5); }

.lg-error { display: none; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; color: #ffdada; background: rgba(229, 77, 66, .16); border: 1px solid rgba(255, 150, 150, .3); }
.lg-error.validation-summary-errors, .lg-error.show { display: block; }
.lg-error ul { margin: 0; padding-left: 18px; }

.lg-submit {
    width: 100%; height: 50px; border: 0; border-radius: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 16px; font-weight: 700; letter-spacing: 3px; color: #fff;
    background: linear-gradient(100deg, #22a7f0, #3b6ef5 48%, #7c3aed);
    box-shadow: 0 10px 24px rgba(59, 110, 245, .42), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .18s, box-shadow .18s, opacity .18s;
}
.lg-submit svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-submit:active { transform: scale(.98); box-shadow: 0 6px 16px rgba(59, 110, 245, .35); }
.lg-submit.loading { opacity: .75; cursor: wait; }

.lg-hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

.lg-foot { text-align: center; padding: 4px 0 10px; }
.lg-foot-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .4px;
    color: rgba(190, 220, 255, .7); padding: 5px 12px; border-radius: 999px;
    border: 1px solid rgba(160, 200, 255, .18); background: rgba(255, 255, 255, .05);
}
.lg-foot-badge i { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.lg-foot p { margin: 12px 0 0; font-size: 11px; color: rgba(170, 200, 235, .5); }

/* 矮屏（<=700px 高，如 360x600/360x640）：压缩沉浸式头部与卡片留白，
   让「登录」按钮留在首屏，安卓小屏不必先滚动才能点登录 */
@media (max-width: 480px) and (max-height: 700px) {
    .lg-hero { padding: 14px 4px 12px; }
    .lg-brand-sub { margin-top: 10px; }
    .lg-card { padding: 16px 16px 14px; margin-bottom: 10px; }
    .lg-card-head { margin-bottom: 12px; }
    .lg-card-head b { font-size: 19px; }
    .lg-field { margin-bottom: 10px; }
    .lg-remember { margin: 0 0 10px; }
    .lg-captcha-tip { margin-top: 4px; }
    .lg-foot { display: none; }
}
@media (max-width: 340px) {
    .lg-brand-txt h1 { font-size: 19px; }
    .lg-logo { width: 44px; height: 44px; flex-basis: 44px; }
    #captchaImg { width: 110px; flex-basis: 110px; }
    .lg-card { padding: 18px 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .lg-glow { animation: none; }
}

/* ============ 页面标题行 / 分类条 ============ */
.es-page-title {
    display: flex; align-items: center; gap: 8px;
    margin: 12px 2px 10px; font-size: 17px; font-weight: 700;
}
.es-page-title .sub { font-size: 12px; font-weight: 500; color: var(--h5-text-sub); }
.es-page-title-link { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--h5-primary); text-decoration: none; }
.es-cat-bar {
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px;
    padding: 2px 0 10px; -webkit-overflow-scrolling: touch;
}
.es-cat-bar::-webkit-scrollbar { display: none; }
.es-cat-bar { cursor: grab; scrollbar-width: none; -ms-overflow-style: none; }
.es-cat-bar.es-cat-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.es-cat-bar a {
    flex: 0 0 auto; padding: 6px 14px; border-radius: 16px;
    font-size: 13px; color: var(--h5-text-sub);
    background: var(--h5-card); border: 1px solid var(--h5-line);
    text-decoration: none; white-space: nowrap;
}
.es-cat-bar a.on { color: #fff; background: var(--h5-primary); border-color: var(--h5-primary); font-weight: 600; }

/* ============ 视频卡片 ============ */
.es-video-card {
    display: flex; gap: 10px; background: var(--h5-card);
    border-radius: 12px; padding: 10px; margin-bottom: 10px;
    text-decoration: none; color: var(--h5-text);
    box-shadow: 0 1px 4px rgba(31, 111, 214, .06);
}
.es-video-cover {
    position: relative; flex: 0 0 132px; height: 84px;
    border-radius: 8px; overflow: hidden; background: #e9edf2;
}
.es-video-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.es-video-cover::after {
    content: '▶'; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%); width: 30px; height: 30px;
    line-height: 30px; text-align: center; border-radius: 50%;
    background: rgba(0,0,0,.45); color: #fff; font-size: 12px; padding-left: 3px;
}
.es-video-dur {
    position: absolute; right: 4px; bottom: 4px; z-index: 1;
    padding: 1px 6px; border-radius: 4px; font-size: 11px;
    background: rgba(0,0,0,.65); color: #fff;
}
.es-video-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.es-video-info h4 {
    margin: 0 0 6px; font-size: 14px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.es-video-info p { margin: 0; font-size: 12px; color: var(--h5-text-sub); }
.es-video-player-wrap { background: #000; }

/* ============ 评论 ============ */
.es-comment { padding: 10px 0; border-bottom: 1px dashed var(--h5-line); }
.es-comment:last-of-type { border-bottom: none; }
.es-comment-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--h5-text-sub); margin-bottom: 4px; }
.es-comment-head b { color: var(--h5-text); font-size: 13px; }
.es-comment-body { font-size: 14px; white-space: pre-wrap; word-break: break-all; }

/* ============ 上传图片预览网格 ============ */
.es-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.es-preview-cell { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--h5-line); }
.es-preview-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.es-preview-del {
    position: absolute; top: 0; right: 0; width: 20px; height: 20px;
    line-height: 18px; text-align: center; font-size: 14px;
    background: rgba(0,0,0,.55); color: #fff; cursor: pointer;
    border-radius: 0 0 0 8px; user-select: none;
}
.es-preview-file {
    position: relative; display: inline-flex; align-items: center;
    max-width: 100%; padding: 6px 26px 6px 10px; margin: 0;
    font-size: 12px; color: var(--h5-text-sub);
    background: var(--h5-card); border: 1px solid var(--h5-line); border-radius: 8px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.es-preview-del-inline { position: static; margin-left: 6px; border-radius: 50%; flex: 0 0 18px; }

/* ============ AI 回答反馈条（点赞 / 点踩 / 复制） ============ */
.es-ai-fb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; padding-left: 2px; }
.es-ai-fb button {
    border: 1px solid var(--h5-line); background: var(--h5-card); color: var(--h5-text-sub);
    border-radius: 999px; padding: 3px 10px; font-size: 12px; line-height: 1.6; cursor: pointer;
}
.es-ai-fb button:disabled { opacity: .6; }
.es-ai-fb button[data-f="1"].on { color: var(--h5-primary); border-color: var(--h5-primary); background: #eef5ff; }
.es-ai-fb button[data-f="-1"].on { color: var(--h5-danger); border-color: var(--h5-danger); background: #fff1f0; }
.es-ai-fb-tip { font-size: 11px; color: var(--h5-text-sub); }

/* ============ 点踩反馈弹层（底部抽屉） ============ */
.es-fb-mask {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9999; display: none;
    align-items: flex-end; background: rgba(15, 23, 42, .45);
}
.es-fb-sheet {
    width: 100%; max-height: 82vh; overflow-y: auto;
    background: var(--h5-card); border-radius: 16px 16px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .18);
}
.es-fb-h { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.es-fb-sub { font-size: 12px; color: var(--h5-text-sub); line-height: 1.6; margin-bottom: 12px; }
.es-fb-label { font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.es-fb-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.es-fb-reasons label {
    display: inline-flex; align-items: center; gap: 4px;
    border: 1px solid var(--h5-line); border-radius: 999px;
    padding: 5px 10px; font-size: 12px; color: var(--h5-text); cursor: pointer;
}
.es-fb-reasons label.on { border-color: var(--h5-primary); color: var(--h5-primary); background: #eef5ff; }
.es-fb-reasons input { width: auto; margin: 0; accent-color: var(--h5-primary); }
.es-fb-ta {
    width: 100%; min-height: 76px; padding: 8px 10px; font-size: 13px;
    border: 1px solid var(--h5-line); border-radius: 8px; resize: vertical;
    background: var(--h5-card); color: var(--h5-text);
}
.es-fb-err { min-height: 18px; margin-top: 6px; font-size: 12px; color: var(--h5-danger); }
.es-fb-actions { display: flex; gap: 10px; margin-top: 8px; }
.es-fb-actions button { flex: 1; padding: 10px 0; border-radius: 8px; font-size: 14px; border: 1px solid var(--h5-line); }
.es-fb-cancel { background: var(--h5-card); color: var(--h5-text-sub); }
.es-fb-ok { background: var(--h5-primary); border-color: var(--h5-primary) !important; color: #fff; }

/* ============ 首页 App 化视觉：沉浸式头部 / 主推卡 / 分组金刚区 / 每日一签 ============ */
.hm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --- 沉浸式头部 --- */
.hm-hero {
    position: relative; overflow: hidden;
    margin: -12px -12px 14px; padding: 18px 16px;
    border-radius: 0 0 26px 26px; color: #fff;
    background:
        radial-gradient(110% 85% at 92% -10%, rgba(56, 189, 248, .55), transparent 60%),
        radial-gradient(95% 95% at 0% 125%, rgba(139, 92, 246, .48), transparent 62%),
        linear-gradient(125deg, #2068d8 0%, #3b5bdb 48%, #673ab7 100%);
    box-shadow: 0 10px 26px rgba(37, 72, 160, .22);
}
.hm-hero::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
    mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.hm-hero-orb {
    position: absolute; right: -46px; top: -68px; width: 190px; height: 190px; border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 211, 252, .4), transparent 68%);
    filter: blur(6px); pointer-events: none; animation: hmFloat 7s ease-in-out infinite alternate;
}
.hm-hero-ring {
    position: absolute; right: -34px; top: -56px; width: 168px; height: 168px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 0 0 20px rgba(255, 255, 255, .045), 0 0 0 42px rgba(255, 255, 255, .03);
    pointer-events: none;
}
@keyframes hmFloat { from { transform: translateY(0); } to { transform: translateY(14px); } }
.hm-hero-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.hm-avatar {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; font-weight: 700; color: #fff;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px rgba(10, 30, 90, .18);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hm-greet { flex: 1; min-width: 0; }
.hm-greet b { display: block; font-size: 17px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-greet span { display: block; margin-top: 2px; font-size: 11.5px; color: rgba(255, 255, 255, .74); }
.hm-hero-tag {
    font-size: 9px; letter-spacing: 1.1px; white-space: nowrap;
    padding: 4px 8px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .88);
    background: rgba(255, 255, 255, .08);
}
/* 首页右上角消息铃铛入口（无 Tab 后迁至首页） */
.hm-bell {
    position: relative; flex: 0 0 auto;
    width: 40px; height: 40px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; text-decoration: none;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px rgba(10, 30, 90, .18);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    transition: transform .2s ease, background .2s ease;
}
.hm-bell:active { transform: scale(.92); }
.hm-bell svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm-bell-dot {
    position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 999px; background: linear-gradient(135deg, #ff5d73, #ff2d55); color: #fff;
    font-size: 10.5px; font-style: normal; font-weight: 700; line-height: 17px; text-align: center;
    box-shadow: 0 2px 6px rgba(255, 45, 85, .5); border: 2px solid rgba(255, 255, 255, .9);
}
.hm-stats {
    position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr);
    margin-top: 16px; padding: 11px 4px; border-radius: 16px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hm-stat { position: relative; text-align: center; text-decoration: none; }
.hm-stat + .hm-stat::before {
    content: ""; position: absolute; left: 0; top: 12%; height: 76%; width: 1px;
    background: rgba(255, 255, 255, .17);
}
.hm-stat b { display: block; font-size: 21px; line-height: 1.25; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0, 30, 90, .18); }
.hm-stat span { font-size: 10.5px; color: rgba(255, 255, 255, .76); white-space: nowrap; }

/* --- 主推卡：今日安全任务 --- */
.hm-focus {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px;
    min-height: 88px; padding: 14px; margin-bottom: 18px;
    border-radius: 20px; text-decoration: none; color: #fff;
    background:
        radial-gradient(90% 130% at 100% 0%, rgba(56, 189, 248, .3), transparent 55%),
        linear-gradient(115deg, #111e46 0%, #28307a 55%, #5b2a9c 100%);
    border: 1px solid rgba(160, 180, 255, .16);
    box-shadow: 0 10px 24px rgba(40, 44, 110, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: transform .18s ease;
}
.hm-focus:active { transform: scale(.985); }
.hm-focus::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 20px 20px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000);
    mask-image: linear-gradient(90deg, transparent, #000);
}
.hm-focus-glow {
    position: absolute; right: -30px; top: -50px; width: 130px; height: 130px; border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, .55), transparent 70%);
    filter: blur(6px); pointer-events: none;
}
.hm-focus-ico {
    position: relative; z-index: 1; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, #a78bfa, #6d28d9);
    box-shadow: 0 8px 20px rgba(139, 92, 246, .55), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.hm-focus-ico svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hm-focus-txt { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hm-focus-txt em { font-style: normal; font-size: 9px; letter-spacing: 1.6px; color: rgba(180, 205, 255, .72); }
.hm-focus-txt b { font-size: 17px; font-weight: 700; margin: 2px 0 3px; }
.hm-focus-txt small { font-size: 10.5px; font-weight: 400; color: rgba(220, 230, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-focus-go {
    position: relative; z-index: 1; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1;
    padding-bottom: 3px; background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25); color: #fff;
}

/* --- 区块 / 分组标题 --- */
.hm-block-head { display: flex; align-items: center; gap: 8px; margin: 2px 2px 12px; }
.hm-block-bar { width: 4px; height: 16px; border-radius: 3px; flex: 0 0 4px; background: linear-gradient(180deg, #38bdf8, #6366f1); box-shadow: 0 0 8px rgba(56, 189, 248, .5); }
.hm-block-head h5 { margin: 0; font-size: 16px; font-weight: 700; color: #1e293b; letter-spacing: .5px; }
.hm-block-head em { font-style: normal; font-size: 9px; letter-spacing: 1.3px; color: #94a3b8; border-left: 1px solid #e2e8f0; padding-left: 8px; }
.hm-block-count { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: #94a3b8; }
.hm-block-count i { width: 5px; height: 5px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 7px #22c55e; }
.hm-sec { margin-bottom: 14px; }
.hm-sec-head { display: flex; align-items: center; gap: 7px; margin: 0 3px 9px; }
.hm-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.hm-dot-blue { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .14); }
.hm-dot-violet { background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .14); }
.hm-sec-head b { font-size: 13px; font-weight: 700; color: #334155; }
.hm-sec-head em { font-style: normal; font-size: 9px; letter-spacing: 1.1px; color: #a8b3c2; }
.hm-sec-head span { margin-left: auto; font-size: 10px; color: #b3bdc9; }

/* --- 分组金刚区 --- */
.hm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hm-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    min-height: 98px; padding: 12px 4px 10px; border-radius: 18px; text-decoration: none; overflow: hidden;
    background: linear-gradient(170deg, #fff 0%, #fbfdff 100%);
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 8px 20px rgba(30, 64, 140, .08), 0 1px 2px rgba(30, 64, 140, .05), inset 0 1px 0 #fff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: hmIn .45s backwards ease-out;
}
.hm-item::after {
    content: ""; position: absolute; left: 50%; top: -32px; transform: translateX(-50%);
    width: 86px; height: 50px; border-radius: 50%;
    background: var(--q-glow); filter: blur(26px); opacity: .34; pointer-events: none;
}
.hm-item:active { transform: scale(.955); border-color: var(--q-c1); box-shadow: 0 10px 22px var(--q-glow), inset 0 1px 0 #fff; }
@keyframes hmIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hm-item:nth-child(1) { animation-delay: .03s; }
.hm-item:nth-child(2) { animation-delay: .07s; }
.hm-item:nth-child(3) { animation-delay: .11s; }
.hm-item:nth-child(4) { animation-delay: .15s; }
.hm-item:nth-child(5) { animation-delay: .19s; }
.hm-item:nth-child(6) { animation-delay: .23s; }
.hm-item:nth-child(7) { animation-delay: .27s; }
.hm-ico {
    position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, var(--q-c1), var(--q-c2));
    box-shadow: 0 8px 16px var(--q-glow), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.hm-ico::after { content: ""; position: absolute; right: 7px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.hm-ico svg { width: 23px; height: 23px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm-t { position: relative; z-index: 1; font-size: 13px; font-weight: 600; color: #26303c; letter-spacing: .2px; white-space: nowrap; }
.hm-s { position: relative; z-index: 1; font-size: 10px; color: #9aa6b5; letter-spacing: .2px; white-space: nowrap; }
.hm-ai-spark {
    position: absolute; right: 9px; top: 9px; width: 5px; height: 5px; border-radius: 50%;
    background: #c084fc; box-shadow: 0 0 8px 2px rgba(192, 132, 252, .7);
    animation: hmBlink 2s ease-in-out infinite;
}
@keyframes hmBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* 每个入口独立渐变光色 */
.hm-c1  { --q-c1: #38bdf8; --q-c2: #2563eb; --q-glow: rgba(56, 189, 248, .45); }
.hm-c2  { --q-c1: #22d3ee; --q-c2: #0e7490; --q-glow: rgba(34, 211, 238, .42); }
.hm-c3  { --q-c1: #818cf8; --q-c2: #4f46e5; --q-glow: rgba(129, 140, 248, .44); }
.hm-c4  { --q-c1: #fbbf24; --q-c2: #ea580c; --q-glow: rgba(251, 191, 36, .40); }
.hm-c5  { --q-c1: #a78bfa; --q-c2: #7c3aed; --q-glow: rgba(167, 139, 250, .44); }
.hm-c6  { --q-c1: #fb7185; --q-c2: #e11d48; --q-glow: rgba(251, 113, 133, .38); }
.hm-c7  { --q-c1: #60a5fa; --q-c2: #1d4ed8; --q-glow: rgba(96, 165, 250, .45); }
.hm-c8  { --q-c1: #2dd4bf; --q-c2: #0f766e; --q-glow: rgba(45, 212, 191, .40); }
.hm-c9  { --q-c1: #facc15; --q-c2: #d97706; --q-glow: rgba(250, 204, 21, .38); }
.hm-c10 { --q-c1: #4ade80; --q-c2: #15803d; --q-glow: rgba(74, 222, 128, .36); }
.hm-c11 { --q-c1: #67e8f9; --q-c2: #0891b2; --q-glow: rgba(103, 232, 249, .42); }
.hm-c12 { --q-c1: #c084fc; --q-c2: #6d28d9; --q-glow: rgba(167, 139, 250, .48); }
/* 随手拍：橙红警示色，与检查任务的蓝色区分，突出「主动发现」 */
.hm-c13 { --q-c1: #fb923c; --q-c2: #dc2626; --q-glow: rgba(251, 146, 60, .42); }

/* --- 每日一签 --- */
.hm-tip {
    display: flex; gap: 11px; align-items: flex-start; padding: 14px; border-radius: 18px;
    background: linear-gradient(120deg, #eef5ff, #f6f2ff);
    border: 1px solid #e5ecfb; box-shadow: 0 4px 14px rgba(30, 64, 140, .05);
}
.hm-tip-ico {
    width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, #60a5fa, #6366f1);
    box-shadow: 0 6px 14px rgba(79, 70, 229, .25);
}
.hm-tip-ico svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm-tip-body { min-width: 0; }
.hm-tip-body b { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #1e293b; }
.hm-tip-body em { font-style: normal; font-size: 10px; font-weight: 400; color: #7c8ba1; background: rgba(255, 255, 255, .75); padding: 1px 7px; border-radius: 999px; }
.hm-tip-body p { margin: 5px 0 0; font-size: 12.5px; color: #6b7a8d; line-height: 1.6; }

@media (max-width: 340px) {
    .hm-grid { gap: 7px; }
    .hm-item { min-height: 92px; padding: 10px 2px; }
    .hm-ico { width: 40px; height: 40px; border-radius: 13px; }
    .hm-t { font-size: 12px; }
    .hm-s { font-size: 9px; }
    .hm-hero-tag { display: none; }
    .hm-focus-txt small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hm-hero-orb, .hm-item, .hm-ai-spark { animation: none; }
}

/* ============ 首页 hero 头像（真实个人图像 + 首字兜底） ============ */
.hm-avatar { text-decoration: none; overflow: hidden; position: relative; }
.hm-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-avatar i { font-style: normal; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* ============ 个人中心 ============ */
.pf-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.pf-hero svg, .pf-card svg, .pf-actions svg {
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.pf-hero {
    position: relative; overflow: hidden; margin: -12px -12px 14px;
    padding: 16px 18px 20px; border-radius: 0 0 26px 26px;
    background:
        radial-gradient(85% 55% at 88% 4%, rgba(56,189,248,.34), transparent 62%),
        radial-gradient(70% 45% at 6% 25%, rgba(139,92,246,.34), transparent 65%),
        linear-gradient(155deg, #1d4ed8 0%, #4338ca 52%, #6d28d9 100%);
    color: #fff; text-align: center;
    box-shadow: 0 12px 28px rgba(49,46,129,.22);
}
.pf-hero::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; opacity: .5;
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 82%);
    mask-image: linear-gradient(180deg, #000, transparent 82%);
}
.pf-hero-orb {
    position: absolute; left: 50%; top: -96px; transform: translateX(-50%);
    width: 300px; height: 300px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(125,211,252,.30), transparent 68%);
    filter: blur(10px); animation: lgFloat 7s ease-in-out infinite alternate;
}
.pf-hero-ring {
    position: absolute; right: -46px; top: 4px; width: 180px; height: 180px;
    border-radius: 50%; border: 1px solid rgba(255,255,255,.13);
    box-shadow: 0 0 0 26px rgba(255,255,255,.035), 0 0 0 54px rgba(255,255,255,.025);
    pointer-events: none;
}
.pf-hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; }
.pf-hero-tag {
    font-size: 10px; letter-spacing: 2.2px; font-weight: 700;
    color: rgba(255,255,255,.82); padding: 4px 10px; border-radius: 999px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
}
.pf-hero-role {
    font-size: 11px; padding: 4px 11px; border-radius: 999px;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pf-avatar-wrap { position: relative; width: 96px; margin: 12px auto 9px; }
.pf-avatar-ring {
    display: flex; align-items: center; justify-content: center;
    width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
    background: linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,255,255,.12));
    border: 3px solid rgba(255,255,255,.62);
    box-shadow: 0 0 0 6px rgba(255,255,255,.10), 0 12px 26px rgba(10,20,80,.30),
                inset 0 1px 0 rgba(255,255,255,.5);
    color: #fff; font-size: 38px; font-weight: 700;
}
.pf-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-avatar-initial { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.pf-avatar-cam {
    position: absolute; right: -2px; bottom: 1px; width: 30px; height: 30px;
    border-radius: 50%; border: 2px solid rgba(255,255,255,.9); cursor: pointer;
    background: linear-gradient(140deg, #38bdf8, #6366f1); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(20,40,120,.35);
}
.pf-avatar-cam svg { width: 15px; height: 15px; }
.pf-avatar-cam.loading { opacity: .6; pointer-events: none; }
.pf-name { position: relative; margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .6px; }
.pf-company {
    position: relative; margin: 5px 0 0; font-size: 12px; color: rgba(255,255,255,.84);
    display: inline-flex; align-items: center; gap: 5px;
}
.pf-company svg { width: 13px; height: 13px; }
.pf-hero-chips {
    position: relative; margin-top: 15px; display: flex; align-items: center;
    justify-content: space-around; padding: 11px 6px; border-radius: 16px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.20);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pf-hero-chips > i { width: 1px; height: 24px; background: rgba(255,255,255,.22); }
.pf-hero-chips span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pf-hero-chips b { font-size: 14px; font-weight: 700; letter-spacing: .3px; }
.pf-hero-chips em { font-style: normal; font-size: 10.5px; color: rgba(255,255,255,.72); }

/* 通用白卡 */
.pf-card {
    background: #fff; border-radius: 18px; padding: 14px 14px 8px; margin-bottom: 12px;
    border: 1px solid rgba(226,232,240,.95);
    box-shadow: 0 6px 18px rgba(30,64,140,.07), 0 1px 2px rgba(30,64,140,.05), inset 0 1px 0 #fff;
}
.pf-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.pf-card-head b { font-size: 15px; color: #1e293b; font-weight: 700; }
.pf-card-head em { font-style: normal; font-size: 9.5px; letter-spacing: 1.1px; color: #a3b0c2; font-weight: 700; }
.pf-card-head-note { margin-left: auto; font-size: 10px; color: #94a3b8; background: #f1f5f9; padding: 2px 8px; border-radius: 999px; }
.pf-bar { width: 3px; height: 15px; border-radius: 3px; background: linear-gradient(#3b82f6, #6366f1); }
.pf-bar.v2 { background: linear-gradient(#06b6d4, #8b5cf6); }
.pf-bar.v3 { background: linear-gradient(#f59e0b, #ef4444); }

/* 账号信息行 */
.pf-rows { display: flex; flex-direction: column; }
.pf-row {
    display: flex; align-items: center; gap: 10px; min-height: 46px;
    border-bottom: 1px solid #f1f5f9;
}
.pf-row:last-child { border-bottom: none; }
.pf-row-ico {
    width: 29px; height: 29px; flex: 0 0 29px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    box-shadow: 0 3px 8px rgba(30,64,140,.14);
}
.pf-row-ico svg { width: 16px; height: 16px; }
.c-blue { background: linear-gradient(140deg, #60a5fa, #3b82f6); }
.c-cyan { background: linear-gradient(140deg, #22d3ee, #0891b2); }
.c-violet { background: linear-gradient(140deg, #a78bfa, #7c3aed); }
.c-indigo { background: linear-gradient(140deg, #818cf8, #4f46e5); }
.c-rose { background: linear-gradient(140deg, #fb7185, #e11d48); }
.c-teal { background: linear-gradient(140deg, #2dd4bf, #0d9488); }
.c-amber { background: linear-gradient(140deg, #fbbf24, #f59e0b); }
.pf-row label { font-size: 12.5px; color: #7b8a9e; flex: 0 0 68px; }
.pf-val {
    margin-left: auto; text-align: right; font-size: 12.5px; font-weight: 600;
    color: #26364b; word-break: break-all; line-height: 1.4;
}

/* 数据统计 */
.pf-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding-bottom: 6px; }
.pf-stat {
    position: relative; overflow: hidden; min-height: 104px;
    padding: 12px 10px 10px; border-radius: 15px;
    background: linear-gradient(160deg, #fff 0%, var(--q-bg) 100%);
    border: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 3px 10px rgba(30,64,140,.045);
}
.pf-stat::before {
    content: ""; position: absolute; right: -18px; top: -22px;
    width: 76px; height: 76px; border-radius: 50%;
    background: var(--q-glow); filter: blur(16px); opacity: .5;
}
.pf-stat-ico {
    width: 30px; height: 30px; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(140deg, var(--q-c1), var(--q-c2));
    box-shadow: 0 4px 10px var(--q-glow); margin-bottom: 7px;
}
.pf-stat-ico svg { width: 17px; height: 17px; }
.pf-stat b { display: block; font-size: 28px; font-weight: 800; line-height: 1; color: var(--q-c2); letter-spacing: -.6px; }
.pf-stat b em { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 3px; color: #94a3b8; }
.pf-stat-label { display: block; margin-top: 5px; font-size: 12.5px; font-weight: 600; color: #334155; }
.pf-stat small { display: block; margin-top: 3px; font-size: 10px; color: #8493a8; line-height: 1.35; }
.pf-s1 { --q-c1: #60a5fa; --q-c2: #2563eb; --q-glow: rgba(59,130,246,.28); --q-bg: #f5f9ff; }
.pf-s2 { --q-c1: #34d399; --q-c2: #059669; --q-glow: rgba(16,185,129,.26); --q-bg: #f3fcf8; }
.pf-s3 { --q-c1: #fbbf24; --q-c2: #d97706; --q-glow: rgba(245,158,11,.28); --q-bg: #fffbf3; }
.pf-s4 { --q-c1: #22d3ee; --q-c2: #0891b2; --q-glow: rgba(6,182,212,.26); --q-bg: #f3fbfd; }
.pf-s5 { --q-c1: #a78bfa; --q-c2: #7c3aed; --q-glow: rgba(139,92,246,.26); --q-bg: #f9f6ff; }
.pf-s6 { --q-c1: #fb7185; --q-c2: #e11d48; --q-glow: rgba(244,63,94,.24); --q-bg: #fff6f8; }
.pf-s7 { --q-c1: #facc15; --q-c2: #ca8a04; --q-glow: rgba(234,179,8,.28); --q-bg: #fffdf2; }
.pf-stat-wide {
    grid-column: 1 / -1; min-height: 74px; display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
}
.pf-stat-wide .pf-stat-ico { width: 38px; height: 38px; border-radius: 12px; margin: 0; flex: 0 0 38px; }
.pf-stat-wide .pf-stat-ico svg { width: 21px; height: 21px; }
.pf-stat-wide-txt { display: flex; flex-direction: column; }
.pf-stat-wide-txt b { display: inline; font-size: 28px; }
.pf-stat-wide-txt .pf-stat-label { margin-top: 3px; }
.pf-stat-wide small { margin: 0 0 0 auto; text-align: right; max-width: 42%; }

/* 账号与安全 */
.pf-actions { padding-bottom: 6px; }
.pf-action {
    display: flex; align-items: center; gap: 11px; padding: 11px 2px;
    border-bottom: 1px solid #f1f5f9; text-decoration: none;
}
.pf-action:last-child { border-bottom: none; }
.pf-action-ico {
    width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(30,64,140,.14);
}
.pf-action-ico svg { width: 19px; height: 19px; }
.pf-action-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-action-txt b { font-size: 13.5px; color: #26364b; }
.pf-action-txt small { font-size: 10.5px; color: #9aa8ba; }
.pf-action-go { margin-left: auto; font-style: normal; font-size: 22px; color: #c3ccda; line-height: 1; }

.pf-scope {
    margin: 0 0 16px; padding: 11px 13px; border-radius: 14px;
    background: #f6f8fc; border: 1px solid #e8eef8; font-size: 11.5px; color: #8593a7;
}
.pf-scope summary { cursor: pointer; color: #64748b; font-weight: 600; font-size: 12px; }
.pf-scope p { margin: 8px 0 0; line-height: 1.7; }

/* ============ 修改密码 ============ */
.pw-hero { text-align: center; padding: 14px 8px 18px; }
.pw-hero-ico {
    width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(140deg, #60a5fa, #6d28d9);
    box-shadow: 0 10px 24px rgba(79,70,229,.28);
}
.pw-hero-ico svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pw-hero b { font-size: 17px; color: #1e293b; }
.pw-hero p { margin: 7px 0 0; font-size: 12px; color: #8b99ac; line-height: 1.6; }
.pw-card {
    background: #fff; border-radius: 18px; padding: 16px 14px 18px; margin-bottom: 14px;
    border: 1px solid rgba(226,232,240,.95);
    box-shadow: 0 6px 18px rgba(30,64,140,.07), inset 0 1px 0 #fff;
}
.pw-field { margin-bottom: 14px; }
.pw-field label { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 7px; }
.pw-input {
    display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 10px;
    border-radius: 12px; background: #f7f9fd; border: 1px solid #e6ecf6;
    transition: border-color .2s, box-shadow .2s;
}
.pw-input:focus-within { border-color: #93b4fb; box-shadow: 0 0 0 3px rgba(59,130,246,.11); background: #fff; }
.pw-input svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: #94a3b8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: #26364b; }
.pw-input input::placeholder { color: #b3bfd0; }
.pw-eye { border: 0; background: transparent; color: #6d8ab8; font-size: 11.5px; padding: 4px 2px; cursor: pointer; flex: 0 0 auto; }
.pw-tip { font-size: 11px; color: #94a3b8; line-height: 1.6; margin: 2px 0 14px; }
.pw-submit {
    width: 100%; height: 46px; border: 0; border-radius: 13px; color: #fff;
    font-size: 15px; font-weight: 700; letter-spacing: 1px; cursor: pointer;
    background: linear-gradient(100deg, #3b82f6, #6366f1 55%, #7c3aed);
    box-shadow: 0 8px 18px rgba(79,70,229,.28);
}
.pw-submit:active { transform: translateY(1px); }

@media (max-width: 340px) {
    .es-h5-header-left, .es-h5-header-right { flex-basis: 66px; }
    .es-h5-header-profile svg { display: none; }
    .pf-hero { padding-left: 12px; padding-right: 12px; }
    .pf-row label { flex-basis: 60px; }
    .pf-val { font-size: 11.5px; }
    .pf-stat { padding: 10px 8px; min-height: 100px; }
    .pf-stat b { font-size: 22px; }
    .pf-stat small { font-size: 9px; }
    .pf-stat-wide small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .pf-hero-orb { animation: none; }
}

/* ============ 自动任务 · 检查项清单 / 已上报隐患详情 ============ */
.ck-task { position: relative; overflow: hidden; }
.ck-task::before {
    content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #2f6bff, #7c5cff 55%, #33c6b1);
}
.ck-task-top { display: flex; align-items: flex-start; gap: 8px; }
.ck-task-top h4 { flex: 1; margin: 2px 0 0; font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--h5-text); }
.ck-task-date { margin: 8px 0 0; font-size: 12px; color: var(--h5-text-sub); }
.ck-task-sum {
    display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 10px;
    border-top: 1px dashed var(--h5-line); font-size: 12px; color: var(--h5-text-sub);
}
.ck-task-sum span { display: flex; align-items: baseline; gap: 4px; }
.ck-task-sum b { font-size: 18px; font-weight: 800; color: var(--h5-primary); line-height: 1; }
.ck-task-sum i { width: 1px; height: 16px; background: var(--h5-line); }

.ck-bar {
    display: inline-block; width: 4px; height: 15px; border-radius: 3px; flex: 0 0 auto;
    background: linear-gradient(180deg, #3b7bff, #7c5cff);
    box-shadow: 0 2px 6px rgba(59, 123, 255, .35);
}
.ck-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.ck-head h5 { margin: 0; font-size: 14px; font-weight: 700; color: var(--h5-text); }
.ck-count {
    margin-left: auto; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600;
    color: var(--h5-primary); background: #eef4ff; border: 1px solid #dbe8ff;
}
.ck-row {
    padding: 9px 10px 9px 8px; margin-bottom: 7px;
    border: 1px solid var(--h5-line); border-left: 3px solid #dfe6ef;
    border-radius: 9px; background: #fff;
}
/* 检查项清单按作业单元分组：组头 + 组内行 */
.ck-group { margin-bottom: 12px; border: 1px solid var(--h5-line); border-radius: 11px; overflow: hidden; background: #fff; }
.ck-group:last-child { margin-bottom: 0; }
.ck-group-head {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 11px; background: linear-gradient(90deg, #f4f8ff 0%, #fafbff 100%);
    border-bottom: 1px solid var(--h5-line);
}
.ck-group-ico {
    flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--h5-primary); background: #e8f1ff; font-size: 11px;
}
.ck-group-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 800; color: var(--h5-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-group-count { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: #64748b; background: #eef2f8; border: 1px solid #e2e8f1; padding: 1px 8px; border-radius: 999px; }
.ck-group-body { padding: 9px 10px 3px; }
.ck-group-body .ck-row { margin-bottom: 7px; }
.ck-group-body .ck-row:last-child { margin-bottom: 3px; }
.ck-row-main { display: flex; align-items: flex-start; gap: 9px; }
.ck-row-main .ck-no { flex: 0 0 auto; margin-top: 1px; }
.ck-row-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--h5-text); }
.ck-row-title { margin-right: 4px; }
.ck-row-ops { display: flex; gap: 6px; margin: 8px 0 0 31px; }
.ck-op {
    flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px; font-size: 12px; font-weight: 600;
    text-decoration: none; color: var(--h5-primary); background: #f2f7ff;
    border: 1px solid #dbe8ff; transition: transform .12s ease, box-shadow .12s ease;
}
.ck-op:active { transform: scale(.97); }
.ck-op-red { color: #e05a52; background: #fff4f3; border-color: #ffdcd9; }
.ck-tip {
    margin: 10px 2px 18px; padding: 10px 12px; border-radius: 10px;
    background: #f6f9ff; border: 1px solid #e7efff;
    font-size: 12px; line-height: 1.65; color: #64748b;
}
.ck-tip strong { color: var(--h5-primary); font-weight: 700; }

.ck-section-head { display: flex; align-items: center; padding: 0 3px 10px; }
.ck-section-title { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; color: var(--h5-text); }
.ck-section-title .ck-count { margin-left: 2px; }
.ck-section-sub { margin-left: auto; font-size: 11px; color: #9aa8ba; }
.ck-empty {
    padding: 28px 18px; text-align: center; border-radius: 14px;
    background: linear-gradient(160deg, #fff, #f7faff); border: 1px dashed #d9e4f5;
}
.ck-empty-ico {
    width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff;
    background: linear-gradient(135deg, #5b8cff, #8a6bff); box-shadow: 0 6px 16px rgba(91, 140, 255, .3);
}
.ck-empty h4 { margin: 0 0 6px; font-size: 14px; color: var(--h5-text); }
.ck-empty p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--h5-text-sub); }

.ck-detail {
    background: var(--h5-card); border-radius: 14px; padding: 13px 13px 11px; margin-bottom: 11px;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 4px 14px rgba(30, 64, 140, .06), 0 1px 2px rgba(30, 64, 140, .04);
}
.ck-detail-top { display: flex; align-items: center; gap: 7px; }
.ck-no {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #4a7dff, #8163ff);
}
.ck-status { padding: 2px 8px; border-radius: 9px; font-size: 11px; font-weight: 600; }
.ck-status.warn { color: #c2701a; background: #fff5e7; border: 1px solid #ffe2b8; }
.ck-status.ok { color: #128a63; background: #eafaf3; border: 1px solid #c3efdd; }
.ck-time { margin-left: auto; font-size: 11px; color: #9aa8ba; }
.ck-desc { margin: 10px 0 6px; font-size: 14.5px; font-weight: 700; line-height: 1.5; color: var(--h5-text); word-break: break-all; }
.ck-meta { font-size: 12px; color: var(--h5-text-sub); line-height: 1.6; }
.ck-meta i { font-style: normal; margin: 0 4px; color: #cbd5e1; }
.ck-more { margin-top: 9px; border-radius: 9px; background: #f7f9fc; border: 1px solid #eef2f7; }
.ck-more summary { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--h5-primary); cursor: pointer; list-style: none; }
.ck-more summary::-webkit-details-marker { display: none; }
.ck-more summary::before { content: "＋ "; font-weight: 700; }
.ck-more[open] summary::before { content: "－ "; }
.ck-more[open] { padding-bottom: 6px; }
.ck-kv { padding: 4px 10px; }
.ck-kv span { display: block; font-size: 11px; color: #94a3b8; }
.ck-kv p { margin: 3px 0 2px; font-size: 12.5px; line-height: 1.6; color: #475569; word-break: break-all; }
.ck-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.ck-photo, .ck-video {
    width: 100%; height: 88px; object-fit: cover; border-radius: 9px;
    background: #eef2f7; border: 1px solid #e8edf4; display: block; cursor: zoom-in;
}
.ck-video { cursor: default; }
/* 现场录音：网格内嵌音频播放器，高度与图片磁贴对齐 */
.ck-photos .ck-audio {
    width: 100%; height: 88px; border-radius: 9px; background: #eef2f7;
    border: 1px solid #e8edf4; display: block; align-self: center;
}
.ck-photo-tip { margin-top: 7px; font-size: 11px; color: #9aa8ba; }
.ck-nophoto {
    margin-top: 10px; padding: 12px; border-radius: 9px; text-align: center;
    font-size: 12px; color: #a6b2c2; background: #f8fafc; border: 1px dashed #e2e8f0;
}
.ck-detail-ops { display: flex; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--h5-line); }
.ck-detail-ops .es-btn { flex: 1; text-align: center; }

.ck-lb {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9999; display: none;
    align-items: center; justify-content: center; flex-direction: column;
    background: rgba(9, 14, 26, .94); backdrop-filter: blur(6px);
}
.ck-lb.show { display: flex; }
.ck-lb img { max-width: 94vw; max-height: 72vh; object-fit: contain; border-radius: 8px; }
.ck-lb-close {
    position: absolute; top: 18px; right: 20px; width: 34px; height: 34px; line-height: 31px;
    text-align: center; border-radius: 50%; font-size: 24px; color: #fff;
    background: rgba(255,255,255,.14); cursor: pointer;
}
.ck-lb-bar { display: flex; align-items: center; gap: 26px; margin-top: 16px; color: #fff; font-size: 13px; }
.ck-lb-bar button {
    width: 36px; height: 32px; border: none; border-radius: 8px; font-size: 22px; color: #fff;
    background: rgba(255,255,255,.14); cursor: pointer;
}
@media (max-width: 340px) {
    .ck-row-ops { margin-left: 0; }
    .ck-op { font-size: 11px; }
    .ck-photo, .ck-video { height: 72px; }
    .ck-time { font-size: 10px; }
}

/* ============ 我的任务 · 查询筛选（风险级别 / 日期 / 状态） ============ */
.tk-filter {
    background: #fff; border-radius: 12px; padding: 12px 12px 10px;
    margin-bottom: 12px; box-shadow: 0 2px 10px rgba(28, 52, 96, .06);
}
.tk-filter-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
.tk-filter .es-field { margin-bottom: 9px; min-width: 0; }
.tk-filter .es-field label { font-size: 12px; margin-bottom: 4px; }
.tk-filter .es-field select,
.tk-filter .es-field input[type="date"] {
    padding: 8px 9px; font-size: 13px; border-radius: 8px;
    border: 1px solid var(--h5-line); background: #fbfcfe;
}
.tk-filter .es-field select:focus,
.tk-filter .es-field input[type="date"]:focus { border-color: var(--h5-primary); background: #fff; }
.tk-filter-btns { display: flex; gap: 8px; margin-top: 1px; }
.tk-filter-btns .es-btn { flex: 1; padding: 8px 0; font-size: 13px; }
.tk-result { font-size: 12px; color: var(--h5-text-sub); margin: -2px 2px 10px; }
.tk-result b { color: var(--h5-primary); font-size: 13px; }
@media (max-width: 340px) {
    .tk-filter-grid { grid-template-columns: 1fr; }
}

/* ============ 任务卡片：完成 / 未完成 颜色区分 ============ */
.tk-card { border-left: 4px solid transparent; transition: border-color .15s; }
.tk-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tk-card-head h4 { flex: 1; min-width: 0; }
/* 未完成：橙色强调，提示待处理 */
.tk-card-pending {
    border-left-color: var(--h5-warn);
    background: linear-gradient(180deg, #fffaf0, #ffffff 60%);
}
/* 已完成：绿色弱化，表明已闭环 */
.tk-card-done {
    border-left-color: var(--h5-success);
    background: linear-gradient(180deg, #f1fbf6, #ffffff 60%);
    box-shadow: 0 1px 4px rgba(47, 163, 86, .08);
}
.tk-card-done .es-badge-green { font-weight: 600; }
.tk-card-pending .es-badge-orange { font-weight: 600; }

/* ============ 检查项清单 · 每项隐患数 / 已检查颜色区分 ============ */
.ck-progress { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--h5-line); }
.ck-progress-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--h5-text-sub); }
.ck-progress-top b { font-size: 12.5px; font-weight: 700; color: #0e9f6e; }
.ck-progress-track { height: 7px; margin: 8px 0 9px; border-radius: 6px; background: #eef2f7; overflow: hidden; }
.ck-progress-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #12a875, #37c99c); }
.ck-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 11.5px; color: var(--h5-text-sub); }
.ck-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ck-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.ck-dot-done { background: #12a875; }
.ck-dot-todo { background: #dfe6ef; }
.ck-legend-warn {
    margin-left: auto; padding: 2px 7px; border-radius: 8px;
    color: #c2701a; background: #fff5e7; border: 1px solid #ffe2b8; font-weight: 600;
}
/* 检查项清单：已检查 / 未检查 两个独立分区 */
.ck-section { margin-top: 14px; }
.ck-section:first-child { margin-top: 6px; }
.ck-section-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 11px; margin-bottom: 9px; border-radius: 9px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .2px;
}
.ck-section-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11px; flex: 0 0 auto;
}
.ck-section-name { flex: 1 1 auto; }
.ck-section-count { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; opacity: .9; }
.ck-section-done .ck-section-bar { color: #0e8f63; background: #e9f8f1; border: 1px solid #cfeede; }
.ck-section-done .ck-section-ico { background: #12a875; }
.ck-section-todo .ck-section-bar { color: #b56b12; background: #fff5e8; border: 1px solid #ffe2b8; }
.ck-section-todo .ck-section-ico { background: #e79a27; }
.ck-section-empty { padding: 14px 0; font-size: 12px; }
.ck-section .ck-group { margin-top: 8px; }

.ck-filter { display: flex; gap: 7px; margin: 10px 0 4px; }
.ck-chip {
    flex: 1; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--h5-line);
    background: #f8fafc; color: var(--h5-text-sub); font-size: 12px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.ck-chip b { font-weight: 700; }
.ck-chip-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.ck-chip-done .ck-chip-dot { background: #12a875; }
.ck-chip-todo .ck-chip-dot { background: #e79a27; }
.ck-chip.active {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, #4a7dff, #6f63f5);
    box-shadow: 0 3px 8px rgba(74, 125, 255, .22);
}
.ck-chip.active .ck-chip-dot { background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.ck-chip-done.active { background: linear-gradient(135deg, #12a875, #0e9aa4); box-shadow: 0 3px 8px rgba(18, 168, 117, .22); }
.ck-chip-todo.active { background: linear-gradient(135deg, #e79a27, #d97706); box-shadow: 0 3px 8px rgba(217, 119, 6, .22); }
.ck-row-done {
    background: linear-gradient(90deg, #ecfaf3 0%, #f7fdfa 60%, #fff 100%);
    border-color: #d6f0e4; border-left-color: #12a875;
}
.ck-row-done .ck-no { background: linear-gradient(135deg, #12a875, #0e9aa4); }
.ck-row-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ck-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 6px; }
.ck-state { padding: 2px 8px; border-radius: 9px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.ck-state.ok { color: #0e8f63; background: #e6f8f0; border-color: #bdebd8; }
.ck-state.todo { color: #94a3b8; background: #f2f5f9; border-color: #e6ebf2; }
.ck-risk { font-size: 11.5px; color: #94a3b8; }
.ck-risk b { font-size: 12.5px; }
.ck-risk.has { color: #e05a52; font-weight: 600; }
.ck-risk.has b { font-size: 14px; font-weight: 800; }
.ck-no-match { padding: 18px 0; }
.ck-unmatched { display: block; margin-top: 6px; color: #c2701a; }
@media (max-width: 340px) {
    .ck-legend-warn { margin-left: 0; }
    .ck-chip { font-size: 11px; padding: 6px 2px; }
}

/* ============ 隐患详情 · 整改信息与「隐患图片 / 整改图片」分区 ============ */
.ri-media-block, .ck-media-block { margin-top: 10px; }
.ri-media-label, .ck-media-label {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; margin-bottom: 8px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; line-height: 1.5;
}
.ri-media-label b, .ck-media-label b { font-weight: 800; font-size: 12px; }
.ri-media-label.hazard, .ck-media-label.hazard { color: #d0483d; background: #fff1ef; border: 1px solid #ffd6d0; }
.ri-media-label.fix, .ck-media-label.fix { color: #0f8a55; background: #eafaf1; border: 1px solid #c2ecd5; }

.ri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ri-grid img, .ri-grid video {
    width: 100%; height: 82px; object-fit: cover; display: block;
    background: #eef2f7; border: 1px solid #e8edf4; border-radius: 8px;
}
.ri-grid .ri-audio {
    width: 100%; height: 82px; display: block; align-self: center;
    background: #eef2f7; border: 1px solid #e8edf4; border-radius: 8px;
}
.ri-grid img.ri-photo { cursor: zoom-in; }
.ri-grid.hazard img, .ri-grid.hazard video { border-color: #ffd6d0; }
.ri-grid.fix img, .ri-grid.fix video { border-color: #a9e3c4; }
.ck-photos.hazard .ck-photo, .ck-photos.hazard .ck-video { border-color: #ffd6d0; }
.ck-photos.fix .ck-photo, .ck-photos.fix .ck-video { border-color: #a9e3c4; }
.ri-media-tip { margin-top: 7px; font-size: 11px; color: #9aa8ba; }
.ri-empty-media {
    padding: 11px; border-radius: 8px; text-align: center; font-size: 11.5px;
    color: #a6b2c2; background: #f8fafc; border: 1px dashed #e2e8f0;
}

.ri-fix {
    margin-top: 11px; border: 1px solid #c2ecd5; border-radius: 10px;
    background: linear-gradient(180deg, #f0fbf5 0%, #fff 100%); overflow: hidden;
}
.ri-fix > summary {
    display: flex; align-items: center; gap: 7px; padding: 9px 11px;
    font-size: 12.5px; font-weight: 700; color: #0f8a55;
    cursor: pointer; list-style: none;
}
.ri-fix > summary::-webkit-details-marker { display: none; }
.ri-fix-ico {
    width: 17px; height: 17px; line-height: 17px; text-align: center;
    border-radius: 50%; background: #16a86a; color: #fff; font-size: 11px;
}
.ri-fix-title { flex: 1; }
.ri-fix-badge {
    padding: 2px 8px; border-radius: 9px; font-size: 10.5px; font-weight: 600;
    color: #0f8a55; background: #e3f7ec; border: 1px solid #c2ecd5;
}
.ri-fix-toggle { font-size: 11px; font-weight: 500; color: #7cae96; }
.ri-fix-toggle::after { content: "收起 ▲"; }
.ri-fix:not([open]) .ri-fix-toggle::after { content: "展开 ▼"; }
.ri-fix-body { padding: 2px 11px 11px; border-top: 1px dashed #d5efe1; }
.ri-kv { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #e6f2eb; }
.ri-kv:last-of-type { border-bottom: none; }
.ri-kv span { flex: 0 0 58px; font-size: 11.5px; color: #8aa79a; padding-top: 1px; }
.ri-kv p { flex: 1; margin: 0; font-size: 12.5px; line-height: 1.6; color: #334155; word-break: break-all; }
.ri-lb-caption {
    margin-top: 10px; padding: 3px 12px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; color: #fff;
}
.ri-lb-caption.hazard { background: rgba(224, 90, 82, .9); }
.ri-lb-caption.fix { background: rgba(18, 168, 117, .9); }
@media (max-width: 340px) {
    .ri-grid img, .ri-grid video { height: 70px; }
    .ri-kv span { flex-basis: 52px; }
}

/* ============ 编辑隐患 · 已有图片展示 / 可移除缩略图 ============ */
.ed-summary-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ed-summary-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--h5-text); }
.ed-summary-tip {
    margin-top: 9px; padding: 7px 9px; border-radius: 8px;
    font-size: 11px; line-height: 1.6; color: #8a98aa; background: #f7f9fc;
}
.ed-media-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 9px;
}
.ed-media-label {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; line-height: 1.5;
}
.ed-media-label b { font-weight: 800; font-size: 12px; }
.ed-media-label.hazard { color: #d0483d; background: #fff1ef; border: 1px solid #ffd6d0; }
.ed-media-label.fix { color: #0f8a55; background: #eafaf1; border: 1px solid #c2ecd5; }
.ed-media-hint { font-size: 10.5px; color: #9aa8ba; }
.ed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ed-thumb {
    position: relative; overflow: hidden; border-radius: 9px;
    background: #eef2f7; border: 1px solid #e8edf4;
}
.ed-media-card.hazard .ed-thumb { border-color: #ffd6d0; }
.ed-media-card.fix .ed-thumb { border-color: #a9e3c4; }
.ed-grid img, .ed-grid video, .ed-file {
    width: 100%; height: 84px; object-fit: cover; display: block;
}
.ed-grid .ri-audio {
    width: 100%; height: 84px; display: block; align-self: center;
}
.ed-grid img.ed-photo { cursor: zoom-in; }
.ed-file {
    display: flex; align-items: center; justify-content: center;
    padding: 6px; font-size: 10.5px; color: #8a98aa; text-align: center;
    word-break: break-all; box-sizing: border-box;
}
.ed-rm { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; cursor: pointer; }
.ed-rm input { position: absolute; opacity: 0; width: 0; height: 0; }
.ed-rm span {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(30, 41, 59, .62); color: #fff; font-size: 15px;
    line-height: 1; border: 1px solid rgba(255, 255, 255, .75); box-sizing: border-box;
}
.ed-rm input:checked + span { background: #e05a52; border-color: #fff; }
.ed-thumb.removed img, .ed-thumb.removed video, .ed-thumb.removed .ed-file {
    opacity: .35; filter: grayscale(1);
}
.ed-thumb.removed::after {
    content: "待移除"; position: absolute; left: 0; right: 0; bottom: 0;
    padding: 2px 0; text-align: center; font-size: 10.5px; color: #fff;
    background: rgba(224, 90, 82, .9);
}
.ed-media-tip { margin-top: 8px; font-size: 11px; line-height: 1.6; color: #9aa8ba; }
.ed-empty {
    padding: 13px; border-radius: 8px; text-align: center; font-size: 11.5px;
    color: #a6b2c2; background: #f8fafc; border: 1px dashed #e2e8f0;
}
.ed-field-tip { margin-top: 5px; font-size: 10.5px; line-height: 1.6; color: #9aa8ba; }
@media (max-width: 340px) {
    .ed-grid img, .ed-grid video, .ed-file { height: 70px; }
    .ed-media-hint { font-size: 10px; }
}


/* ============================================================
   考试答题卡（Exam/Take 与 Exam/Result 共用）
   右上悬浮按钮 position:fixed —— 不随页面上下滚动；默认收起，点击展开浮层网格
   ============================================================ */
.es-exam-fab {
    position: fixed;
    right: 12px;
    top: calc(56px + 18vh);
    z-index: 60;
    display: flex; align-items: center; gap: 6px;
    padding: 11px 15px;
    border: none; border-radius: 999px;
    background: linear-gradient(135deg, #2f6bff, #5a8cff);
    color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .02em;
    box-shadow: 0 6px 18px rgba(47, 107, 255, .35);
    cursor: pointer; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.es-exam-fab b { font-weight: 800; }
.es-exam-fab:active { transform: scale(.96); }
/* 悬浮答题卡面板：默认收起，点击按钮在按钮下方展开 */
.es-exam-pop {
    position: fixed;
    right: 12px;
    top: calc(104px + 18vh);
    z-index: 70;
    width: min(300px, calc(100vw - 24px));
    max-height: 52vh; overflow-y: auto;
    background: var(--h5-card);
    border-radius: 14px;
    box-shadow: 0 10px 34px rgba(31, 47, 70, .24);
    padding: 12px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.es-exam-pop.open { opacity: 1; visibility: visible; transform: none; }
.es-exam-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.es-exam-sheet-head h4 { margin: 0; font-size: 14.5px; color: var(--h5-text); }
.es-exam-sheet-head h4 b { color: var(--h5-primary); }
.es-exam-sheet-close {
    border: none; background: #f2f4f8; color: var(--h5-text-sub);
    width: 26px; height: 26px; border-radius: 50%;
    font-size: 12px; line-height: 1; cursor: pointer;
}
.es-exam-legend {
    display: flex; flex-wrap: wrap; gap: 14px;
    margin-bottom: 10px; font-size: 11.5px; color: var(--h5-text-sub);
}
.es-exam-legend i {
    display: inline-block; width: 12px; height: 12px; border-radius: 4px;
    margin-right: 4px; vertical-align: -1px; background: #f2f5f9;
    border: 1px solid var(--h5-line);
}
.es-exam-legend i.lg-done { background: var(--h5-primary); border-color: var(--h5-primary); }
.es-exam-legend i.lg-ok { background: var(--h5-success); border-color: var(--h5-success); }
.es-exam-legend i.lg-bad { background: var(--h5-danger); border-color: var(--h5-danger); }
.es-exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 8px; }
.es-exam-grid a {
    display: flex; align-items: center; justify-content: center;
    height: 38px; border-radius: 9px;
    font-size: 13px; font-weight: 600; text-decoration: none;
    color: var(--h5-text-sub); background: #f2f5f9; border: 1px solid var(--h5-line);
    -webkit-tap-highlight-color: transparent;
}
.es-exam-grid a.done { color: #fff; background: var(--h5-primary); border-color: var(--h5-primary); }
.es-exam-grid a.ok { color: #fff; background: var(--h5-success); border-color: var(--h5-success); }
.es-exam-grid a.bad { color: #fff; background: var(--h5-danger); border-color: var(--h5-danger); }
/* 点题号定位后题目卡片闪烁提示 */
.es-q-flash { outline: 2px solid var(--h5-primary); outline-offset: 2px; }

/* ============================================================
   人脸在岗检测（Lesson/Learn 视频观看，与 Web Learn 同款）
   + 人脸录入设置页（Account/FaceSetup）
   ============================================================ */
.es-video-box { position: relative; }
/* 右上角摄像头监控小窗（位置固定于视频盒内，不随内容滚动脱离） */
#esFacePreview {
    position: absolute; right: 10px; top: 10px;
    width: 108px; height: 82px;
    border-radius: 8px; overflow: hidden;
    background: #111; z-index: 20;
    border: 2px solid rgba(255, 255, 255, .35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}
#esFacePreview video { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
/* 监控状态文字（小窗下方） */
.es-face-status {
    position: absolute; right: 10px; top: 96px;
    z-index: 20; max-width: 46%;
    font-size: 10px; line-height: 1.4; color: #fff;
    background: rgba(17, 24, 39, .66);
    border-radius: 6px; padding: 4px 7px;
    pointer-events: none;
}
/* 离岗/闭眼/身份不符遮罩：盖住视频，恢复后隐藏 */
#esFaceMask {
    display: none;
    position: absolute; left: 0; top: 0; right: 0; bottom: 0;
    z-index: 9;
    background: rgba(10, 12, 18, .62);
    flex-direction: column; align-items: center; justify-content: center;
    color: #fff; text-align: center; padding: 16px;
}
#esFaceMaskText { font-size: 15px; margin-bottom: 6px; line-height: 1.5; max-width: 82%; }
#esFaceMaskExtra { font-size: 11.5px; opacity: .82; line-height: 1.6; max-width: 82%; }
#esFaceSetupLink { display: none; margin-top: 12px; font-size: 12.5px; color: #8ecbff; text-decoration: underline; }

/* ---- 人脸录入设置页 ---- */
.es-face-video-wrap {
    position: relative;
    width: 100%; max-width: 420px;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
    background: #0c1220;
    border-radius: 12px; overflow: hidden;
}
.es-face-video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 虚线椭圆取景框 */
.es-face-video-wrap::after {
    content: '';
    position: absolute; left: 50%; top: 50%;
    width: 46%; height: 66%;
    transform: translate(-50%, -50%);
    border: 2px dashed rgba(120, 170, 255, .75);
    border-radius: 50%;
    pointer-events: none;
}
.es-face-video-wrap .es-face-mask {
    position: absolute; left: 0; top: 0; right: 0; bottom: 0;
    z-index: 5; display: none;
    flex-direction: column; align-items: center; justify-content: center;
    background: rgba(10, 12, 18, .55); color: #fff;
    font-size: 13px; text-align: center; padding: 12px;
}
.es-face-state {
    margin-top: 12px; font-size: 13px; color: var(--h5-text-sub);
    background: #f4f6fa; border-radius: 8px; padding: 9px 12px;
}
.es-face-state-ok { background: #eefaf2; color: var(--h5-success); }
.es-face-remove { color: var(--h5-danger) !important; background: #fff !important; border: 1px solid var(--h5-danger) !important; }

/* ============ AI 助手页（/AiApp） ============ */
.es-ai-hero {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, #19b5c8 0%, #1f6fd6 55%, #7b5ce0 100%);
    border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
    color: #fff; box-shadow: 0 6px 18px rgba(31, 111, 214, .25);
}
.es-ai-hero-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
    background: rgba(255, 255, 255, .18); border: 1.5px solid rgba(255, 255, 255, .55);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 12px rgba(255, 255, 255, .22);
}
.es-ai-hero-avatar svg { width: 26px; height: 26px; }
.es-ai-hero-main { flex: 1; min-width: 0; }
.es-ai-hero-title { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.es-ai-hero-sub { font-size: 12px; opacity: .88; margin-top: 2px; }
.es-ai-hero-new {
    flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .16);
    color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600;
    cursor: pointer; backdrop-filter: blur(4px);
}
.es-ai-hero-new:active { background: rgba(255, 255, 255, .3); }

.es-ai-chat {
    background: var(--h5-card); border-radius: 14px; padding: 14px 12px;
    min-height: 300px; max-height: calc(100vh - 372px); max-height: calc(100dvh - 372px); overflow-y: auto;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
    overscroll-behavior: contain;
}
.es-ai-row { display: flex; gap: 8px; margin-bottom: 4px; }
.es-ai-row.user { justify-content: flex-end; }
.es-ai-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; margin-top: 2px;
    background: linear-gradient(135deg, #19b5c8, #1f6fd6 60%, #7b5ce0);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(31, 111, 214, .3);
}
.es-ai-avatar svg { width: 20px; height: 20px; }
.es-ai-main { max-width: calc(100% - 44px); min-width: 0; }
.es-ai-row.user .es-ai-main { max-width: 86%; display: flex; flex-direction: column; align-items: flex-end; }
.es-ai-bubble {
    padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.7;
    word-break: break-word; white-space: pre-wrap;
}
.es-ai-row.ai .es-ai-bubble {
    background: #f6f8fb; border: 1px solid #edf1f6; color: #1e293b;
    border-top-left-radius: 4px;
}
.es-ai-row.user .es-ai-bubble {
    background: linear-gradient(135deg, #2f7fe0, #1f6fd6);
    color: #fff; border-top-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(31, 111, 214, .22);
}
/* 气泡内轻量 Markdown 排版 */
.es-ai-bubble strong { font-weight: 700; }
.es-ai-bubble em { font-style: normal; color: var(--h5-primary); font-weight: 600; }
.es-ai-bubble ul { margin: 6px 0; padding-left: 18px; }
.es-ai-bubble li { margin: 2px 0; }
.es-ai-bubble .es-md-h { font-weight: 700; font-size: 15px; margin: 8px 0 2px; color: #0f172a; }
.es-ai-bubble code {
    background: #e9eef5; border-radius: 4px; padding: 1px 5px;
    font-size: 12.5px; font-family: Consolas, Menlo, monospace;
}
/* 打字点动画 */
.es-ai-typing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.es-ai-typing i {
    width: 6px; height: 6px; border-radius: 50%; background: #94a3b8;
    animation: esAiTyping 1.2s infinite ease-in-out;
}
.es-ai-typing i:nth-child(2) { animation-delay: .15s; }
.es-ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes esAiTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30% { transform: translateY(-4px); opacity: 1; }
}
/* 来源标注行 */
.es-ai-meta {
    font-size: 11px; color: #64748b; margin: 4px 0 8px; padding-left: 2px;
    display: flex; align-items: center; gap: 4px;
}
.es-ai-meta .ic { color: var(--h5-primary); }
/* AI 回答下的反馈条与气泡左缘对齐（跟随头像列） */
.es-ai-row.ai .es-ai-fb { margin-left: 2px; }
/* 空会话欢迎态 */
.es-ai-empty { text-align: center; padding: 26px 10px 14px; color: var(--h5-text-sub); }
.es-ai-empty-ic {
    width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(25, 181, 200, .12), rgba(123, 92, 224, .12));
    display: flex; align-items: center; justify-content: center;
}
.es-ai-empty-ic svg { width: 32px; height: 32px; }
.es-ai-empty-t { font-size: 15px; font-weight: 600; color: var(--h5-text); margin-bottom: 4px; }
.es-ai-empty-s { font-size: 12.5px; }
.es-ai-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.es-ai-chip {
    border: 1px solid #dbe7f5; background: #f3f8ff; color: #1f5fb8;
    border-radius: 999px; padding: 7px 13px; font-size: 12.5px; cursor: pointer;
}
.es-ai-chip:active { background: #e6f0ff; }
/* 底部输入条 */
.es-ai-inputbar {
    display: flex; align-items: flex-end; gap: 8px; margin-top: 10px;
    background: var(--h5-card); border-radius: 999px; padding: 7px 8px 7px 14px;
    border: 1px solid var(--h5-line); box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
}
.es-ai-inputbar textarea {
    flex: 1; border: none; outline: none; resize: none; background: transparent;
    font-size: 14.5px; line-height: 1.5; padding: 6px 0; max-height: 96px;
    font-family: inherit; color: var(--h5-text);
}
.es-ai-inputbar textarea::placeholder { color: #a8b3c2; }
.es-ai-send {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #19b5c8, #1f6fd6 60%, #7b5ce0);
    color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 10px rgba(31, 111, 214, .35); cursor: pointer;
}
.es-ai-send:disabled { opacity: .55; }
.es-ai-send svg { width: 18px; height: 18px; }

/* ============ 文件上传控件美化（es-upload）：自动包裹 input[type=file] ============ */
.es-upload-native {
    position: absolute; width: 1px; height: 1px; opacity: 0;
    margin: 0; padding: 0; border: 0; overflow: hidden;
}
.es-upload {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 15px; margin: 6px 0 2px;
    border: 1.6px dashed #bcd3f5; border-radius: 12px;
    background: linear-gradient(160deg, #f6faff, #fdfbff);
    cursor: pointer; transition: all .15s ease; position: relative;
    user-select: none;
}
.es-upload:hover, .es-upload:active { border-color: #3b7bff; background: #f0f6ff; }
.es-upload:active { transform: scale(.99); }
.es-upload-ico {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: linear-gradient(135deg, #19b5c8, #1f6fd6 60%, #7b5ce0);
    box-shadow: 0 3px 10px rgba(31, 111, 214, .3);
}
.es-upload-ico svg { width: 24px; height: 24px; }
.es-upload-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.es-upload-t { font-size: 14px; font-weight: 600; color: var(--h5-text); }
.es-upload-sub { font-size: 12px; color: var(--h5-text-sub); }
.es-upload-badge {
    flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #12a875, #37c99c);
    box-shadow: 0 2px 8px rgba(18, 168, 117, .3);
}
.es-upload.has-files { border-style: solid; border-color: #bdebd8; background: #f2fbf7; }
.es-upload.has-files .es-upload-t { color: #0e8f63; }

/* ==================================================================
   全站「首页风格」统一皮肤（HOME STYLE KIT）
   设计语言与首页一致：蓝→靛→紫渐变、网格/光晕、玻璃拟态、
   18px 大圆角卡片、分层柔光阴影、彩色渐变按钮与徽标、分区标题光条。
   说明：
   1) 只覆盖共享 es-* 组件，页面专属样式（tk-/ck-/pf-/lg-/ai- 等）保持原样；
   2) 不用 !important，页面内更具体的规则（如 .tk-filter .es-field）仍然优先生效；
   3) 卡片只改圆角/阴影，避免覆盖 .tk-card 的 4px 状态边与橙/绿状态底色；
   4) 登录页/首页及自带 hero 的页面由 _H5Layout 决定是否注入通用页头。
   ================================================================== */
:root {
    --h5-grad: linear-gradient(125deg, #2068d8 0%, #3b5bdb 48%, #673ab7 100%);
    --h5-grad-btn: linear-gradient(135deg, #2b7df0, #4f46e5);
    --h5-grad-soft: linear-gradient(120deg, #eef5ff, #f6f2ff);
    --h5-radius-lg: 18px;
    --h5-shadow-card: 0 8px 22px rgba(30, 64, 140, .08), 0 1px 2px rgba(30, 64, 140, .05), inset 0 1px 0 #fff;
    --h5-shadow-glow: 0 8px 18px rgba(59, 91, 219, .22);
}

/* ---------- 全局底色：极淡的青/紫极光，呼应首页 hero ---------- */
body.es-h5:not(.es-login-page) {
    background:
        radial-gradient(75% 38% at 100% 0%, rgba(56, 189, 248, .10), transparent 70%),
        radial-gradient(65% 34% at 0% 16%, rgba(139, 92, 246, .08), transparent 72%),
        var(--h5-bg);
    background-attachment: fixed;
}

/* ---------- 顶栏：与首页 hero 同款渐变 + 网格 + 光晕 ---------- */
body.es-h5:not(.es-login-page) .es-h5-header {
    overflow: hidden;
    background:
        radial-gradient(90% 160% at 92% -80%, rgba(56, 189, 248, .55), transparent 62%),
        radial-gradient(80% 150% at 0% 160%, rgba(139, 92, 246, .45), transparent 62%),
        var(--h5-grad);
    box-shadow: 0 6px 20px rgba(37, 72, 160, .24);
}
body.es-h5:not(.es-login-page) .es-h5-header::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 92%);
    mask-image: linear-gradient(180deg, #000, transparent 92%);
}
body.es-h5:not(.es-login-page) .es-h5-header::after {
    content: ""; position: absolute; right: -26px; top: -62px;
    width: 150px; height: 150px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(125, 211, 252, .38), transparent 68%);
    filter: blur(4px);
}
body.es-h5:not(.es-login-page) .es-h5-header > * { position: relative; z-index: 1; }
body.es-h5:not(.es-login-page) .es-h5-title {
    letter-spacing: .5px; text-shadow: 0 1px 6px rgba(0, 20, 80, .25);
}
body.es-h5:not(.es-login-page) .es-h5-back {
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .26);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
body.es-h5:not(.es-login-page) .es-h5-header-avatar {
    background: rgba(255, 255, 255, .2);
    box-shadow: 0 3px 12px rgba(10, 30, 90, .22), inset 0 1px 0 rgba(255, 255, 255, .4);
}
body.es-h5:not(.es-login-page) .es-h5-header-link {
    padding: 4px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
}

/* ---------- 通用沉浸式页头（_H5Layout 注入） ---------- */
.es-h5-page-hero {
    position: relative; overflow: hidden;
    margin: -12px -12px 16px; padding: 14px 16px 15px;
    border-radius: 0 0 24px 24px; color: #fff;
    background:
        radial-gradient(100% 130% at 92% -30%, rgba(56, 189, 248, .48), transparent 60%),
        radial-gradient(80% 140% at 0% 150%, rgba(139, 92, 246, .42), transparent 62%),
        var(--h5-grad);
    box-shadow: 0 10px 26px rgba(37, 72, 160, .20);
}
.es-h5-page-hero::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 88%);
    mask-image: linear-gradient(180deg, #000, transparent 88%);
}
.es-h5-page-hero-orb {
    position: absolute; right: -40px; top: -66px; width: 170px; height: 170px; border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 211, 252, .38), transparent 68%);
    filter: blur(6px); pointer-events: none; animation: hmFloat 7s ease-in-out infinite alternate;
}
.es-h5-page-hero-ring {
    position: absolute; right: -30px; top: -54px; width: 144px; height: 144px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 0 0 18px rgba(255, 255, 255, .04), 0 0 0 38px rgba(255, 255, 255, .03);
    pointer-events: none;
}
.es-h5-page-hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.es-h5-page-hero-ico {
    width: 42px; height: 42px; flex: 0 0 42px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .12));
    border: 1px solid rgba(255, 255, 255, .32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 16px rgba(10, 30, 90, .18);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.es-h5-page-hero-ico svg {
    width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}
.es-h5-page-hero-txt { flex: 1; min-width: 0; }
.es-h5-page-hero-txt em { font-style: normal; font-size: 9px; letter-spacing: 1.6px; color: rgba(190, 215, 255, .82); }
.es-h5-page-hero-txt b { display: block; margin-top: 2px; font-size: 15.5px; font-weight: 700; letter-spacing: .5px; }
.es-h5-page-hero-txt small { display: block; margin-top: 2px; font-size: 10.5px; color: rgba(255, 255, 255, .72); }
.es-h5-page-hero-tag {
    flex: 0 0 auto; font-size: 9px; letter-spacing: 1px; white-space: nowrap;
    padding: 4px 9px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .1);
}

/* ---------- 分区标题：与首页 .hm-block-head 同款光条 ---------- */
body.es-h5 .es-page-title {
    position: relative; padding-left: 12px; margin: 2px 2px 12px;
    font-size: 16px; font-weight: 700; color: #1e293b; letter-spacing: .4px;
}
body.es-h5 .es-page-title::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 16px; border-radius: 3px;
    background: linear-gradient(180deg, #38bdf8, #6366f1);
    box-shadow: 0 0 8px rgba(56, 189, 248, .5);
}
body.es-h5 .es-page-title .sub { font-size: 11px; font-weight: 500; color: #94a3b8; }
body.es-h5 .es-page-title-link {
    padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
    color: #2563eb; background: var(--h5-grad-soft); border: 1px solid #dfe9fb;
}
body.es-h5 .es-card-title {
    position: relative; padding-left: 12px; margin-bottom: 12px;
    font-size: 15.5px; color: #1e293b; letter-spacing: .3px;
}
body.es-h5 .es-card-title::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 14px; border-radius: 3px;
    background: linear-gradient(180deg, #38bdf8, #6366f1);
}
body.es-h5 .es-card-title .sub { color: #94a3b8; }

/* ---------- 卡片 / 列表 / 统计：18px 圆角 + 分层柔光 ---------- */
body.es-h5 .es-card,
body.es-h5 .es-item,
body.es-h5 .es-stat,
body.es-h5 .es-course-card,
body.es-h5 .es-video-card {
    border-radius: var(--h5-radius-lg);
    box-shadow: var(--h5-shadow-card);
    transition: transform .18s ease, box-shadow .18s ease;
}
body.es-h5 [class="es-card"] { background-image: linear-gradient(170deg, #fff 0%, #fbfdff 100%); }
body.es-h5 .es-item { padding: 13px 15px; }
body.es-h5 .es-item:active { transform: scale(.99); }
body.es-h5 .es-item .arrow { color: #a9b6c8; }
body.es-h5 .es-stat { position: relative; overflow: hidden; padding: 14px 4px 12px; }
body.es-h5 .es-stat::before {
    content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
    width: 44px; height: 3px; border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #38bdf8, #6366f1);
}
body.es-h5 .es-stat b {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.es-h5 .es-stat span { color: #8a94a3; }

/* ---------- 徽标：胶囊 + 渐变淡彩 ---------- */
body.es-h5 .es-badge {
    border-radius: 999px; padding: 3px 9px; font-weight: 600;
    border: 1px solid transparent;
}
body.es-h5 .es-badge-blue { background: linear-gradient(135deg, #e8f1ff, #eef5ff); color: #1d4ed8; border-color: #d6e6ff; }
body.es-h5 .es-badge-red { background: linear-gradient(135deg, #fff0ee, #ffe9e6); color: #d33f35; border-color: #fbd5d0; }
body.es-h5 .es-badge-green { background: linear-gradient(135deg, #e9f9f0, #e4f7ec); color: #12824c; border-color: #c9ecd8; }
body.es-h5 .es-badge-orange { background: linear-gradient(135deg, #fff5e3, #ffefd6); color: #b76a06; border-color: #fae1b8; }
body.es-h5 .es-badge-gray { background: linear-gradient(135deg, #f1f4f9, #eef2f8); color: #7c8797; border-color: #e3e9f2; }

/* ---------- 按钮：渐变 + 发光 + 按压反馈 ---------- */
body.es-h5 .es-btn {
    border-radius: 12px; font-weight: 600;
    background: var(--h5-grad-btn);
    box-shadow: var(--h5-shadow-glow);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
body.es-h5 .es-btn:active { transform: scale(.97); opacity: .92; }
body.es-h5 .es-btn-outline {
    background: linear-gradient(135deg, #fff, #f5f9ff);
    color: #2b62c9; border: 1px solid #b9d2fb;
    box-shadow: 0 3px 10px rgba(31, 111, 214, .10);
}
body.es-h5 .es-btn-danger { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 8px 18px rgba(225, 29, 72, .22); }
body.es-h5 .es-btn-danger-outline { background: #fff; border: 1px solid #f7b4b0; color: #dc3f35; box-shadow: none; }
body.es-h5 .es-btn-warn { background: linear-gradient(135deg, #fbbf24, #ea580c); box-shadow: 0 8px 18px rgba(234, 88, 12, .22); }
body.es-h5 .es-btn-sm { border-radius: 999px; }

/* ---------- 分段 / 分类条 / 搜索：玻璃胶囊 ---------- */
body.es-h5 .es-seg {
    border-radius: 14px; padding: 4px;
    background: linear-gradient(135deg, #eaf1fb, #f1edfb);
    border: 1px solid rgba(226, 232, 240, .9);
}
body.es-h5 .es-seg a { border-radius: 11px; font-size: 13.5px; }
body.es-h5 .es-seg a.on {
    background: var(--h5-grad-btn); color: #fff;
    box-shadow: 0 4px 12px rgba(59, 91, 219, .28);
}
body.es-h5 .es-cat-bar a {
    border-radius: 999px; border: 1px solid #e4ecf8;
    background: linear-gradient(135deg, #fff, #f8fbff);
    box-shadow: 0 2px 8px rgba(30, 64, 140, .05);
}
body.es-h5 .es-cat-bar a.on {
    background: var(--h5-grad-btn); border-color: transparent; color: #fff;
    box-shadow: 0 5px 14px rgba(59, 91, 219, .28);
}
body.es-h5 .es-search input {
    border-radius: 999px; border: 1px solid #e2eaf6; padding-left: 16px;
    box-shadow: 0 3px 10px rgba(30, 64, 140, .05), inset 0 1px 2px rgba(30, 64, 140, .03);
    background-image: linear-gradient(180deg, #fff, #fbfcff);
}
body.es-h5 .es-search input:focus {
    border-color: #93b4fb; outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
body.es-h5 .es-search button {
    border-radius: 999px; font-weight: 600;
    background: var(--h5-grad-btn); box-shadow: var(--h5-shadow-glow);
}

/* ---------- 表单：12px 圆角 + 聚焦光环 ---------- */
body.es-h5 .es-field label { font-weight: 600; color: #64748b; }
body.es-h5 .es-field input[type="text"],
body.es-h5 .es-field input[type="password"],
body.es-h5 .es-field input[type="date"],
body.es-h5 .es-field input[type="datetime-local"],
body.es-h5 .es-field select,
body.es-h5 .es-field textarea {
    border-radius: 12px; border: 1px solid #e2eaf6;
    background-image: linear-gradient(180deg, #fff, #fbfcff);
    box-shadow: inset 0 1px 2px rgba(30, 64, 140, .03);
    transition: border-color .2s ease, box-shadow .2s ease;
}
body.es-h5 .es-field input:focus,
body.es-h5 .es-field select:focus,
body.es-h5 .es-field textarea:focus {
    border-color: #93b4fb; outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
body.es-h5 .es-validation { font-weight: 600; }

/* ---------- 键值行 / 表格 / 空态 / 分页 ---------- */
body.es-h5 .es-kv { padding: 9px 0; border-bottom: 1px solid #f0f3f8; }
body.es-h5 .es-kv .k { color: #94a3b8; }
body.es-h5 .es-table-wrap {
    border-radius: 14px; border: 1px solid #eef2f8;
    box-shadow: 0 4px 14px rgba(30, 64, 140, .06);
}
body.es-h5 .es-table th {
    background: linear-gradient(135deg, #f2f7ff, #f7f3ff);
    color: #475569; border-bottom: 1px solid #e5ecf8;
}
body.es-h5 .es-empty { padding: 40px 16px 46px; color: #94a3b8; }
body.es-h5 .es-empty::before {
    content: ""; display: block; width: 62px; height: 62px; margin: 0 auto 14px;
    border-radius: 22px;
    background: linear-gradient(140deg, #e8f1ff, #f3e8ff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5h18v11H3z'/%3E%3Cpath d='M3 7.5 6 4h12l3 3.5'/%3E%3Cpath d='M9 12h6'/%3E%3C/svg%3E") center / 30px no-repeat;
    box-shadow: 0 8px 18px rgba(30, 64, 140, .08), inset 0 1px 0 #fff;
}
body.es-h5 .es-pager a {
    padding: 5px 14px; border-radius: 999px;
    background: #fff; border: 1px solid #dbe7fb;
    box-shadow: 0 2px 8px rgba(30, 64, 140, .06);
}
body.es-h5 .es-pager span { color: #64748b; }
body.es-h5 .es-h5-toast { border-radius: 14px; box-shadow: 0 6px 16px rgba(30, 64, 140, .08); }

/* ---------- 课程 / 视频卡片、进度条、预览格 ---------- */
body.es-h5 .es-course-card,
body.es-h5 .es-video-card { overflow: hidden; }
body.es-h5 .es-course-cover,
body.es-h5 .es-video-cover { background: linear-gradient(140deg, #dbeafe, #ede9fe); }
body.es-h5 .es-video-cover { border-radius: 12px; }
body.es-h5 .es-progress { height: 6px; border-radius: 6px; }
body.es-h5 .es-progress i { background: linear-gradient(90deg, #38bdf8, #6366f1); }
body.es-h5 .es-preview-cell { border-radius: 14px; }
body.es-h5 .es-comment { border-bottom: 1px solid #f0f3f8; }
body.es-h5 .es-ai-fb button { border-radius: 999px; }
body.es-h5 .es-fb-sheet { border-radius: 22px 22px 0 0; }

/* ---------- 底部 Tab：与首页渐变色系统一 ---------- */
body.es-h5 .es-h5-tabbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 243, 255, .98));
}

/* ---------- 页面专属容器：补齐到同一套圆角/光色体系 ---------- */
body.es-h5 .tk-filter,
body.es-h5 .es-ai-chat,
body.es-h5 .es-upload { border-radius: var(--h5-radius-lg); }
body.es-h5 .tk-filter {
    background-image: linear-gradient(170deg, #fff, #fbfdff);
    box-shadow: var(--h5-shadow-card);
}
body.es-h5 .es-ai-chat { box-shadow: var(--h5-shadow-card); }
body.es-h5 .es-ai-hero {
    border-radius: var(--h5-radius-lg);
    background:
        radial-gradient(90% 140% at 96% -30%, rgba(56, 189, 248, .45), transparent 60%),
        var(--h5-grad);
    box-shadow: 0 10px 24px rgba(37, 72, 160, .20);
}
body.es-h5 .es-ai-hero-new {
    background: rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* ---------- 登录页：深色底渐变换成首页同色系的深蓝→靛→紫 ---------- */
body.es-h5.es-login-page {
    background:
        radial-gradient(90% 55% at 82% 6%, rgba(56, 189, 248, .30), transparent 60%),
        radial-gradient(80% 50% at 8% 32%, rgba(124, 58, 237, .28), transparent 65%),
        radial-gradient(100% 60% at 50% 100%, rgba(37, 99, 235, .22), transparent 70%),
        linear-gradient(155deg, #102c72 0%, #2b2f86 48%, #4a247f 100%);
}

/* ---------- 小屏与减弱动效 ---------- */
@media (max-width: 340px) {
    .es-h5-page-hero-tag { display: none; }
    .es-h5-page-hero-txt b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .es-h5-page-hero-orb { animation: none; }
    body.es-h5 .es-card,
    body.es-h5 .es-item,
    body.es-h5 .es-stat,
    body.es-h5 .es-course-card,
    body.es-h5 .es-video-card,
    body.es-h5 .es-btn,
    body.es-h5 .es-field input,
    body.es-h5 .tk-filter,
    body.es-h5 .es-ai-chat,
    body.es-h5 .es-upload { transition: none; }
}

/* ============ 视频评论：局部提示 + 删除按钮（不弹原生弹窗、不刷新整页） ============ */
.es-comment-tip {
    height: 0; opacity: 0; overflow: hidden; margin: 0;
    font-size: 12.5px; line-height: 22px; color: var(--h5-success, #0e8f63);
    transition: opacity .2s, height .2s, margin .2s;
}
.es-comment-tip.show { height: 22px; opacity: 1; margin: 0 0 6px; }
.es-comment-tip.err { color: var(--h5-danger, #e24b4a); }
.es-comment-del {
    margin-left: auto; padding: 1px 9px; font-size: 11.5px; line-height: 1.7;
    color: var(--h5-danger, #e24b4a); background: transparent;
    border: 1px solid currentColor; border-radius: 999px; cursor: pointer;
    white-space: nowrap; transition: background .15s, color .15s;
}
.es-comment-del.confirming { background: var(--h5-danger, #e24b4a); color: #fff; border-color: transparent; }
.es-comment-del:disabled { opacity: .55; cursor: default; }

/* ============ 随手拍：无检查任务时主动上报隐患 ============ */
.snap-hero {
    position: relative; overflow: hidden; margin: 0 0 12px; padding: 16px 16px 14px;
    border-radius: 18px; border: 1px solid rgba(99, 102, 241, .14);
    background: linear-gradient(135deg, #eef5ff 0%, #f4f0ff 55%, #fff6f6 100%);
    box-shadow: 0 8px 24px rgba(79, 70, 229, .09), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.snap-hero-orb {
    position: absolute; right: -46px; top: -58px; width: 168px; height: 168px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(96, 165, 250, .34), rgba(167, 139, 250, .05) 70%);
    pointer-events: none;
}
.snap-hero-ring {
    position: absolute; right: 22px; bottom: -60px; width: 118px; height: 118px; border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, .12); pointer-events: none;
}
.snap-hero-top { position: relative; display: flex; align-items: center; gap: 11px; }
.snap-hero-ico {
    flex: 0 0 46px; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
    border-radius: 14px; color: #fff;
    background: linear-gradient(135deg, #38bdf8, #6366f1 60%, #a855f7);
    box-shadow: 0 8px 18px rgba(99, 102, 241, .32);
}
.snap-hero-ico svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.snap-hero-txt { display: flex; flex-direction: column; min-width: 0; }
.snap-hero-txt em { font-size: 10px; font-style: normal; letter-spacing: 1.2px; color: #6366f1; font-weight: 700; }
.snap-hero-txt b { font-size: 17px; line-height: 1.45; color: #17213a; }
.snap-hero-txt small { font-size: 11.5px; color: #6b7690; line-height: 1.5; }
.snap-hero-btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 13px; height: 42px; border-radius: 12px; font-size: 14px; font-weight: 700; color: #fff;
    background: linear-gradient(100deg, #3b82f6, #6366f1 55%, #8b5cf6);
    box-shadow: 0 8px 18px rgba(79, 70, 229, .26); transition: transform .15s, box-shadow .15s;
}
.snap-hero-btn:active { transform: scale(.98); }
.snap-hero-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.snap-hero-btn, .snap-hero-btn:hover, .snap-hero-btn:visited, .snap-hero-btn:active, .snap-hero-btn:focus { color: #fff; text-decoration: none; }

.snap-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 12px 4px; margin-bottom: 10px; }
.snap-stats > div { display: flex; flex-direction: column; gap: 2px; }
.snap-stats b { font-size: 19px; font-weight: 800; color: #2563eb; }
.snap-stats b.snap-ok { color: #16a34a; }
.snap-stats b.snap-warn { color: #d97706; }
.snap-stats span { font-size: 11px; color: var(--h5-text-sub, #7b869c); }

.snap-filter { padding: 10px; margin-bottom: 10px; }
.snap-filter-row { display: flex; gap: 6px; align-items: center; }
.snap-filter-row input {
    flex: 1; min-width: 0; border: 1px solid var(--h5-line, #e6eaf2); border-radius: 9px;
    padding: 8px 10px; font-size: 13px; background: #fff;
}
.snap-filter-row select {
    width: 92px; flex: 0 0 92px; border: 1px solid var(--h5-line, #e6eaf2); border-radius: 9px;
    padding: 8px 6px; font-size: 12.5px; background: #fff;
}
.snap-filter-row .es-btn { flex: 0 0 auto; padding: 8px 13px; font-size: 13px; }
.snap-scope { display: flex; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--h5-line, #e6eaf2); }
.snap-scope a {
    flex: 1; text-align: center; padding: 5px 8px; border-radius: 999px; font-size: 12px;
    color: var(--h5-text-sub, #7b869c); background: #f5f7fb; text-decoration: none;
}
.snap-scope a.on { color: #fff; background: linear-gradient(100deg, #3b82f6, #6366f1); font-weight: 700; }

.snap-card { padding: 0; overflow: hidden; margin-bottom: 10px; }
.snap-card-main {
    display: flex; gap: 10px; padding: 12px; color: var(--h5-text, #1f2a44); text-decoration: none;
}
.snap-card-main, .snap-card-main:hover, .snap-card-main:visited, .snap-card-main:active, .snap-card-main:focus {
    color: var(--h5-text, #1f2a44); text-decoration: none;
}
.snap-card-main * { text-decoration: none; }
.snap-thumb {
    flex: 0 0 78px; width: 78px; height: 78px; border-radius: 11px; object-fit: cover;
    border: 1px solid var(--h5-line, #e6eaf2); background: #f3f6fb; display: block;
}
.snap-thumb-empty { display: flex; align-items: center; justify-content: center; color: #b6c1d6; }
.snap-thumb-empty svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.snap-card-body { display: flex; flex-direction: column; min-width: 0; gap: 5px; flex: 1; color: var(--h5-text, #1f2a44); }
.snap-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.snap-badges .es-badge { font-size: 10.5px; padding: 1px 8px; line-height: 1.7; }
.snap-badge-source { background: #e0e7ff; color: #4338ca; }
.snap-badge-done { background: #dcfce7; color: #16a34a; }
.snap-badge-todo { background: #fef3c7; color: #b45309; }
.snap-badge-level { background: #fee2e2; color: #dc2626; }
.snap-desc {
    font-size: 13.5px; line-height: 1.5; color: var(--h5-text, #1f2a44);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.snap-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--h5-text-sub, #7b869c); }
.snap-card-foot {
    display: flex; gap: 8px; align-items: center; justify-content: flex-end;
    padding: 8px 12px; border-top: 1px solid var(--h5-line, #eef1f6); background: #fbfcff;
}
.snap-card-foot a { font-size: 12px; color: #4f46e5; text-decoration: none; padding: 3px 10px; border: 1px solid #dfe3fb; border-radius: 999px; }
.snap-del {
    padding: 3px 10px; font-size: 12px; line-height: 1.7; color: var(--h5-danger, #e24b4a);
    background: #fff; border: 1px solid currentColor; border-radius: 999px; cursor: pointer;
    transition: background .15s, color .15s;
}
.snap-del.confirming { background: var(--h5-danger, #e24b4a); color: #fff; }
.snap-del:disabled { opacity: .55; cursor: default; }

.snap-empty { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 30px 16px; }
.snap-empty svg { width: 44px; height: 44px; fill: none; stroke: #b9c4da; stroke-width: 1.4; stroke-linejoin: round; }
.snap-empty b { font-size: 14px; color: var(--h5-text, #1f2a44); }
.snap-empty span { font-size: 12px; color: var(--h5-text-sub, #7b869c); text-align: center; }
.snap-empty .es-btn { margin-top: 6px; }

.snap-notice {
    display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 10px 12px;
    border-radius: 12px; background: #fff8ec; border: 1px solid #fde6bf;
    font-size: 12px; line-height: 1.6; color: #a16207;
}
.snap-notice svg { flex: 0 0 17px; width: 17px; height: 17px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.snap-hint { margin-top: 6px; font-size: 11.5px; color: var(--h5-text-sub, #7b869c); }
.snap-locate {
    margin-top: 7px; padding: 4px 12px; font-size: 12px; color: #4f46e5;
    background: #eef2ff; border: 1px solid #dfe3fb; border-radius: 999px; cursor: pointer;
}
.snap-locate:disabled { opacity: .6; cursor: default; }
.snap-loc-text { display: inline-block; margin-left: 8px; font-size: 11.5px; color: var(--h5-text-sub, #7b869c); }
.snap-cancel { display: block; margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--h5-text-sub, #7b869c); text-decoration: none; }

/* 随手拍 · AI 识别状态卡 */
.snap-ai { border: 1px solid #dbe4ff; background: linear-gradient(135deg, #f7f9ff, #f2f7ff); }
.snap-ai-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #2f3c66; }
.snap-ai-head svg { width: 17px; height: 17px; fill: #6366f1; stroke: none; }
.snap-ai-tag { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: #e8ecff; color: #4f46e5; font-size: 10.5px; font-weight: 500; }
.snap-ai-state { margin-top: 9px; padding: 7px 10px; border-radius: 9px; font-size: 12px; line-height: 1.55; }
.snap-ai-state.idle { background: #f4f6fb; color: #7b869c; }
.snap-ai-state.loading { background: #eef2ff; color: #4f46e5; }
.snap-ai-state.ok { background: #ecfdf3; color: #15803d; }
.snap-ai-state.warn { background: #fffbeb; color: #b45309; }
.snap-ai-state.err { background: #fef2f2; color: #b91c1c; }
.snap-ai-detail { margin-top: 8px; font-size: 11.5px; line-height: 1.65; color: var(--h5-text-sub, #7b869c); word-break: break-word; }
.snap-ai-detail:empty { display: none; }
.snap-optional { font-weight: 400; font-size: 11px; color: var(--h5-text-sub, #7b869c); }

/* 随手拍上报：表单控件继承页面正文字体。
   textarea/input 默认不继承 font-family，会回退成浏览器等宽/衬线字体，与页面其它文字不一致。 */
.snap-form .es-field input,
.snap-form .es-field select,
.snap-form .es-field textarea,
.snap-form .snap-ai-state,
.snap-form .snap-ai-detail { font-family: inherit; }

.snap-detail-head { padding: 14px; }
.snap-detail-desc { margin: 10px 0 6px; font-size: 15px; line-height: 1.6; color: var(--h5-text, #1f2a44); }
.snap-detail-time { font-size: 11.5px; color: var(--h5-text-sub, #7b869c); }
.snap-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.snap-photo {
    display: block; aspect-ratio: 1 / 1; border-radius: 9px; overflow: hidden;
    background: #f3f6fb; border: 1px solid var(--h5-line, #e6eaf2); text-decoration: none;
}
.snap-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.snap-photo-file { display: flex; align-items: center; justify-content: center; padding: 6px; font-size: 11px; color: #4f46e5; text-align: center; word-break: break-all; }
.snap-kv { display: grid; grid-template-columns: 86px 1fr; gap: 7px 10px; margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; }
.snap-kv dt { color: var(--h5-text-sub, #7b869c); }
.snap-kv dd { margin: 0; color: var(--h5-text, #1f2a44); word-break: break-word; }
.snap-fixed { border-left: 3px solid #16a34a; }
.snap-detail-foot { display: flex; gap: 10px; align-items: center; margin: 4px 0 10px; }
.snap-detail-foot .es-btn { flex: 1; text-align: center; }
.snap-detail-foot .snap-del { flex: 0 0 auto; padding: 7px 14px; }

@media (max-width: 360px) {
    .snap-thumb { flex-basis: 66px; width: 66px; height: 66px; }
    .snap-filter-row select { width: 78px; flex-basis: 78px; }
}

/* ============================================================
   AI 助手：安卓窄屏布局修复（2026-11-15）
   1) hero 一行塞了 avatar + 文本 + 2 个按钮，360px 屏把标题挤成竖排、
      副标题被压成每行列 4~5 字 → 小屏改为「第一行头像+文本、第二行按钮」；
   2) 输入条原本是普通文档流元素，聊天区把页面撑高后被顶出首屏；
      且 .es-ai-chat 的 max-height 只写了 100dvh —— 旧版安卓 WebView / X5
      内核不支持 dvh，整条声明被丢弃，聊天区完全不限高 → 加 100vh 回退；
   3) 输入条改为吸底（在 tabbar 之上），保证任何机型首屏都能输入。
   ============================================================ */
@media (max-width: 480px) {
    body.es-h5 .es-ai-hero {
        flex-wrap: wrap;
        gap: 8px 10px;
        padding: 12px;
        margin-bottom: 10px;
    }
    body.es-h5 .es-ai-hero-avatar { width: 38px; height: 38px; }
    .es-ai-hero-avatar svg { width: 22px; height: 22px; }
    body.es-h5 .es-ai-hero-main { flex: 1 1 calc(100% - 48px); min-width: 0; }
    .es-ai-hero-title { font-size: 16px; white-space: nowrap; }
    .es-ai-hero-sub { font-size: 11px; line-height: 1.4; }
    body.es-h5 .es-ai-hero-new { padding: 5px 11px; font-size: 12px; white-space: nowrap; }
    /* 两个按钮换行到第二行并整体靠右 */
    .es-ai-hero > button:first-of-type { margin-left: auto; }
    /* 欢迎态压缩，保证矮屏首屏能完整看到 3 个建议问题 */
    .es-ai-empty { padding: 16px 8px 10px; }
    .es-ai-empty-ic { width: 50px; height: 50px; margin-bottom: 8px; }
    .es-ai-empty-ic svg { width: 28px; height: 28px; }
    .es-ai-chips { margin-top: 10px; gap: 6px; }
    .es-ai-chip { padding: 6px 11px; font-size: 12px; }
}

/* 聊天区：老浏览器 vh 回退（dvh 不支持时整条 max-height 会整条失效） */
.es-ai-chat {
    min-height: 200px;
    max-height: calc(100vh - 300px);
    max-height: calc(100dvh - 300px);
    margin-bottom: 76px;
}

/* 输入条吸底：始终位于 tabbar 之上，任何高度的首屏都可见 */
.es-ai-inputbar {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(var(--h5-tabbar-h) + 8px);
    bottom: calc(var(--h5-tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 105;
    margin: 0 auto;
    max-width: 696px;
}
/* iOS/部分安卓内核：字号 >=16px 才不会在聚焦时自动放大页面 */
.es-ai-inputbar textarea { font-size: 16px; }

/* ============================================================
   全站移动端兼容加固（2026-11-15 第二轮）
   1) 对话/回复输入条统一吸底：矮屏不再被内容顶出首屏、被 tabbar 盖住；
   2) 表单聚焦字号 16px：防 iOS/安卓 WebView 聚焦整页放大造成的"变形"；
   3) 旧内核回退：aspect-ratio / 纯 dvh / 单行 flex 中文挤压；
   4) 内容区底部留白：长表单最后一个按钮不再压在 tabbar 下面。
   ============================================================ */

/* 内容区底部留白（放在前面，has-h5-compose 规则后写以覆盖） */
body.es-h5 .es-h5-main { padding-bottom: 20px; }

/* 知识库问答 / 私信回复的输入容器：由 es-h5.js 自动加 .es-h5-compose。
   AI 助手的 .es-ai-inputbar 本身已是胶囊吸底条，保持原样式不套此类。 */
.es-h5-compose {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(var(--h5-tabbar-h) + 8px);
    bottom: calc(var(--h5-tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 105;
    margin: 0 auto !important;
    max-width: 696px;
    background: var(--h5-card);
    border: 1px solid var(--h5-line);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 -3px 16px rgba(15, 23, 42, .12);
}
.es-h5-compose textarea,
.es-h5-compose input[type="text"] {
    font-family: inherit;
    font-size: 16px !important;
    min-width: 0;
}
.es-h5-compose .es-btn { flex: 0 0 auto; }
/* 留出吸底条 + tabbar 的高度，最后一条消息/按钮可滚到可见区 */
body.has-h5-compose .es-h5-main { padding-bottom: 96px; }
/* 知识库聊天区（视图里是内联 min-height/max-height，必须 !important 兜住） */
body.has-h5-compose #chatBox {
    min-height: 160px !important;
    max-height: calc(100vh - 360px) !important;
    max-height: calc(100dvh - 360px) !important;
}

@media (max-width: 480px) {
    /* 内联 style 的 13/14px 也要兜住：只在聚焦时抬到 16px，不改变日常视觉 */
    body.es-h5 input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]):focus,
    body.es-h5 textarea:focus,
    body.es-h5 select:focus { font-size: 16px !important; }

    /* 通用沉浸式页头：单行 flex 不再把中文标题挤成一字一行 */
    .es-h5-page-hero-inner { flex-wrap: nowrap; gap: 8px; }
    .es-h5-page-hero-txt { min-width: 0; }
    .es-h5-page-hero-txt b,
    .es-h5-page-hero-txt small {
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .es-h5-page-hero-tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* 旧版安卓 WebView / X5 内核不支持 aspect-ratio：
   人脸取景框与随手拍缩略图会塌陷成 0 高（表现为摄像头/图片"不见了"） */
@supports not (aspect-ratio: 1 / 1) {
    .es-face-video-wrap { height: 300px; }
    .snap-photo { min-height: 100px; }
}

/* 长文本 / 长 URL 兜底，防窄屏横向滚动 */
body.es-h5 .es-card,
body.es-h5 .es-item,
body.es-h5 .es-bubble .body { overflow-wrap: anywhere; }

/* ===== 顺序学习（解锁式）：任务清单，课程详情页与课时学习页共用 =====
   独立 .sl- 前缀，不受后台 13px 字号压平规则影响；不用 flex gap 以兼容旧安卓 WebView */
.sl-card { padding-bottom: 6px; }
.sl-tip { margin: 0 0 10px; font-size: 12px; color: var(--h5-text-sub); }
.sl-continue { margin-bottom: 12px; }
.sl-all-done { padding: 10px 0 14px; text-align: center; font-size: 14px; color: var(--h5-success); }
.sl-group { margin-top: 10px; border-top: 1px solid var(--h5-line); padding-top: 8px; }
.sl-group-title { font-size: 13px; font-weight: 600; color: var(--h5-text-sub); margin-bottom: 4px; }
.sl-item {
    display: flex; align-items: center; width: 100%; box-sizing: border-box;
    padding: 9px 6px; border-bottom: 1px dashed var(--h5-line);
    color: var(--h5-text, #1f2a3d); text-decoration: none;
}
.sl-item:last-child { border-bottom: 0; }
.sl-current { background: rgba(46, 116, 255, .08); border-radius: 8px; }
.sl-mark {
    flex: 0 0 22px; width: 22px; height: 22px; line-height: 22px; text-align: center;
    border-radius: 50%; font-size: 13px; font-weight: 700; margin-right: 10px;
}
.sl-mark-done { background: var(--h5-success, #1aad6c); color: #fff; font-size: 15px; }
.sl-mark-todo { background: #e9eef7; color: #7b8aa5; }
.sl-mark-lock { background: #f0f1f4; font-size: 12px; }
.sl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sl-name { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.sl-meta { font-size: 12px; color: var(--h5-text-sub); margin-top: 2px; }
.sl-arrow { flex: 0 0 auto; font-size: 20px; color: #b7c0cf; margin-left: 8px; }
.sl-locked { opacity: .55; }
