
:root {
  --skill-tag-min-w: 5.5rem;
  --skill-tag-unit: 1ch;
  --drop-pad-x: calc(var(--skill-tag-unit));
  --tag-h: 34px;
  --tag-gap: 10px;
  --pool-cat1: #2d6a4f;
  --pool-cat1-bg: #d8f3dc;
  --pool-cat2: #9a7209;
  --pool-cat2-bg: #fff3bf;
  --pool-cat3: #1d4e89;
  --pool-cat3-bg: #caf0f8;
  --pool-cat4: #3c096c;
  --pool-cat4-bg: #e0aaff;
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes statusFlash { 0%, 100% { opacity: 1; color: #c0392b; } 50% { opacity: 0.45; color: #e74c3c; } }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: inherit; font-weight: 700;
  border-radius: 999px; padding: 12px 20px; font-size: 14px; text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, #d4a853, #b8923e); color: #0a1f2e; }
.btn-secondary { background: transparent; border: 1.5px solid rgba(44,90,122,.28); color: #2c5a7a; }
.skills-actions, .values-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }

.skills-wrap {
            max-width: 520px;
            margin: 0 auto;
            padding: 0 20px 40px;
            animation: fadeInUp 0.6s ease-out;
        }
        @media (max-width: 640px) {
            .skills-wrap { padding-left: 10px; padding-right: 10px; }
        }
        .skills-card {
            background: #fff;
            border-radius: 24px;
            box-shadow: 0 12px 48px rgba(10,31,46,0.1);
            border: 1px solid rgba(212,168,83,0.12);
            overflow: hidden;
        }
        .skills-hero {
            width: 100%;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            background: linear-gradient(135deg, var(--slate), var(--steel));
        }
        .skills-card-inner { padding: 20px 18px 24px; }
        .skills-page-label {
            font-size: 12px; font-weight: 600; color: var(--gold); letter-spacing: 2px;
            margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
        }
        .skills-page-label::before { content: ''; width: 24px; height: 2px; background: var(--gold); }
        .skills-cat-title {
            font-family: 'Noto Serif SC', serif;
            font-size: 1.35rem;
            color: var(--text-dark);
            margin-bottom: 16px;
            font-weight: 700;
        }
        .skills-step {
            font-size: 13px; color: var(--text-light);
            margin-bottom: 18px;
        }

        /* 拖拽区：三列方框始终并排；技能池包在 .skills-dnd-layout 内，小屏用 order 把池子移到上方 */
        .skills-dnd-layout {
            display: flex;
            flex-direction: column;
            gap: 0;
        }
        .skills-buckets {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 20px;
        }
        @media (max-width: 640px) {
            .skills-dnd-layout .skills-pool-block {
                order: -1;
                margin-bottom: 16px;
            }
            .skills-buckets {
                gap: 5px;
                margin-bottom: 12px;
            }
        }
        .skills-bucket h3 {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-dark);
            text-align: center;
            margin-bottom: 8px;
            letter-spacing: 0.5px;
            line-height: 1.25;
        }
        .skills-drop-zone {
            border: 2px dashed rgba(26,60,92,0.28);
            border-radius: 14px;
            background: linear-gradient(180deg, var(--ivory) 0%, #f0ebe3 100%);
            min-height: calc(8 * (var(--tag-h) + var(--tag-gap)) + 16px);
            width: calc(100% + var(--drop-pad-x));
            max-width: 100%;
            margin: 0 auto;
            padding: 10px 8px;
            display: flex;
            flex-wrap: wrap;
            align-content: flex-start;
            gap: var(--tag-gap);
            justify-content: center;
            transition: border-color 0.25s, background 0.25s;
        }
        .skills-drop-zone.drag-over {
            border-color: var(--gold);
            background: rgba(212,168,83,0.08);
        }
        @media (max-width: 640px) {
            .skills-buckets .skills-drop-zone {
                width: 100%;
                min-height: calc(3 * (var(--tag-h) + var(--tag-gap)) + 12px);
                padding: 6px 4px;
                border-radius: 10px;
                -webkit-tap-highlight-color: transparent;
            }
            .skills-buckets .skills-bucket h3 {
                font-size: 11px;
                padding: 6px 2px;
                margin-bottom: 5px;
                border-radius: 8px;
                letter-spacing: 0;
                -webkit-tap-highlight-color: transparent;
            }
            .skills-buckets .skills-status {
                font-size: 9px;
                margin-top: 5px;
            }
            /* 三列内标签变窄，避免撑破格子 */
            .skills-buckets .skill-tag {
                min-width: 0;
                width: 100%;
                max-width: 100%;
                font-size: 10px;
                padding: 5px 3px;
                min-height: 30px;
                line-height: 1.2;
                overflow-wrap: break-word;
                word-break: keep-all;
            }
        }
        .skills-status {
            font-size: 11px;
            color: var(--text-light);
            text-align: center;
            margin-top: 8px;
            line-height: 1.4;
        }
        .skills-status.flash-warn {
            animation: statusFlash 0.5s ease-in-out 3;
            color: #c0392b;
            font-weight: 600;
        }

        /* 底部技能池：每行 4 个 */
        .skills-pool-title {
            font-size: 12px; color: var(--text-light);
            margin: 16px 0 10px;
            font-weight: 600;
        }
        @media (max-width: 640px) {
            .skills-pool-block .skills-pool-title {
                margin-top: 0;
            }
        }
        .skills-pool {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: var(--tag-gap);
        }
        #skillPool.drag-over {
            outline: 2px dashed var(--gold);
            outline-offset: 4px;
            border-radius: 12px;
        }
        @media (max-width: 420px) {
            .skills-pool { grid-template-columns: repeat(2, 1fr); }
        }
        .skill-tag {
            min-width: var(--skill-tag-min-w);
            min-height: var(--tag-h);
            padding: 6px 8px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            text-align: center;
            cursor: grab;
            user-select: none;
            border: 1px solid rgba(0,0,0,0.08);
            box-shadow: 0 2px 6px rgba(10,31,46,0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1.25;
            /* 触摸拖拽需禁用默认手势，否则手机无法拖进方框 */
            touch-action: none;
            -webkit-tap-highlight-color: rgba(212,168,83,0.25);
        }
        .skill-tag:active { cursor: grabbing; }
        .skill-tag.dragging { opacity: 0.55; }
        /* 触摸自定义拖拽：跟随手指的幽灵标签（pointer-events:none 以便命中下方投放区） */
        .skill-tag-touch-ghost {
            position: fixed;
            z-index: 4000;
            pointer-events: none;
            margin: 0;
            opacity: 0.95;
            box-shadow: 0 10px 28px rgba(10, 31, 46, 0.22);
            transform: translate(-50%, -50%);
            will-change: left, top;
        }
        .skill-tag--c0 { background: var(--pool-cat1-bg); color: var(--pool-cat1); border-color: rgba(45,106,79,0.25); }
        .skill-tag--c1 { background: var(--pool-cat2-bg); color: var(--pool-cat2); border-color: rgba(154,114,9,0.25); }
        .skill-tag--c2 { background: var(--pool-cat3-bg); color: var(--pool-cat3); border-color: rgba(29,78,137,0.25); }
        .skill-tag--c3 { background: var(--pool-cat4-bg); color: var(--pool-cat4); border-color: rgba(60,9,108,0.25); }
        .skill-tag--report-0 { background: var(--pool-cat1-bg); color: var(--pool-cat1); border-color: rgba(45,106,79,0.25); }
        .skill-tag--report-1 { background: var(--pool-cat2-bg); color: var(--pool-cat2); border-color: rgba(154,114,9,0.25); }
        .skill-tag--report-2 { background: var(--pool-cat3-bg); color: var(--pool-cat3); border-color: rgba(29,78,137,0.25); }
        .skill-tag--report-3 { background: var(--pool-cat4-bg); color: var(--pool-cat4); border-color: rgba(60,9,108,0.25); }

        .skills-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
            margin-top: 22px;
        }
        .btn-primary {
            display: inline-flex; align-items: center; gap: 8px;
            background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
            color: var(--deep-blue); padding: 12px 28px; border-radius: 50px;
            font-size: 14px; font-weight: 700; border: none; cursor: pointer;
            box-shadow: 0 6px 24px rgba(212,168,83,0.35);
            transition: transform 0.25s, box-shadow 0.25s;
            font-family: inherit;
        }
        .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(212,168,83,0.45); }
        .btn-secondary {
            display: inline-flex; align-items: center; gap: 8px;
            background: transparent; color: var(--slate);
            padding: 12px 28px; border-radius: 50px; font-size: 14px; font-weight: 600;
            border: 2px solid rgba(26,60,92,0.25); cursor: pointer; transition: all 0.25s;
            font-family: inherit;
        }
        .btn-secondary:hover { border-color: var(--gold); color: var(--gold-dark); }

        #reportSection { display: none; }
        #reportSection.is-visible { display: block; }
        #assessSection.is-hidden { display: none; }

        .report-def-block {
            margin-top: 28px;
            padding: 20px;
            border-radius: 16px;
            background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
            border: 1px solid rgba(212,168,83,0.12);
        }
        .report-def-block h3 {
            font-family: 'Noto Serif SC', serif;
            font-size: 1.1rem;
            color: var(--text-dark);
            margin-bottom: 14px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--gold);
        }
        .report-def-block ol {
            padding-left: 1.2rem;
            font-size: 14px;
            color: var(--text-body);
        }
        .report-def-block li { margin-bottom: 12px; }
        .report-def-block li strong { color: var(--text-dark); }

        .skills-intro {
            text-align: center;
            font-size: 13px;
            color: var(--text-light);
            margin-bottom: 12px;
            line-height: 1.6;
        }

        .skill-def-popover {
            position: fixed;
            z-index: 2500;
            max-width: min(300px, calc(100vw - 24px));
            padding: 11px 15px 12px;
            font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            font-size: 12.5px;
            font-weight: 300;
            letter-spacing: 0.06em;
            line-height: 1.75;
            color: rgba(30, 42, 53, 0.82);
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.62) 0%, rgba(240, 244, 250, 0.48) 100%);
            backdrop-filter: blur(14px) saturate(1.1);
            -webkit-backdrop-filter: blur(14px) saturate(1.1);
            border: 1px solid rgba(26, 60, 92, 0.12);
            border-radius: 10px;
            box-shadow: 0 10px 36px rgba(10, 31, 46, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.65);
            pointer-events: none;
            display: none;
            text-align: left;
            -webkit-font-smoothing: antialiased;
        }
        .skill-def-popover.is-visible { display: block; }

        .report-download-hint {
            margin-top: 22px;
            padding: 14px 16px;
            font-size: 13px;
            line-height: 1.65;
            color: var(--text-body);
            background: linear-gradient(135deg, rgba(212, 168, 83, 0.12) 0%, rgba(10, 31, 46, 0.06) 100%);
            border: 1px solid rgba(212, 168, 83, 0.22);
            border-radius: 14px;
        }
        .report-download-hint strong { color: var(--text-dark); }
        .report-download-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: center;
            justify-content: center;
            margin-top: 14px;
        }
    
