
        /*
         * 字体全部用系统自带的，不再外链 Google Fonts：
         * 国内访问 Google Fonts 经常超时，会拖住首屏渲染。
         * 这套栈在 Windows / macOS / Android / iOS 上都能落到系统 UI 字体。
         */
        :root { 
            --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                         "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
            --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
            --primary: #14b886; --primary-hover: #129e73; --primary-light: #e6f8f2; 
            --danger: #ff3333; --danger-light: #ffe6e6; --danger-border: #ffcccc; --success: #14b886;
            --bg-body: #f4f6f8; --bg-panel: #ffffff; --bg-soft: #fafbfc; --bg-hover: #f0f3f6;
            --bg-row-hover: #f8fafc; --bg-readonly: #e9ecef; --panel-soft: #fbfcfd;
            --text-main: #1f2328; --text-muted: #6e7781; --date-muted: #c4c9d0;
            --border: #e2e6ea; --border-soft: #eef1f4; --border-strong: #b3e6c9;
            --scroll-thumb: #d6dbe1; --scroll-thumb-hover: #c2c9d1;
            --pos-tint: rgba(255, 51, 51, .07); --neg-tint: rgba(20, 184, 134, .10);
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.04); --shadow-md: 0 4px 12px rgba(0,0,0,0.06); --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
            color-scheme: light;
        }
        /* 深色主题：只覆盖变量，其余样式自动跟着变 */
        html[data-theme="dark"] {
            --primary: #2dd4a0; --primary-hover: #45e4b4; --primary-light: #16352b;
            --danger: #ff6b6b; --danger-light: #3a1f1f; --danger-border: #5a2a2a; --success: #2dd4a0;
            --bg-body: #0f1318; --bg-panel: #171c22; --bg-soft: #1d242c; --bg-hover: #232c35;
            --bg-row-hover: #1b222a; --bg-readonly: #232a33; --panel-soft: #1b2229;
            --text-main: #e6e9ee; --text-muted: #98a3b2; --date-muted: #4a5462;
            --border: #2a323d; --border-soft: #232b35; --border-strong: #2f6b57;
            --scroll-thumb: #39424f; --scroll-thumb-hover: #4a5563;
            --pos-tint: rgba(255, 107, 107, .16); --neg-tint: rgba(45, 212, 160, .16);
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.35); --shadow-md: 0 4px 12px rgba(0,0,0,0.45); --shadow-lg: 0 12px 32px rgba(0,0,0,0.55);
            color-scheme: dark;
        }
        /* 浅色底的小徽章在深色下要压暗，否则一片刺眼 */
        html[data-theme="dark"] .rank-1 { background: #3a2c12; color: #e0a94a; }
        html[data-theme="dark"] .rank-2 { background: #262e38; color: #9aa4b2; }
        html[data-theme="dark"] .rank-3 { background: #35241a; color: #d08a5a; }

        .theme-toggle { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-panel); color: var(--text-muted); border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1; flex: 0 0 auto; transition: all .2s; }
        .theme-toggle:hover { background: var(--bg-hover); color: var(--text-main); }
        * { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-sans); }
        body { background-color: var(--bg-body); min-height: 100vh; color: var(--text-main); -webkit-font-smoothing: antialiased; }

        /* 页面切换动画：支持的浏览器（Chrome/Edge 126+）在跳转时自动交叉淡入，
           不支持的浏览器直接忽略这三段，表现和以前完全一样。 */
        @view-transition { navigation: auto; }
        @keyframes page-out { to { opacity: 0; } }
        @keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
        ::view-transition-old(root) { animation: 140ms ease-out both page-out; }
        ::view-transition-new(root) { animation: 220ms ease-out both page-in; }
        @media (prefers-reduced-motion: reduce) {
            ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
        }
        
        .navbar { background: var(--bg-panel); box-shadow: 0 1px 3px rgba(0,0,0,0.05); padding: 10px 40px; display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; min-height: 68px; flex-wrap: wrap; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border); }
        .navbar-brand { font-size: 20px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 12px; letter-spacing: -0.5px; flex: 0 0 auto; }
        .navbar-brand svg { width: 28px; height: 28px; fill: var(--primary); }
        /* 导航项：不许横向压缩、不许文字折行；一行放不下就整体换行，而不是把每个链接挤成一列字 */
        .nav-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
        .nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; padding: 8px 14px; border-radius: 6px; transition: all 0.2s; font-size: 14px; white-space: nowrap; flex: 0 0 auto; }
        .nav-links a:hover { background: var(--bg-hover); color: var(--text-main); }
        .nav-links a.active { background: var(--primary-light); color: var(--primary); }
        .nav-divider { width: 1px; height: 20px; background: var(--border); margin: 0 8px; }
        .nav-login { color: var(--primary) !important; border: 1px solid var(--primary); }
        .nav-login:hover { background: var(--primary-light) !important; }
        .nav-logout { color: var(--danger) !important; }
        .nav-logout:hover { background: var(--danger-light) !important; }
        .team-switch-form { display: flex; align-items: center; }
        .team-switch-select {
            height: 36px; padding: 0 30px 0 12px; border-radius: 7px;
            border: 1px solid var(--border-strong); background-color: var(--primary-light);
            color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer;
            appearance: none; -webkit-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314b886' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat; background-position: right 9px center; background-size: 13px;
        }
        .team-switch-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 184, 134, .15); }

        .main-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
        
        .panel { background: var(--bg-panel); border-radius: 12px; box-shadow: var(--shadow-md); border: 1px solid var(--border); overflow: hidden; margin-bottom: 32px; }
        .panel-header { padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--bg-panel); font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: space-between; }
        .panel-body { padding: 32px; }

        /* 上传截图的拖拽区 */
        .file-drop { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px dashed var(--border-strong); border-radius: 10px; background: var(--bg-soft); cursor: pointer; transition: border-color .15s, background .15s; }
        .file-drop:hover, .file-drop.dragover { border-color: var(--primary); background: var(--primary-light); }
        .file-drop-preview { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex: 0 0 auto; }
        .file-drop-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
        .file-drop-title { font-size: 14px; font-weight: 600; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .file-drop-hint { font-size: 12px; color: var(--text-muted); }
        .file-drop-action { flex: 0 0 auto; padding: 8px 14px; border-radius: 8px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 700; }

        /* 空状态 */
        .empty { text-align: center; padding: 44px 20px; }
        .empty-icon { font-size: 40px; line-height: 1; margin-bottom: 12px; opacity: .6; }
        .empty-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text-main); }
        .empty-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

        /* 可排序表头 */
        .th-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
        .th-sort:hover { color: var(--primary); }
        .sort-mark { font-size: 10px; opacity: .5; font-weight: 400; }
        .th-sort:hover .sort-mark { opacity: 1; }

        /* 翻页条 */
        .pager { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--border-soft); }

        /* 看板顶部汇总卡片 */
        .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
        .stat-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
        .stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
        .stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
        .stat-unit { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }

        /* 窄屏下宽表格可以左右滑动，而不是被 panel 的圆角裁掉看不见 */
        .table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
        .table-wrap table { min-width: 660px; }
        .table-wrap.table-fit table { min-width: 0; }
        .table-wrap::-webkit-scrollbar { height: 8px; }
        .table-wrap::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 4px; }
        .table-wrap::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

        .form-group { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
        .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        label { font-size: 13px; font-weight: 600; color: var(--text-main); }
        
        input[type="text"], input[type="password"], input[type="email"], input[type="number"], select { 
            padding: 12px 16px; border-radius: 8px; border: 1px solid var(--border); font-size: 15px; 
            background: var(--bg-soft); transition: all 0.2s; outline: none; font-family: inherit; color: var(--text-main);
        }
        input:focus, select:focus { border-color: var(--primary); background-color: var(--bg-panel); box-shadow: 0 0 0 4px rgba(20, 184, 134, 0.15); }
        
        select {
            appearance: none; -webkit-appearance: none; -moz-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e7781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; cursor: pointer;
        }
        input[readonly] { background: var(--bg-readonly); color: var(--text-muted); cursor: not-allowed; }
        
        .btn { padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; font-family: inherit; white-space: nowrap; }
        .btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(20, 184, 134, 0.3); }
        .btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20, 184, 134, 0.4); }
        .btn-danger { background: var(--danger-light); color: var(--danger); }
        .btn-danger:hover { background: var(--danger-border); color: var(--danger); }
        
        table { width: 100%; border-collapse: collapse; text-align: left; }
        th { padding: 16px; font-size: 12px; text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid var(--border); font-weight: 600; letter-spacing: 0.5px; background: var(--bg-panel); }
        td { padding: 16px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 500; }
        tr:last-child td { border-bottom: none; }
        tr:hover td { background: transparent; }
        tbody tr { transition: background-color .15s; }
        tbody tr:hover { background-color: var(--bg-row-hover); }
        
        .rank-badge { display: inline-flex; justify-content: center; align-items: center; width: 28px; height: 28px; border-radius: 6px; font-weight: 700; font-size: 13px; background: var(--bg-hover); color: var(--text-muted); }
        .rank-1 { background: #fff4e5; color: #b76e00; }
        .rank-2 { background: var(--bg-hover); color: #57606a; }
        .rank-3 { background: #fff0e6; color: #a04100; }
        .score-highlight { font-size: 16px; font-weight: 700; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
        /* 排行榜积分条：按绝对值最大的人做满格 */
        /* 排行榜：按积分给整行上色。正分从左往右、负分从右往左，颜色很淡 */
        .rank-row { background-repeat: no-repeat; background-size: var(--fill, 0%) 100%; }
        .rank-row.pos { background-image: linear-gradient(var(--pos-tint), var(--pos-tint)); background-position: left center; }
        .rank-row.neg { background-image: linear-gradient(var(--neg-tint), var(--neg-tint)); background-position: right center; }
        
        .checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; background: var(--bg-soft); padding: 16px; border-radius: 8px; border: 1px solid var(--border); }
        .checkbox-grid label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; cursor: pointer; color: var(--text-main); background: var(--bg-panel); padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); transition: all 0.2s; }
        .checkbox-grid label:hover { border-color: var(--primary); }
        .checkbox-grid input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; margin: 0; }

        .flash { padding: 16px; border-radius: 8px; margin-bottom: 24px; font-weight: 500; display: flex; align-items: center; gap: 10px; font-size: 14px; }
        .flash-error { background: var(--danger-light); color: #ff3333; border: 1px solid var(--danger-border); }
        .flash-success { background: var(--primary-light); color: var(--primary); border: 1px solid var(--border-strong); }

        .auth-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
        .auth-card { background: var(--bg-panel); width: 100%; max-width: 420px; border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); padding: 40px; text-align: center; }
        .auth-logo { margin-bottom: 24px; }
        .auth-logo svg { width: 48px; height: 48px; fill: var(--primary); }
        .auth-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
        .auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }

        /* 自绘日期选择器 */
        .date-field { position: relative; }
        .date-field > input { width: 100%; padding-right: 16px; background: var(--bg-panel); cursor: pointer; }
        .date-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 120; width: 300px; max-width: calc(100vw - 48px); padding: 14px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
        .date-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
        .date-title { padding: 4px 8px; color: var(--text-main); font-size: 13.5px; font-weight: 700; }
        .date-nav { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-panel); color: var(--text-muted); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
        .date-nav:hover { background: var(--bg-hover); color: var(--text-main); }
        .date-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
        .date-week span { padding: 4px 0; color: var(--text-muted); font-size: 11px; text-align: center; }
        .date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
        .date-cell { height: 32px; border: 0; border-radius: 7px; background: none; color: var(--text-main); font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; cursor: pointer; }
        .date-cell:hover { background: var(--bg-hover); }
        .date-cell.muted { color: var(--date-muted); }
        .date-cell.today { box-shadow: inset 0 0 0 1px var(--primary); }
        .date-cell.selected { background: var(--primary); color: #fff; font-weight: 700; }
        .date-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
        .date-text-btn { padding: 2px 0; border: 0; background: none; color: var(--primary); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
        .date-text-btn:hover { opacity: .7; }

        /* 自定义下拉框 */
        .select { position: relative; }
        select.select-native { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none; }
        .select-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 45px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text-main); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: border-color .18s, box-shadow .18s, background .18s; }
        .select-btn:hover { border-color: var(--border-strong); }
        .select-btn:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 184, 134, .15); }
        .select.open .select-btn { border-color: var(--primary); background: var(--bg-panel); box-shadow: 0 0 0 3px rgba(20, 184, 134, .12); }
        .select-btn::after { content: ""; width: 7px; height: 7px; margin: -4px 2px 0 0; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); flex: 0 0 auto; transition: transform .18s; }
        .select.open .select-btn::after { transform: rotate(-135deg); margin-top: 4px; }
        .select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .select-menu { position: fixed; z-index: 1200; padding: 5px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; }
        .select-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--text-main); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
        .select-option:hover { background: var(--bg-hover); }
        .select-option.is-selected { background: var(--primary-light); color: var(--primary); font-weight: 600; }
        .select-option.is-selected::after { content: "✓"; font-size: 13px; font-weight: 700; }
        .select-nav { width: auto; }
        .select-nav .select-btn { width: auto; min-width: 96px; height: 36px; padding: 0 12px; border-color: var(--border-strong); border-radius: 7px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 700; }
        .select-nav .select-btn::after { border-color: var(--primary); }
        .select-invalid .select-btn { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(255, 51, 51, .12) !important; }

        /* 截图放大查看：当前页弹层，不跳新标签页 */
        .img-viewer { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .82); }
        .img-viewer[hidden] { display: none; }
        .img-viewer img { max-width: 100%; max-height: 100%; border-radius: 8px; background: var(--bg-panel); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
        .img-viewer-close { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
        .img-viewer-close:hover { background: rgba(255, 255, 255, .32); }
        .img-viewer-tip { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .7); font-size: 12px; }

        .auth-topbar { position: fixed; top: 16px; right: 18px; z-index: 10; }

        /* BOSS 技能机制 */
        .skill-diagram { margin-top: 14px; width: 100%; }
        .dg-svg { width: 100%; max-width: 420px; height: auto; display: block; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); }
        .dg-bg { fill: transparent; }
        .dg-boss { fill: #ef4444; stroke: #b91c1c; stroke-width: .5; }
        .dg-safe { fill: rgba(34,197,94,.20); stroke: #22c55e; stroke-width: .7; }
        .dg-danger { fill: rgba(239,68,68,.20); stroke: #ef4444; stroke-width: .7; }
        .dg-warn { fill: rgba(245,158,11,.20); stroke: #f59e0b; stroke-width: .7; }
        .dg-light { fill: rgba(59,130,246,.20); stroke: #3b82f6; stroke-width: .7; }
        .dg-mute { fill: rgba(148,163,184,.18); stroke: #94a3b8; stroke-width: .7; }
        .dg-ring { fill: none; stroke-dasharray: 2.2 1.8; }
        .dg-ring.dg-boss { stroke: #ef4444; stroke-width: .8; stroke-dasharray: none; }
        .dg-line { stroke: #94a3b8; stroke-width: .7; }
        .dg-cross { stroke: #f59e0b; }
        .dg-arrow { fill: #94a3b8; }
        .dg-label { font-size: 4px; fill: var(--text-main); font-weight: 700; }
        .skill-diagram-cap { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
        .in-diagram { font-family: var(--font-mono); font-size: 12.5px; }
        .toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
        .toolbar input[type="search"] { flex: 1 1 280px; height: 42px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-panel); color: var(--text-main); font-size: 14px; }
        .toolbar .btn { height: 42px; padding: 0 18px; text-decoration: none; display: inline-flex; align-items: center; }
        .guide-dungeon { font-size: 16px; font-weight: 700; color: var(--text-main); margin: 26px 0 14px; display: flex; align-items: baseline; gap: 10px; }
        .guide-dungeon:first-of-type { margin-top: 0; }
        .guide-dungeon span { font-size: 12px; font-weight: 400; color: var(--text-muted); }
        .guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 8px; }
        .guide-card { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; text-decoration: none; background: var(--bg-panel); transition: border-color .15s, box-shadow .15s, transform .15s; }
        .guide-card:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(0,0,0,.06); transform: translateY(-1px); }
        .guide-name { font-size: 15px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
        .guide-diff { font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-light); padding: 2px 7px; border-radius: 999px; }
        .guide-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
        .guide-sum { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
        .boss-cover { max-width: 100%; border-radius: 10px; margin-bottom: 18px; border: 1px solid var(--border); }
        .boss-summary { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 22px; }
        .boss-skills { display: flex; flex-direction: column; gap: 14px; }
        .skill-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-panel); }
        .skill-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
        .skill-phase { font-size: 11px; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
        .skill-name { font-size: 15px; font-weight: 700; color: var(--text-main); }
        .skill-index { margin-left: auto; font-size: 12px; color: var(--text-muted); }
        .skill-body { display: flex; gap: 18px; padding: 14px 16px; flex-wrap: wrap; }
        .skill-col { flex: 1 1 260px; min-width: 220px; }
        .skill-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 6px; }
        .skill-text { font-size: 14px; line-height: 1.7; color: var(--text-main); }
        .skill-counter .skill-text { border-left: 3px solid var(--primary); padding-left: 10px; }
        .skill-img { max-width: 260px; border-radius: 8px; border: 1px solid var(--border); }
        .boss-form .boss-thumb { max-height: 90px; border-radius: 8px; margin-top: 8px; border: 1px solid var(--border); }
        .skill-edit { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; background: var(--bg-panel); }
        .skill-add { border-style: dashed; background: var(--bg-soft); }
        .skill-edit-head { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
        .skill-edit-head .in-phase { flex: 0 0 150px; }
        .skill-edit-head .in-name { flex: 1 1 auto; }
        .skill-edit-head input { height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-panel); color: var(--text-main); font-size: 14px; }
        .skill-edit textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-panel); color: var(--text-main); font-size: 14px; line-height: 1.6; resize: vertical; }
        .skill-edit-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 8px 0 4px; }
        .skill-edit-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
        .skill-del { margin: 0 0 18px; }
        .btn-mini { height: 32px; padding: 0 14px; font-size: 13px; }
        .skill-has-img { color: var(--primary); }

        /* 全宽顶栏 + 左侧分组导航 */
        .app-shell { display: flex; flex-direction: column; min-height: 100vh; }
        .global-header { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 18px; background: var(--bg-panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 60; }
        .brand { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text-main); text-decoration: none; letter-spacing: -0.2px; white-space: nowrap; }
        .brand svg { width: 20px; height: 20px; fill: var(--primary); flex: 0 0 auto; }
        .header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
        .icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-panel); color: var(--text-main); border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1; flex: 0 0 auto; transition: background .15s; }
        .icon-btn:hover { background: var(--bg-hover); }
        .topbar-team select { height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer; }
        .topbar-link { text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
        .topbar-link.nav-logout { color: var(--danger); }
        .topbar-link.nav-logout:hover { background: var(--danger-light); }
        .topbar-link.nav-login { color: var(--primary); }
        .topbar-link.nav-login:hover { background: var(--primary-light); }

        .shell-body { display: flex; flex: 1 1 auto; min-height: 0; }
        .sidebar { width: 236px; flex: 0 0 236px; background: var(--bg-panel); border-right: 1px solid var(--border); position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; padding: 16px 14px 24px; }
        .nav-group { margin-bottom: 22px; }
        .nav-group-title { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--text-muted); padding: 6px 12px 8px; }
        .nav-item { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 8px; color: var(--text-main); text-decoration: none; font-size: 14px; line-height: 1.25; white-space: nowrap; transition: background .15s, color .15s; }
        .nav-item:hover { background: var(--bg-hover); }
        .nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
        .main-area { flex: 1 1 auto; min-width: 0; }
        .content-container { max-width: 1180px; margin: 0 auto; padding: 30px 40px 64px; }
        /* 收起侧栏 */
        html[data-sidebar="hidden"] .sidebar { display: none; }

        /* 窄屏：侧栏变成顶部横向菜单 */
        @media (max-width: 900px) {
            .global-header { padding: 0 12px; height: 52px; }
            .brand { font-size: 14px; }
            .shell-body { flex-direction: column; }
            .sidebar { position: static; width: 100%; flex: 0 0 auto; height: auto; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; padding: 8px 10px; }
            .sidebar-nav { display: flex; gap: 4px; overflow-x: auto; }
            .nav-group { display: flex; align-items: center; gap: 4px; margin: 0; }
            .nav-group-title { display: none; }
            .content-container { padding: 18px 14px 40px; }
        }

        @media (max-width: 768px) {
            .navbar { padding: 10px 16px; flex-direction: column; gap: 10px; }
            .nav-links { flex-wrap: wrap; justify-content: center; margin-left: 0; }
            .nav-divider { display: none; }
            .form-row { grid-template-columns: 1fr; }
            .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
            .stat-card { padding: 14px 16px; }
            .stat-value { font-size: 22px; }
            .panel-body { padding: 20px; }
            .auth-card { padding: 30px 20px; }
        }
    