.values-wrap {
            max-width: 520px;
            margin: 0 auto;
            padding: 0 18px 88px;
            animation: fadeInUp 0.55s ease-out;
        }
        
        .values-card {
            background: #fff;
            border-radius: 24px;
            box-shadow: 0 12px 48px rgba(10,31,46,0.1);
            border: 1px solid rgba(212,168,83,0.12);
            overflow: hidden;
        }
        .values-hero {
            width: 100%;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            background: linear-gradient(135deg, var(--slate), var(--steel));
        }
        .values-inner { padding: 18px 16px 22px; }
        .values-hint-top {
            font-size: 13px;
            color: var(--text-body);
            line-height: 1.65;
            margin-bottom: 14px;
            padding: 12px 14px;
            background: linear-gradient(135deg, rgba(212,168,83,0.1) 0%, rgba(10,31,46,0.04) 100%);
            border-radius: 12px;
            border: 1px solid rgba(212,168,83,0.15);
        }
        .values-page-label {
            font-size: 11px; font-weight: 600; color: var(--gold); letter-spacing: 2px;
            margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
        }
        .values-page-label::before { content: ''; width: 22px; height: 2px; background: var(--gold); }
        .values-title {
            font-family: 'Noto Serif SC', serif;
            font-size: 1.28rem;
            color: var(--text-dark);
            font-weight: 700;
            margin-bottom: 14px;
        }
        .values-step { font-size: 12px; color: var(--text-light); margin-bottom: 14px; }

        .values-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            padding: 14px;
            border: 2px dashed rgba(26,60,92,0.22);
            border-radius: 16px;
            background: linear-gradient(180deg, var(--ivory) 0%, #f0ebe3 100%);
            margin-bottom: 14px;
        }
        .values-grid--p4-bottom {
            grid-template-columns: repeat(3, 1fr);
            margin-top: 10px;
        }
        .value-cell {
            position: relative;
            min-height: 48px;
            padding: 10px 8px;
            border-radius: 10px;
            background: #fff;
            border: 1px solid rgba(26,60,92,0.12);
            font-size: 13px;
            font-weight: 600;
            color: var(--text-dark);
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            user-select: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .value-cell:hover { border-color: rgba(212,168,83,0.45); box-shadow: 0 4px 12px rgba(212,168,83,0.12); }
        .value-cell.selected {
            border-color: var(--gold-dark);
            background: linear-gradient(180deg, #fffbf0 0%, #fff 100%);
            box-shadow: 0 0 0 1px rgba(212,168,83,0.25);
        }
        .value-cell .check-mark {
            display: none;
            position: absolute;
            top: 4px;
            right: 5px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
            color: var(--deep-blue);
            font-size: 11px;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }
        .value-cell.selected .check-mark { display: flex; }

        .value-custom-slot {
            position: relative;
            min-height: 52px;
            border-radius: 10px;
            border: 2px dashed rgba(26,60,92,0.2);
            background: rgba(255,255,255,0.65);
            padding: 8px 10px;
        }
        .value-custom-slot input {
            width: 100%;
            border: none;
            background: transparent;
            font-size: 13px;
            font-family: inherit;
            color: var(--text-dark);
            outline: none;
            text-align: center;
        }
        .value-custom-slot input::placeholder { color: var(--text-light); font-weight: 400; }

        .pick-status {
            font-size: 13px;
            color: var(--text-light);
            text-align: center;
            margin: 12px 0 6px;
            min-height: 1.5em;
        }
        .pick-status.flash-warn {
            animation: statusFlash 0.5s ease-in-out 3;
            color: #c0392b;
            font-weight: 600;
        }

        .values-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin-top: 16px;
        }
        .btn-primary {
            display: inline-flex; align-items: center; gap: 8px;
            background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
            color: var(--deep-blue); padding: 12px 26px; border-radius: 50px;
            font-size: 14px; font-weight: 700; border: none; cursor: pointer;
            box-shadow: 0 6px 24px rgba(212,168,83,0.35);
            font-family: inherit;
            transition: transform 0.2s;
        }
        .btn-primary:hover { transform: translateY(-2px); }
        .btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
        .btn-secondary {
            display: inline-flex; align-items: center; gap: 8px;
            background: transparent; color: var(--slate);
            padding: 12px 26px; border-radius: 50px; font-size: 14px; font-weight: 600;
            border: 2px solid rgba(26,60,92,0.22); cursor: pointer; font-family: inherit;
        }
        .btn-secondary:hover { border-color: var(--gold); color: var(--gold-dark); }

        /* 第5页：上方五格投放区 + 下方十项池 */
        .core-target-box {
            border: 2px dashed rgba(26, 60, 92, 0.38);
            border-radius: 16px;
            background: linear-gradient(180deg, #fff 0%, var(--ivory) 100%);
            padding: 18px 16px 20px;
            margin-bottom: 16px;
            box-shadow: inset 0 0 0 1px rgba(212, 168, 83, 0.12);
        }
        .core-target-box h3 {
            font-family: 'Noto Serif SC', serif;
            font-size: 1.12rem;
            color: var(--text-dark);
            text-align: center;
            margin-bottom: 6px;
        }
        .core-slot-hint {
            font-size: 12px;
            color: var(--text-light);
            text-align: center;
            margin-bottom: 14px;
        }
        .core-drop-col {
            width: 100%;
            max-width: 240px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .core-drop-zone {
            min-height: 52px;
            border-radius: 12px;
            border: 2px dashed rgba(212, 168, 83, 0.55);
            background: rgba(255, 255, 255, 0.85);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6px 8px;
            transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
        }
        .core-drop-zone:empty::after {
            content: '拖入价值观';
            font-size: 12px;
            font-weight: 500;
            color: rgba(26, 60, 92, 0.35);
            letter-spacing: 0.05em;
        }
        .core-drop-zone.drag-over {
            border-color: var(--gold-dark);
            background: rgba(212, 168, 83, 0.14);
            box-shadow: 0 0 0 2px rgba(212, 168, 83, 0.2);
        }
        .core-pool-box {
            border: 2px dashed rgba(26, 60, 92, 0.26);
            border-radius: 16px;
            background: linear-gradient(180deg, var(--ivory) 0%, #f0ebe3 100%);
            padding: 16px 14px 18px;
            margin-bottom: 14px;
        }
        .core-pool-title {
            font-family: 'Noto Serif SC', serif;
            font-size: 0.98rem;
            color: var(--text-dark);
            text-align: center;
            margin-bottom: 12px;
            font-weight: 700;
        }
        .core-pool-sub {
            font-size: 12px;
            color: var(--text-light);
            text-align: center;
            margin-bottom: 10px;
        }
        .core-pool-box.drag-over {
            outline: 2px solid rgba(212, 168, 83, 0.55);
            outline-offset: 2px;
            background: rgba(255, 255, 255, 0.55);
        }

        .value-tag {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            background: linear-gradient(135deg, var(--slate) 0%, var(--steel) 100%);
            color: #fff;
            cursor: grab;
            border: 1px solid rgba(255,255,255,0.12);
            user-select: none;
        }
        .value-tag:active { cursor: grabbing; }
        .pool-ten-wrap { width: 100%; margin-bottom: 10px; }
        .pool-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin-bottom: 8px;
        }
        .pool-row--4 .value-tag { flex: 0 0 calc(25% - 8px); max-width: calc(25% - 6px); min-width: 0; }
        .pool-row--3 .value-tag { flex: 0 0 calc(33.33% - 8px); max-width: calc(33.33% - 6px); min-width: 0; }
        @media (max-width: 420px) {
            .pool-row--4 .value-tag { flex: 0 0 calc(50% - 8px); max-width: calc(50% - 6px); }
        }

        .define-block { margin-bottom: 18px; }
        .define-block label {
            display: block;
            font-weight: 700;
            font-size: 14px;
            color: var(--text-dark);
            margin-bottom: 6px;
        }
        .define-block textarea {
            width: 100%;
            min-height: 72px;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgba(26,60,92,0.15);
            font-family: inherit;
            font-size: 14px;
            resize: vertical;
        }
        .define-block .char-count { font-size: 11px; color: var(--text-light); margin-top: 4px; text-align: right; }

        .download-hint {
            margin-top: 18px;
            padding: 14px;
            font-size: 13px;
            line-height: 1.65;
            color: var(--text-body);
            background: linear-gradient(135deg, rgba(212,168,83,0.12) 0%, rgba(10,31,46,0.05) 100%);
            border: 1px solid rgba(212,168,83,0.2);
            border-radius: 14px;
        }
        .download-hint strong { color: var(--text-dark); }

        .screen { display: none; }
        .screen.is-active { display: block; }

        .slot-popover {
            position: fixed;
            z-index: 2500;
            max-width: min(280px, calc(100vw - 24px));
            padding: 10px 14px 11px;
            font-family: 'Noto Sans SC', sans-serif;
            font-size: 12.5px;
            font-weight: 300;
            letter-spacing: 0.06em;
            line-height: 1.75;
            color: rgba(30, 42, 53, 0.82);
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.62) 0%, rgba(240, 244, 250, 0.48) 100%);
            backdrop-filter: blur(14px);
            border: 1px solid rgba(26, 60, 92, 0.12);
            border-radius: 10px;
            box-shadow: 0 10px 36px rgba(10, 31, 46, 0.1);
            pointer-events: none;
            display: none;
        }
        .slot-popover.is-visible { display: block; }

        .confirm-hint { font-size: 12px; color: var(--text-light); text-align: center; margin-top: 8px; }
    