/* ================================================================
   Page-specific styles
   ================================================================ */

/* ===== Dashboard ===== */
.welcome-banner {
    background: linear-gradient(135deg, rgba(74,156,108,0.15), rgba(212,154,62,0.1));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.welcome-banner__text h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.welcome-banner__text p {
    font-size: 13px;
    color: var(--color-text-secondary);
}
.welcome-banner__streak {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}
.welcome-banner__streak-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-accent-light);
    line-height: 1;
}
.welcome-banner__streak-label {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* EXP Bar — legacy (shimmer animation preserved for new bar) */
@keyframes expShimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ================================================================
   EXP Bar — 等级系统全面改造
   布局：[左侧渐变方块 Lv.XX] [段位称呼] [渐变进度条] [EXP数值]
   ================================================================ */
.exp-card {
    margin-bottom: 24px;
    overflow: visible;
}
.exp-card__inner {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

/* 左侧等级方块 */
.exp-card__lv-block {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
}
.exp-card__lv-num {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 2px;
    margin-top: -5px;
}
.exp-card__lv-val {
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* 右侧信息区 */
.exp-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    min-width: 0;
}

/* 段位称呼行 */
.exp-card__rank-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.exp-card__rank {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.exp-card__max-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #D4B040, #E8D080);
    color: #5B3A08;
    letter-spacing: 1px;
    animation: maxBadgePulse 2s ease-in-out infinite;
}

/* 进度条 */
.exp-card__bar {
    height: 12px;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}
.exp-card__bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    position: relative;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}
/* 通用光泽扫过效果 */
.exp-card__bar-fill::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 24px;
    background: rgba(255,255,255,0.25);
    border-radius: var(--radius-full);
    animation: expShimmer 2s ease-in-out infinite;
}

/* 满级进度条 — 金紫流光 */
.exp-card__bar-fill--max {
    box-shadow: 0 0 12px rgba(212,176,64,0.5), 0 0 24px rgba(196,168,208,0.3);
}
.exp-card__bar-fill--max::after {
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: maxShimmer 1.5s ease-in-out infinite;
}

/* 底部文字行 */
.exp-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.exp-card__exp-text {
    font-size: 12px;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}
.exp-card__remaining {
    font-size: 11px;
    color: var(--color-text-muted);
}
.exp-card__max-text {
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #D4B040, #E8D080, #D4B040);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: maxTextShine 2s ease-in-out infinite;
}

@keyframes maxBadgePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(212,176,64,0); }
    50% { box-shadow: 0 0 10px rgba(212,176,64,0.5); }
}
@keyframes maxShimmer {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(200px); }
}
@keyframes maxTextShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
}

/* 满级卡片整体光晕 */
.exp-card--max {
    position: relative;
    overflow: visible;
}
.exp-card--max::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 13px;
    background: linear-gradient(135deg, #D4B040, #C4A8D0, #E8D080, #D4B040);
    background-size: 300% 300%;
    z-index: -1;
    animation: maxCardGlow 3s ease-in-out infinite;
    opacity: 0.4;
}
@keyframes maxCardGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 响应式 */
@media (max-width: 700px) {
    .exp-card__inner {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .exp-card__lv-block {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }
    .exp-card__lv-val {
        font-size: 22px;
    }
    .exp-card__info {
        width: 100%;
        align-items: center;
    }
    .exp-card__rank {
        font-size: 14px;
    }
    .exp-card__meta {
        width: 100%;
    }
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border-light);
    border-radius: var(--radius-full);
}
.timeline__item {
    position: relative;
    padding-bottom: 20px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid var(--color-bg-base);
}
.timeline__item--accent::before { background: var(--color-accent); }
.timeline__time {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}
.timeline__text {
    font-size: 13px;
    color: var(--color-text-secondary);
}
.timeline__text strong {
    color: var(--color-text-primary);
}

/* ===== Action Center ===== */
.action-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.action-form__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.action-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.action-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.action-category-item:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.04);
}
.action-category-item--selected {
    border-color: var(--color-primary);
    background: var(--color-primary-bg);
    color: var(--color-primary-light);
}
.action-category-item__icon {
    font-size: 36px;
}

/* ================================================================
   Quick Action Layout — 开始行动新版布局
   ================================================================ */

/* --- Main grid: left (record+history) | right (stats) --- */
.qa-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: start;
}
.qa-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.qa-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Record card --- */
.qa-record-card {
    padding: 20px;
}

/* --- Mode tabs --- */
.qa-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.04);
    padding: 3px;
}
.qa-mode-tab {
    flex: 1;
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.qa-mode-tab:hover {
    color: var(--color-text-secondary);
}
.qa-mode-tab--active {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

/* --- Time row --- */
.qa-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qa-time-input {
    width: 52px;
    padding: 8px 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-mono);
    text-align: center;
    outline: none;
    transition: border-color var(--transition-fast);
    -moz-appearance: textfield;
}
.qa-time-input::-webkit-inner-spin-button,
.qa-time-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qa-time-input:focus {
    border-color: var(--color-primary);
}
.qa-time-colon {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-secondary);
}
.qa-time-arrow {
    font-size: 16px;
    color: var(--color-text-muted);
    margin: 0 4px;
}
.qa-time-end {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-accent-light);
    font-family: var(--font-mono);
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
}
.qa-time-hint {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* --- Duration row --- */
.qa-duration-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.qa-duration-input {
    width: 60px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-mono);
    text-align: center;
    outline: none;
    transition: border-color var(--transition-fast);
    -moz-appearance: textfield;
}
.qa-duration-input::-webkit-inner-spin-button,
.qa-duration-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qa-duration-input:focus {
    border-color: var(--color-primary);
}
.qa-duration-unit {
    font-size: 12px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* --- Describe mode --- */

/* --- AI Chat mode --- */
.qa-chat-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
    padding: 4px 0;
    margin-bottom: 8px;
}
.qa-chat-welcome {
    text-align: center;
    padding: 30px 20px;
    color: var(--color-text-secondary);
    background: rgba(107,163,184,0.06);
    border-radius: var(--radius);
    border: 1px dashed rgba(255,255,255,0.08);
}
.qa-chat-msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.qa-chat-msg--user {
    flex-direction: row-reverse;
}
.qa-chat-msg__avatar {
    font-size: 22px;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}
.qa-chat-msg__bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
    background: rgba(255,255,255,0.06);
    color: var(--color-text);
}
.qa-chat-msg--user .qa-chat-msg__bubble {
    background: var(--color-primary);
    color: #fff;
}
.qa-chat-msg--assistant .qa-chat-msg__bubble {
    background: rgba(88,213,201,0.08);
    border: 1px solid rgba(88,213,201,0.15);
}
.qa-chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.qa-chat-input {
    flex: 1;
    min-height: 44px !important;
    resize: none;
    font-size: 14px;
}

/* --- Editable preview panel --- */
.qa-preview-panel {
    background: rgba(88,213,201,0.06);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid rgba(88,213,201,0.15);
}
.qa-preview-item {
    padding: 10px 12px;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.qa-preview-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}
.qa-preview-category {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.qa-preview-category option {
    background: #1a1a2e;
    color: #fff;
}
.qa-preview-item__exp {
    font-size: 12px;
    color: var(--color-accent-light);
    font-weight: 600;
    white-space: nowrap;
}
.qa-preview-exp-val {
    font-size: 15px;
}
.qa-preview-global {
    font-size: 15px;
    color: var(--color-accent);
}
.qa-preview-note {
    width: 100%;
    min-height: 36px !important;
    font-size: 13px;
    padding: 6px 10px;
    resize: vertical;
}
.qa-preview-duration {
    width: 60px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: inherit;
    text-align: center;
}

/* --- History card --- */
.qa-history-card {
    padding: 20px;
}
.qa-history-list {
    display: flex;
    flex-direction: column;
    max-height: 400px;
    overflow-y: auto;
}
.qa-history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
}
.qa-history-item__left {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.qa-history-item__icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}
.qa-history-item__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.qa-history-item__cat {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.qa-history-item__time {
    font-size: 11px;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}
.qa-history-item__note {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}
.qa-history-item__exp {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-accent-light);
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- History modal --- */

/* --- Responsive --- */
@media (max-width: 1100px) {
    .qa-layout {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .qa-time-row {
        flex-wrap: wrap;
    }
    .qa-duration-row {
        flex-wrap: wrap;
    }
    .qa-history-item__note {
        max-width: 160px;
    }
}

/* ===== History ===== */

/* ===== Attributes — 属性详情表 ===== */
.attr-table-card {
    padding: 20px;
}
.attr-table-wrap {
    overflow-x: auto;
    margin: 0 -8px;
    padding: 0 8px;
}
.attr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 900px;
}

/* --- Head --- */
.attr-head-row {
    border-bottom: 1px solid var(--color-border);
}
.attr-th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--color-text-muted);
    white-space: nowrap;
    user-select: none;
}
.attr-th--num {
    width: 44px;
    text-align: center;
}
.attr-th--lv {
    text-align: center;
}
.attr-th--xp {
    text-align: right;
}
.attr-th--progress {
    text-align: right;
}

/* --- Row --- */
.attr-row {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}
.attr-row:last-child {
    border-bottom: none;
}
.attr-row:hover {
    background: rgba(255,255,255,0.02);
}

/* --- Cell --- */
.attr-cell {
    padding: 14px 12px;
    vertical-align: middle;
    color: var(--color-text-primary);
}
.attr-cell--num {
    width: 44px;
    text-align: center;
}
.attr-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
}

/* --- Name --- */
.attr-cell--name {
    white-space: nowrap;
}
.attr-name-icon {
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.attr-name-text {
    font-weight: 600;
}

/* --- Level badge --- */
.attr-cell--lv {
    text-align: center;
}
.attr-lv {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* --- XP cells --- */
.attr-cell--xp {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* --- Progress --- */
.attr-cell--progress {
    min-width: 140px;
}
.attr-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}
.attr-progress__bar {
    flex: 1;
    height: 8px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    overflow: hidden;
    min-width: 70px;
}
.attr-progress__fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}
.attr-progress__text {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* --- Notes --- */
.attr-cell--notes {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ===== Attribute Intro Section ===== */
.attr-intro-section {
    margin-top: 24px;
}
.attr-intro-section__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-text-primary);
}
.attr-intro-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.attr-intro-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.attr-intro-card:hover {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.025);
}
.attr-intro-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.attr-intro-card__icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
}
.attr-intro-card__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
    flex-shrink: 0;
}
.attr-intro-card__tagline {
    font-size: 11px;
    color: var(--color-text-muted);
    padding: 2px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.attr-intro-card__desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ===== Goals — 目标管理 ===== */

/* --- Card list container --- */
.goal-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Individual goal card --- */
.goal-card {
    background: #242928;
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.04);
    transition: all var(--transition-fast);
}

/* --- Header row --- */
.goal-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.goal-card__header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.goal-card__icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
}
.goal-card__header-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.goal-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #F5F5F5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.goal-card__meta {
    font-size: 12px;
    color: #A0A8A6;
    white-space: nowrap;
}

/* --- Percentage (no colored badge, plain text) --- */
.goal-card__pct {
    flex-shrink: 0;
    margin-left: 16px;
}
.goal-card__pct-num {
    font-size: 20px;
    font-weight: 700;
    color: #F5F5F5;
}
.goal-card__pct-sym {
    font-size: 14px;
    font-weight: 400;
    color: #707876;
}

/* --- Milestone dots --- */
.goal-card__mstones {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.goal-card__mstone {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    transition: background var(--transition-fast);
}

/* --- Intro text --- */
.goal-card__intro {
    font-size: 13px;
    color: #8A9492;
    line-height: 1.6;
    margin: 0 0 14px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.025);
    border-radius: 8px;
    border-left: 3px solid rgba(255,255,255,0.06);
}

/* --- Intro textarea in modal --- */
.goal-intro-textarea {
    min-height: 72px !important;
    resize: vertical;
    font-size: 13px;
    line-height: 1.6;
}

/* --- Footer --- */
.goal-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.goal-card__mstone-count {
    font-size: 11px;
    color: #707876;
}

/* --- Edit / Delete buttons --- */
.goal-card__actions {
    display: flex;
    gap: 6px;
}
.goal-card__action {
    padding: 5px 12px;
    border-radius: 8px;
    border: none;
    background: #2C3231;
    color: #A0A8A6;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.goal-card__action--edit:hover {
    color: #96D8B8;
}
.goal-card__action--delete:hover {
    color: #F26B68;
}

/* --- Claim reward button --- */
.goal-card__claim-btn {
    padding: 5px 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #D49A3E, #E8B85A);
    color: #1A1C1E;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    animation: claimGlow 2s ease-in-out infinite;
}
.goal-card__claim-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(212, 154, 62, 0.4);
}
@keyframes claimGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 154, 62, 0.3); }
    50%      { box-shadow: 0 0 0 8px rgba(212, 154, 62, 0); }
}
.goal-card__claimed {
    font-size: 12px;
    color: #5CAD6C;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Create button (header right) --- */
.goal-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    background: #38A878;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.goal-create-btn:hover {
    background: #42B886;
}

/* --- Toolbar (filter + delete mode) --- */
.goal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.goal-toolbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.goal-toolbar__label {
    font-size: 12px;
    color: #A0A8A6;
    font-weight: 500;
}
.goal-filter-select {
    padding: 6px 28px 6px 10px;
    background-color: rgba(255,255,255,0.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-family: var(--font-family);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--transition-fast);
}
.goal-filter-select:hover {
    border-color: rgba(255,255,255,0.2);
}
.goal-filter-select:focus {
    border-color: var(--color-accent);
}
.goal-filter-select option {
    background: #242928;
    color: var(--color-text-primary);
}
.goal-toolbar__count {
    font-size: 12px;
    color: #707876;
}

/* --- Delete mode toggle button --- */
.goal-delete-mode-btn {
    padding: 7px 16px;
    border: 1px solid rgba(200, 90, 74, 0.3);
    border-radius: 8px;
    background: rgba(200, 90, 74, 0.1);
    color: #E08070;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.goal-delete-mode-btn:hover {
    background: rgba(200, 90, 74, 0.2);
    border-color: rgba(200, 90, 74, 0.5);
}
.goal-delete-mode-btn--active {
    background: rgba(200, 90, 74, 0.25);
    border-color: #C85A4A;
    color: #F26B68;
    animation: deletePulse 1.8s ease-in-out infinite;
}
@keyframes deletePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 90, 74, 0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(200, 90, 74, 0); }
}

/* --- Milestone editor in modal --- */
.goal-ms-edit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}
.goal-ms-edit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}
.goal-ms-edit-row__num {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-muted);
    width: 28px;
    flex-shrink: 0;
    text-align: center;
}
.goal-ms-edit-row__input {
    flex: 1;
    padding: 6px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 13px;
    font-family: var(--font-family);
    outline: none;
    transition: border-color var(--transition-fast);
}
.goal-ms-edit-row__input:focus {
    border-color: var(--color-primary);
}
.goal-ms-edit-row__input::placeholder {
    color: var(--color-text-muted);
}
.goal-ms-edit-row__check {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 12px;
    color: var(--color-text-muted);
    user-select: none;
}
.goal-ms-edit-row__check input[type="checkbox"] {
    accent-color: var(--color-success);
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.goal-ms-edit-row__check-label {
    white-space: nowrap;
    min-width: 40px;
}

/* --- Milestone count input + apply button --- */
.goal-ms-count-input {
    width: 52px;
    padding: 4px 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-mono);
    text-align: center;
    outline: none;
    transition: border-color var(--transition-fast);
    -moz-appearance: textfield;
}
.goal-ms-count-input::-webkit-inner-spin-button,
.goal-ms-count-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.goal-ms-count-input:focus {
    border-color: var(--color-primary);
}
.goal-ms-apply-btn {
    padding: 4px 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.06);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.goal-ms-apply-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--color-text-primary);
    border-color: rgba(255,255,255,0.2);
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .goal-card {
        padding: 16px;
    }
    .goal-card__title {
        font-size: 14px;
    }
    .goal-card__pct-num {
        font-size: 17px;
    }
    .goal-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .goal-toolbar__left {
        flex-wrap: wrap;
    }
    .goal-ms-edit-row {
        flex-wrap: wrap;
    }
    .goal-ms-edit-row__input {
        min-width: 140px;
    }
}

/* ================================================================
   本日任务 — 两栏布局
   ================================================================ */
.task-today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.task-today-col {
    background: #242928;
    border-radius: 10px;
    padding: 16px;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.04);
    min-height: 120px;
}
.task-today-col__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
}
.task-today-col__head--done {
    color: var(--color-success);
}
.task-today-col__count {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
    color: var(--color-text-muted);
    font-weight: 500;
}
.task-today-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.task-today-empty {
    text-align: center;
    padding: 20px;
    color: var(--color-text-muted);
    font-size: 13px;
}

/* --- Today task card --- */
.task-today-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all var(--transition-fast);
}
.task-today-card:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
}
.task-today-card--done {
    opacity: 0.7;
}
.task-today-card__main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.task-today-card__icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.task-today-card__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.task-today-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #F5F5F5;
}
.task-today-card__meta {
    font-size: 11px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.task-today-card__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.task-today-card__btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.task-today-card__btn--done {
    background: rgba(92,173,108,0.15);
    color: var(--color-success);
}
.task-today-card__btn--done:hover {
    background: rgba(92,173,108,0.3);
}
.task-today-card__btn--claim {
    background: linear-gradient(135deg, #D49A3E, #E8B85A);
    color: #1A1C1E;
    animation: claimGlow 2s ease-in-out infinite;
}
.task-today-card__btn--del {
    background: rgba(200,90,74,0.12);
    color: #E08070;
}
.task-today-card__btn--del:hover {
    background: rgba(200,90,74,0.25);
    color: #F26B68;
}
.task-today-card__btn--edit {
    background: rgba(100,120,200,0.1);
    color: var(--color-text-secondary);
}
.task-today-card__btn--edit:hover {
    background: rgba(100,120,200,0.2);
    color: var(--color-text-primary);
}
.task-today-card__claimed {
    font-size: 11px;
    color: #5CAD6C;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Responsive for today tasks --- */
@media (max-width: 900px) {
    .task-today-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Tasks (Kanban) — 本周任务三栏 ===== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.kanban-column {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 200px;
}
.kanban-column__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kanban-column__count {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
}
.kanban-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    cursor: grab;
    transition: all var(--transition-fast);
}
.kanban-card:hover {
    border-color: rgba(255,255,255,0.2);
}
.kanban-card__title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}
.kanban-card__meta {
    font-size: 11px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Habits ===== */
/* ================================================================
   Habits Page — 全面改造版
   ================================================================ */

/* --- Module 1: Stats Cards (5 columns) --- */
.habit-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.habit-stat-card {
    background: #1e2028;
    border-radius: 10px;
    padding: 16px 18px;
}
.habit-stat-card__label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.habit-stat-card__value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}
.habit-stat-card__sub {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* --- Module 2: Weekly Overview --- */
.habit-week-overview {
    background: #1e2028;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.habit-week-overview__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.habit-week-overview__title {
    font-size: 15px;
    font-weight: 600;
    color: #e4e4e7;
}
.habit-week-overview__tabs {
    display: flex;
    background: #16181e;
    border-radius: 8px;
    padding: 3px;
}
.habit-week-tab {
    padding: 5px 14px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.habit-week-tab--active {
    background: #272a34;
    color: #e4e4e7;
}
.habit-week-overview__cols {
    display: flex;
    gap: 8px;
}
.habit-week-col {
    flex: 1;
    text-align: center;
    padding: 10px 4px 12px;
    border-radius: 8px;
    background: #16181e;
    transition: background 0.15s;
    min-width: 0;
}
.habit-week-col--today {
    background: #1e2028;
    box-shadow: inset 0 0 0 1px #22c55e;
}
.habit-week-col__day {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 4px;
}
.habit-week-col__date {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 8px;
}
.habit-week-col__date--today {
    color: #22c55e;
}
.habit-week-col__dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    width: 80%;
    margin: 0 auto;
}
.habit-week-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.habit-week-dot--done { background: #22c55e; }
.habit-week-dot--missed { background: #ef4444; }
.habit-week-dot--skipped { background: #f59e0b; }
.habit-week-dot--empty {
    background: transparent;
    border: 1px dashed #3f3f46;
}

/* --- Module 3: Habit Cards Grid --- */
.habit-grid-section {
    margin-bottom: 20px;
}
.habit-grid-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.habit-grid-section__title {
    font-size: 15px;
    font-weight: 600;
    color: #e4e4e7;
}
.habit-grid-section__actions {
    display: flex;
    gap: 8px;
}

.habit-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.habit-card-v2 {
    background: #1e2028;
    border-radius: 10px;
    padding: 18px;
    transition: opacity 0.2s;
}
.habit-card-v2--skipped {
    opacity: 0.75;
}

/* Top row */
.habit-card-v2__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.habit-card-v2__checkbox {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 2px solid #3f3f46;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: transparent;
    background: transparent;
    transition: all 0.15s;
}
.habit-card-v2__checkbox:hover {
    border-color: #22c55e;
}
.habit-card-v2__checkbox--done {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}
.habit-card-v2__checkbox--skipped {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}
.habit-card-v2__info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.habit-card-v2__name {
    font-size: 14px;
    font-weight: 600;
    color: #e4e4e7;
}
.habit-card-v2__streak {
    font-size: 12px;
    color: #f59e0b;
    font-weight: 600;
    white-space: nowrap;
}
.habit-card-v2__actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}
.habit-card-v2__action-btn {
    width: 24px; height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.habit-card-v2__action-btn:hover {
    background: #272a34;
    color: #e4e4e7;
}
.habit-card-v2__action-btn--del:hover {
    color: #ef4444;
}

/* Week blocks */
.habit-card-v2__week-blocks {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.habit-card-v2__wblock {
    width: 22px; height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex: 1;
}
.habit-card-v2__wblock--done {
    background: #166534;
    color: #86efac;
}
.habit-card-v2__wblock--missed {
    background: #3f1823;
    color: #fca5a5;
}
.habit-card-v2__wblock--skipped {
    background: #452c04;
    color: #fcd34d;
}
.habit-card-v2__wblock--future {
    background: transparent;
    border: 1px dashed #3f3f46;
    color: transparent;
}

/* Habit intro row */
.habit-card-v2__intro {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Progress bar */
.habit-card-v2__progress {
    height: 5px;
    border-radius: 3px;
    background: #272a34;
    margin-bottom: 10px;
    overflow: hidden;
}
.habit-card-v2__progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

/* Delete mode checkbox */
.habit-card-v2__checkbox--del {
    border: 2px dashed #f26b68;
    color: transparent;
    transition: all 0.15s;
}
.habit-card-v2__checkbox--del:hover {
    border-color: #ef4444;
    background: rgba(239,68,68,0.1);
}
.habit-card-v2__checkbox--del-active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* Delete entry button */
.habit-delete-entry:hover {
    background: rgba(242,107,104,0.1) !important;
}
.habit-delete-active {
    animation: goalDeletePulse 1.5s ease-in-out infinite;
}

/* Bottom row */
.habit-card-v2__bottom {
    display: flex;
    align-items: center;
    gap: 12px;
}
.habit-card-v2__dim {
    font-size: 11px;
    font-weight: 600;
}
.habit-card-v2__week-stat {
    font-size: 11px;
    color: #6b7280;
    flex: 1;
}
.habit-card-v2__xp {
    font-size: 11px;
    font-weight: 700;
    color: #fbbf24;
    background: #451a03;
    padding: 2px 8px;
    border-radius: 10px;
}
.habit-card-v2__skipped-label {
    font-size: 11px;
    color: #6b7280;
    background: #272a34;
    padding: 2px 8px;
    border-radius: 10px;
}

/* --- Module 4 & 5: Bottom panels --- */
.habit-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.habit-panel {
    background: #1e2028;
    border-radius: 10px;
    padding: 18px;
}
.habit-panel__title {
    font-size: 14px;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.habit-panel__body {
    display: flex;
    flex-direction: column;
}
.habit-panel__empty {
    color: #6b7280;
    font-size: 12px;
    text-align: center;
    padding: 16px 0;
}

/* Streak ranking items */
.habit-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #272a34;
}
.habit-rank-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.habit-rank-item:first-child {
    padding-top: 0;
}
.habit-rank-item__icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.habit-rank-item__name {
    flex: 1;
    font-size: 13px;
    color: #e4e4e7;
}
.habit-rank-item__right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.habit-rank-item__streak {
    font-size: 18px;
    font-weight: 800;
    color: #f59e0b;
}
.habit-rank-item__badge {
    font-size: 12px;
    font-weight: 700;
    background: #272a34;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 22px;
    text-align: center;
}

/* SVG 图标样式（模态框预览 & 卡片渲染） */
#ai-icon-preview {
    overflow: hidden;
    line-height: 0;
}
#ai-icon-preview svg {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    display: block;
}
.habit-card__icon-svg {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    overflow: hidden;
    flex-shrink: 0;
    line-height: 0;
}
.habit-card__icon-svg svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block;
}
.habit-rank-item__icon {
    overflow: hidden;
    line-height: 0;
}
.habit-rank-item__icon svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: block;
}

/* Insight items */
.habit-insight-item {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #272a34;
    align-items: flex-start;
}
.habit-insight-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.habit-insight-item:first-child {
    padding-top: 0;
}
.habit-insight-item__dot {
    color: #22c55e;
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1.4;
}
.habit-insight-item__text {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

/* AI insight button */
.habit-insight-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #a78bfa;
    background: rgba(167,139,250,0.1);
    color: #a78bfa;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.habit-insight-btn:hover {
    background: rgba(167,139,250,0.2);
}

/* ================================================================
   Responsive — Habits
   ================================================================ */
@media (max-width: 1100px) {
    .habit-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 700px) {
    .habit-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .habit-cards-grid {
        grid-template-columns: 1fr;
    }
    .habit-bottom-row {
        grid-template-columns: 1fr;
    }
    .habit-week-overview__cols {
        flex-wrap: wrap;
    }
    .habit-week-col {
        min-width: 40px;
    }
    .habit-week-col__dots {
        width: 90%;
    }
    .habit-week-dot {
        width: 8px; height: 8px;
    }
}

/* ===== Rewards ===== */
.reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.reward-card {
    padding: 0;
    overflow: hidden;
}
.reward-card__image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, rgba(74,156,108,0.1), rgba(212,154,62,0.1));
    position: relative;
    overflow: hidden;
}
.reward-card__body {
    padding: 16px;
}
.reward-card__select {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px dashed rgba(200, 90, 74, 0.5);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #F26B68;
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s;
}
.reward-card__select--active {
    background: rgba(200, 90, 74, 0.25);
    border-color: #C85A4A;
    border-style: solid;
}
.reward-card__edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #A0A8A6;
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s;
}
.reward-card__edit-btn:hover {
    background: rgba(150, 216, 184, 0.15);
    color: #96D8B8;
    border-color: rgba(150, 216, 184, 0.3);
}
.reward-card__cond-check {
    color: #22c55e;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
    flex-shrink: 0;
}
.reward-card__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}
.reward-card__desc {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.reward-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Reward conditions inside card */
.reward-card__cond-section {
    margin-bottom: 6px;
}
.reward-card__cond-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.reward-card__conditions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px;
    background: #16181e;
    border-radius: 6px;
}
.reward-card__cond-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9ca3af;
}
.reward-card__cond-dot {
    color: #f59e0b;
    font-size: 6px;
    flex-shrink: 0;
}
.reward-card__cond-dot--claim {
    color: #22c55e;
}

/* Manual confirm button */
.reward-cond-manual-btn {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 10px;
    color: #9ca3af;
    background: transparent;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}
.reward-cond-manual-btn:hover {
    color: #d49a3e;
    border-color: #d49a3e;
    background: rgba(212,154,62,0.08);
}

/* Ambiguous condition hint */

/* Reward modal condition row */
.reward-condition-row .input {
    height: 36px;
    padding: 2px 10px;
    box-sizing: border-box;
    line-height: 1.4;
}
.reward-condition-row select option,
.reward-condition-row .input option {
    background: #2C2927;
    color: rgba(255, 255, 255, 0.92);
}

/* Reward icon picker */
.reward-icon-option {
    transition: all 0.15s;
}
.reward-icon-option:hover {
    background: rgba(212,154,62,0.2) !important;
    border-color: rgba(212,154,62,0.5) !important;
}
.reward-icon-option--active {
    border-color: var(--color-accent) !important;
    background: rgba(212,154,62,0.15) !important;
}

/* Reward card lock overlay */
.reward-card {
    position: relative;
}
.reward-card--locked .reward-card__image {
    position: relative;
}
.reward-card--locked {
    opacity: 0.7;
}
.reward-card__lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 2;
}
.reward-card__lock-icon {
    font-size: 32px;
    margin-bottom: 4px;
}
.reward-card__lock-text {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 1px;
}
.reward-card__claimed-badge {
    font-size: 13px;
    font-weight: 600;
    color: #22c55e;
    padding: 8px 0;
}

/* ================================================================
   奖励图片裁剪框（弹窗内）
   卡片图区实测 240×120，裁剪输出 240×240（见 rewards.js::REWARD_CROP_OUT）
   ================================================================ */
.reward-crop {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg-base);
    overflow: hidden;
    cursor: grab;
    user-select: none;
    touch-action: none;
}
/* 底图：拖动/缩放只改 transform，不重绘 */
.reward-crop__img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;      /* 别被全局 img 规则限制 */
    max-height: none;
    object-fit: fill;
    pointer-events: none; /* 事件统一由 .reward-crop 接 */
    -webkit-user-drag: none;
    z-index: 1;
}
/* 三分线参考 */
.reward-crop__grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background:
        linear-gradient(to right, transparent calc(33.333% - 0.5px), rgba(255,255,255,0.22) calc(33.333% - 0.5px), rgba(255,255,255,0.22) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
        linear-gradient(to right, transparent calc(66.666% - 0.5px), rgba(255,255,255,0.22) calc(66.666% - 0.5px), rgba(255,255,255,0.22) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px)),
        linear-gradient(to bottom, transparent calc(33.333% - 0.5px), rgba(255,255,255,0.22) calc(33.333% - 0.5px), rgba(255,255,255,0.22) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
        linear-gradient(to bottom, transparent calc(66.666% - 0.5px), rgba(255,255,255,0.22) calc(66.666% - 0.5px), rgba(255,255,255,0.22) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px));
}
.reward-crop__empty {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--color-text-muted);
    text-align: center;
    /* 让点击穿透到 .reward-crop 本体（由它统一处理「点框选图」）。
       空态/有图态的光标由 createCropStage::setVisible() 设置，别在这里写死。 */
    pointer-events: none;
}
.reward-crop__empty span:last-child {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.reward-crop__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}
.reward-crop__btn {
    font-size: 12px;
    font-family: inherit;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: rgba(255,255,255,0.05);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}
.reward-crop__btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.reward-crop__btn--danger:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
}
.reward-crop__hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.5;
}

/* Reward claim history */
.reward-history-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.reward-history-item {
    border-bottom: 1px solid var(--color-border);
}
.reward-history-item:last-child {
    border-bottom: none;
}
.reward-history-item__main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    cursor: pointer;
    transition: background 0.15s;
}
.reward-history-item__main:hover {
    background: rgba(255,255,255,0.02);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 4px;
}
.reward-history-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.reward-history-item__info {
    flex: 1;
}
.reward-history-item__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.reward-history-item__meta {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.reward-history-item__arrow {
    font-size: 14px;
    color: #6b7280;
    flex-shrink: 0;
}
.reward-history-item__detail {
    padding: 0 0 16px 52px;
}

/* ===== Quick add floating button ===== */

/* ================================================================
   Profile Stats Page — 个人主页
   ================================================================ */

/* --- Module 1: Stats Cards Grid --- */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.profile-stat-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    transition: all var(--transition-fast);
}
.profile-stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.profile-stat-card__label {
    font-size: 13px;
    color: var(--color-text-muted);
    white-space: nowrap;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.profile-stat-card__icon {
    flex-shrink: 0;
}
.profile-stat-card__icon svg {
    width: 16px; height: 16px;
    display: block;
}
.profile-stat-card__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

/* Section title with SVG icon (compact) */
.section__title--with-icon svg {
    width: 24px; height: 24px;
    display: block;
}

/* Profile heatmap title icon */

/* --- Module 2: Yearly Activity Heatmap --- */
.profile-heatmap {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    overflow-x: auto;
}
.profile-heatmap__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.profile-heatmap__grid {
    display: grid;
    grid-template-columns: repeat(53, 1fr);
    gap: 3px;
    width: 100%;
}
.profile-heatmap__cell {
    aspect-ratio: 1;
    width: 100%;
    border-radius: 3px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.profile-heatmap__cell:hover {
    outline: 2px solid var(--color-accent-light);
    outline-offset: 1px;
    transform: scale(1.4);
    z-index: 2;
}
.profile-heatmap__cell--empty { background: rgba(255, 255, 255, 0.04); }
.profile-heatmap__cell--placeholder { background: transparent; pointer-events: none; }
.profile-heatmap__cell--low   { background: rgba(212, 154, 62, 0.18); }
.profile-heatmap__cell--mid   { background: rgba(212, 154, 62, 0.35); }
.profile-heatmap__cell--high  { background: rgba(212, 154, 62, 0.55); }
.profile-heatmap__cell--peak  { background: rgba(212, 154, 62, 0.75); }
.profile-heatmap__cell--max   { background: rgba(212, 154, 62, 0.92); }

.profile-heatmap__months {
    display: grid;
    grid-template-columns: repeat(53, 1fr);
    gap: 3px;
    margin-top: 8px;
    width: 100%;
}
.profile-heatmap__month-label {
    font-size: 10px;
    color: var(--color-text-muted);
    text-align: left;
    white-space: nowrap;
}

.profile-heatmap__legend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 12px;
    justify-content: flex-end;
}
.profile-heatmap__legend .profile-heatmap__cell {
    cursor: default;
    width: 14px;
    height: 14px;
    aspect-ratio: auto;
}
.profile-heatmap__legend .profile-heatmap__cell:hover {
    outline: none;
    transform: none;
}

/* --- Module 3 & 4: Side-by-side Layout --- */
.profile-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.profile-radar-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.profile-radar-card .radar-chart-container {
    max-width: 380px;
    margin: 0 auto;
}

/* --- Module 4: Dimension XP Bars --- */
.profile-bars-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.profile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-bar__header {
    width: 110px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.profile-bar__icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.profile-bar__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
}
.profile-bar__level {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-left: 2px;
    white-space: nowrap;
}
.profile-bar__track {
    flex: 1;
    height: 14px;
    border-radius: var(--radius-full);
    overflow: hidden;
    min-width: 40px;
    position: relative;
}
.profile-bar__track-bg {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
}
.profile-bar__fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
    position: relative;
    z-index: 1;
}
.profile-bar__xp {
    width: 80px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent-light);
    flex-shrink: 0;
}

/* --- Profile Responsive --- */
@media (max-width: 1200px) {
    .profile-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-bottom-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 500px) {
    .profile-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .profile-stat-card__value {
        font-size: 20px;
    }
    .profile-bar__header {
        width: 90px;
    }
}

/* --- Module 5: Daily EXP Trend Chart --- */
.profile-trend-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.profile-trend__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.profile-trend__tabs {
    display: flex;
    gap: 4px;
}
.profile-trend__tab {
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-secondary);
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.profile-trend__tab:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text-primary);
}
.profile-trend__tab--active {
    background: var(--color-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent-light);
}
.profile-trend__chart {
    width: 100%;
    height: 280px;
    position: relative;
}
.profile-trend__chart canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 600px) {
    .profile-trend__header {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-trend__chart {
        height: 220px;
    }
}

/* ================================================================
   Action Center — 行动中心（4模块数据看板）
   ================================================================ */

/* --- Top row: 模块一 + 模块二 side by side --- */
.ac-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* --- Bottom row: 模块三 + 模块四 --- */
.ac-bottom-row {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
}

/* --- Module header shared --- */
.ac-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.ac-module-header__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.ac-module-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Mini select --- */
.ac-mini-select {
    padding: 4px 24px 4px 10px;
    background-color: rgba(255,255,255,0.08);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-family: var(--font-family);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--transition-fast);
}
.ac-mini-select option {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
}
.ac-mini-select:hover {
    border-color: rgba(255,255,255,0.2);
}
.ac-mini-select:focus {
    border-color: var(--color-accent);
}

/* --- Icon button --- */
.ac-icon-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.04);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.ac-icon-btn:hover {
    color: var(--color-text-primary);
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
}
.ac-icon-btn svg {
    width: 14px;
    height: 14px;
}

/* ================================================================
   Module 1: 升级进度条
   ================================================================ */
.ac-level-card {
    padding: 20px;
}
.ac-level-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ac-level-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ac-level-row__label {
    width: 110px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.ac-level-row__icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.ac-level-row__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
}
.ac-level-row__lv {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: var(--color-primary-bg);
    color: var(--color-primary-light);
    white-space: nowrap;
    line-height: 1.6;
}
.ac-level-row__bar-wrap {
    flex: 1;
    min-width: 40px;
}
.ac-level-row__bar {
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.ac-level-row__fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}
.ac-level-row__xp {
    width: 36px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent-light);
    flex-shrink: 0;
}

/* ================================================================
   Module 2: 动态播报
   ================================================================ */
.ac-activity-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.ac-activity-list {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
}
.ac-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}
.ac-activity-item--divider {
    border-bottom: 1px solid var(--color-border);
}
.ac-activity-item__left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 70px;
}
.ac-activity-item__icon {
    font-size: 18px;
}
.ac-activity-item__cat {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.ac-activity-item__mid {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ac-activity-item__xp {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent-light);
}
.ac-activity-item__desc {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-activity-item__time {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Activity Modal Overlay --- */
.ac-activity-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.ac-activity-panel {
    background: var(--color-bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 90vw;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: panelIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes panelIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ac-activity-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.ac-activity-panel__title {
    font-size: 18px;
    font-weight: 700;
}
.ac-activity-panel__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ac-activity-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 24px 24px;
}

/* ================================================================
   Module 3: 习惯打卡
   ================================================================ */
.ac-habit-module {
    padding: 20px;
}
.ac-habit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.ac-habit-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all var(--transition-fast);
}
.ac-habit-card:hover {
    border-color: rgba(255,255,255,0.15);
}
.ac-habit-card--done {
    border-color: rgba(92,173,108,0.25);
    background: rgba(92,173,108,0.06);
}
.ac-habit-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
}
.ac-habit-card__icon-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ac-habit-card__emoji {
    font-size: 22px;
    display: inline-flex;
    align-items: center;
}
.ac-habit-card__emoji svg {
    width: 22px;
    height: 22px;
    display: block;
}
.ac-habit-card__status {
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.ac-habit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.ac-habit-dot--done {
    background: var(--color-success);
    box-shadow: 0 0 6px rgba(92,173,108,0.4);
}
.ac-habit-card__progress {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ac-habit-card__bar {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.ac-habit-card__bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    transition: width 0.5s ease;
}
.ac-habit-card__pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent-light);
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}
.ac-habit-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ac-habit-card__streak {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ================================================================
   Module 4: 目标追踪
   ================================================================ */
.ac-goal-module {
    padding: 20px;
}
.ac-goal-list {
    display: flex;
    flex-direction: column;
}
.ac-goal-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}
.ac-goal-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.ac-goal-item__img {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--glass-border);
}
.ac-goal-item__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
}
.ac-goal-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}
.ac-goal-item__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.ac-goal-item__meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}
.ac-goal-item__dim {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    color: var(--color-text-muted);
}
.ac-goal-item__deadline {
    font-weight: 600;
    font-size: 12px;
}
.ac-goal-item__next-ms {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* AI-generated goal image (目标板块卡片) */
.goal-card__ai-img {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
}

/* ================================================================
   Responsive: Action Center
   ================================================================ */
@media (max-width: 1100px) {
    .ac-top-row {
        grid-template-columns: 1fr;
    }
    .ac-bottom-row {
        grid-template-columns: 1fr;
    }
    .ac-habit-grid {
        grid-template-columns: 1fr;
    }
    .ac-activity-list {
        max-height: 240px;
    }
}
@media (max-width: 600px) {
    .ac-level-row__label {
        width: 90px;
    }
    .ac-level-row__name {
        font-size: 12px;
    }
    .ac-activity-panel {
        width: 96vw;
        max-height: 90vh;
    }
    .ac-activity-item {
        flex-wrap: wrap;
    }
    .ac-activity-item__time {
        width: 100%;
        padding-left: 76px;
    }
}

/* ================================================================
   Module 5: 本周任务表格（全宽）
   ================================================================ */
.ac-task-module {
    padding: 20px;
    margin-top: 24px;
}

/* --- Toolbar buttons --- */
.ac-toolbar-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.04);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.ac-toolbar-btn:hover {
    color: var(--color-text-primary);
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
}
.ac-toolbar-btn:active {
    transform: scale(0.92);
}
.ac-toolbar-btn--active {
    color: var(--color-accent-light);
    border-color: var(--color-accent);
    background: var(--color-accent-bg);
}
.ac-toolbar-btn svg {
    width: 14px;
    height: 14px;
}

/* --- Table wrapper --- */
.ac-task-table-wrap {
    overflow-x: auto;
    margin: 0 -8px;
    padding: 0 8px;
}
.ac-task-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 900px;
}

/* --- Head --- */
.ac-task-head-row {
    border-bottom: 1px solid var(--color-border);
}
.ac-task-th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--color-text-muted);
    white-space: nowrap;
    user-select: none;
}
.ac-task-th--date {
    white-space: nowrap;
}
.ac-task-th--num {
    text-align: center;
}
.ac-task-th--xp {
    text-align: center;
}

/* --- Row --- */
.ac-task-row {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}
.ac-task-row:last-child {
    border-bottom: none;
}
.ac-task-row:hover {
    background: rgba(255,255,255,0.02);
}

/* --- Cell --- */
.ac-task-cell {
    padding: 12px;
    vertical-align: middle;
    color: var(--color-text-primary);
}

/* --- Checkbox --- */

/* --- Task name --- */
.ac-task-cell--task {
    font-weight: 600;
    white-space: nowrap;
}

/* --- Attribute --- */
.ac-task-attr {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 12px;
}

/* --- Number --- */
.ac-task-cell--num {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    font-size: 13px;
}

/* --- Progress bar --- */
.ac-task-cell--progress {
    min-width: 120px;
}
.ac-task-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ac-task-progress__bar {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    min-width: 60px;
}
.ac-task-progress__fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    transition: width 0.6s ease;
}
.ac-task-progress__text {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent-light);
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* --- Status tag --- */
.ac-task-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.ac-task-status--completed {
    background: rgba(107,163,184,0.15);
    color: var(--color-info);
}
.ac-task-status--in_progress {
    background: var(--color-primary-bg);
    color: var(--color-primary-light);
}
.ac-task-status--pending {
    background: rgba(255,255,255,0.06);
    color: var(--color-text-muted);
}

/* --- Date --- */
.ac-task-cell--date {
    white-space: nowrap;
    font-size: 12px;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
}

/* --- XP badge --- */
.ac-task-cell--xp {
    text-align: center;
}
.ac-task-xp {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    background: rgba(212,154,62,0.15);
    color: var(--color-accent-light);
    font-family: var(--font-mono);
}

/* --- Goal column --- */
.ac-task-cell--goal {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 160px;
}
.ac-task-goal {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: var(--color-text-muted);
}
.ac-task-goal--expanded {
    white-space: normal;
    overflow: visible;
}
.ac-task-expand {
    width: 20px;
    height: 20px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.04);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.ac-task-expand:hover {
    color: var(--color-text-primary);
    background: rgba(255,255,255,0.08);
}
.ac-task-expand svg {
    width: 10px;
    height: 10px;
}

/* --- Empty row --- */
.ac-task-empty {
    text-align: center;
    padding: 24px !important;
    color: var(--color-text-muted);
    font-size: 13px;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .ac-task-table {
        min-width: 900px;
    }
}

/* ================================================================
   开始行动 — 行动历史提示
   ================================================================ */
.qa-history-tip {
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
    padding: 12px 0 0;
    border-top: 1px solid var(--color-border);
    margin-top: 8px;
}

/* ================================================================
   行动历史页面 — Action History
   ================================================================ */

/* --- Stats chips --- */
.ah-stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}
.ah-stat-chip {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
    flex: 1;
}
.ah-stat-chip__label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ah-stat-chip__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -1px;
}
.ah-stat-chip__value--xp {
    color: var(--color-accent-light);
}

/* --- Filter card --- */
.ah-filter-card {
    padding: 16px;
    margin-bottom: 20px;
}
.ah-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ah-date-input {
    padding: 4px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-family: var(--font-family);
    outline: none;
    width: 130px;
    color-scheme: dark;
}
.ah-date-input:focus {
    border-color: var(--color-accent);
}
.ah-date-sep {
    font-size: 11px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* --- Table card --- */
.ah-table-card {
    padding: 20px;
}

/* --- Pagination --- */
.ah-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.ah-pager-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.03);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ah-pager-btn:hover {
    border-color: rgba(255,255,255,0.2);
    color: var(--color-text-primary);
    background: rgba(255,255,255,0.06);
}
.ah-pager-btn:disabled {
    opacity: 0.3;
    cursor: default;
}
.ah-pager-btn--active {
    background: var(--color-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent-light);
    font-weight: 700;
}
.ah-pager-dots {
    width: 32px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 12px;
}

/* --- 行动历史表格底栏：分页居中 + 导出右对齐 --- */
.ah-table-footer {
    display: flex;
    align-items: center;
    padding: 16px 0 4px;
    gap: 12px;
}
.ah-table-footer__pager {
    flex: 1;
    display: flex;
    justify-content: center;
}
.ah-table-footer__export {
    flex-shrink: 0;
}

/* --- Note cell in history table --- */
.ac-task-cell--note {
    max-width: 240px;
}

/* ================================================================
   Task Intro — 任务描述展开/收起
   ================================================================ */
.task-intro {
    margin-top: 4px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.task-intro__line {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    line-height: 1.5;
    transition: all 0.2s ease;
}
.task-intro--expanded .task-intro__line {
    white-space: normal;
    overflow: visible;
}
.task-intro__toggle {
    font-size: 11px;
    color: var(--color-accent-light);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    padding: 1px 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    line-height: 1.5;
}
.task-intro__toggle:hover {
    background: rgba(212,154,62,0.1);
    color: var(--color-accent);
}
/* Kanban card intro variant — slightly smaller */
.task-intro--kanban {
    margin-top: 2px;
}
.task-intro--kanban .task-intro__line {
    font-size: 11px;
}
.task-intro--kanban .task-intro__toggle {
    font-size: 10px;
}

/* ================================================================
   Task History — 历史任务页面
   ================================================================ */

/* --- Stats chips row --- */

/* --- Card list --- */
.task-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- History card --- */
.task-history-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: all var(--transition-fast);
}
.task-history-card:hover {
    border-color: rgba(255,255,255,0.15);
    box-shadow: var(--shadow-sm);
}
.task-history-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.task-history-card__icon {
    flex-shrink: 0;
    display: inline-flex;
}
.task-history-card__title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    min-width: 0;
}
.task-history-card__status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}
.task-history-card__status--done {
    background: rgba(92,173,108,0.12);
    color: var(--color-success);
}
.task-history-card__status--expired {
    background: rgba(242,107,104,0.12);
    color: #F26B68;
}
.task-history-card__status--active {
    background: rgba(96,165,250,0.12);
    color: #60A5FA;
}
.task-history-card--active {
    border-left: 3px solid #60A5FA;
}
.task-history-card__exp {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent-light);
    white-space: nowrap;
    flex-shrink: 0;
}
.task-history-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

/* --- History pagination --- */
.task-history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}
.task-history-pagination__btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.03);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.task-history-pagination__btn:hover:not(:disabled) {
    border-color: rgba(255,255,255,0.2);
    color: var(--color-text-primary);
    background: rgba(255,255,255,0.06);
}
.task-history-pagination__btn:disabled {
    opacity: 0.3;
    cursor: default;
}
.task-history-pagination__btn--active {
    background: var(--color-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent-light);
    font-weight: 700;
}
.task-history-pagination__ellipsis {
    width: 32px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 12px;
}

/* --- Task modal intro textarea --- */
.task-modal__intro {
    min-height: 70px;
    resize: vertical;
    font-size: 13px;
    line-height: 1.5;
}

/* --- History responsive --- */
@media (max-width: 600px) {
    .task-history-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    .task-history-stat {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
    .task-history-card__header {
        flex-wrap: wrap;
    }
    .task-history-card__exp {
        width: 100%;
        text-align: right;
    }
}

/* ================================================================
   Responsive — remaining
   ================================================================ */
@media (max-width: 1100px) {
    .ah-stats-row {
        flex-wrap: wrap;
    }
    .ah-stat-chip {
        min-width: 100px;
    }
    .ah-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    .ah-date-input {
        width: 100%;
    }

    .attr-intro-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .attr-intro-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   Section / Module SVG icons — action subpages
   ================================================================ */

/* Section title with icon (开始行动 subpage) */
.section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}
.section__title-icon svg {
    display: block;
    width: 32px;
    height: 32px;
}

/* Module header icon (行动中心 subpage) */
.ac-module-header__icon svg {
    display: inline-block;
    width: 34px;
    height: 34px;
    vertical-align: middle;
    margin-top: -4px;
}

/* Search wrapper with SVG icon (行动历史) */
.ah-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 180px;
}
.ah-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}
.ah-search-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}
.ah-search-input {
    padding-left: 36px !important;
}

/* ================================================================
   Task Type Tabs — 常规任务 / 定时任务 / 每周任务
   ================================================================ */
.task-type-tabs {
    display: flex;
    gap: 6px;
}
.task-type-tab {
    flex: 1;
    padding: 9px 0;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: #2C3231;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.task-type-tab:hover {
    background: #383F3D;
    color: var(--color-text-primary);
}
.task-type-tab--active {
    background: var(--color-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent-light);
}

/* Daily/weekly hint */
.task-daily-hint {
    padding: 8px 12px;
    background: rgba(212,154,62,0.08);
    border: 1px solid rgba(212,154,62,0.15);
    border-radius: 8px;
    font-size: 12px;
    color: var(--color-accent-light);
}

/* Weekday picker */
.weekday-picker {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
}
.weekday-btn {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: #2C3231;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.weekday-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent-light);
}
.weekday-btn--active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #1A1C1E;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(212,154,62,0.3);
}

/* Weekday presets */
.weekday-presets {
    display: flex;
    gap: 8px;
}
.weekday-preset-btn {
    flex: 1;
    padding: 7px 0;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: #2C3231;
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.weekday-preset-btn:hover {
    background: #383F3D;
    border-color: var(--color-text-muted);
    color: var(--color-text-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ================================================================
   Template Section — 定时/每周任务模板折叠区域
   ================================================================ */
.template-section {
    margin-top: 24px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: #242928;
    overflow: hidden;
}
.template-section__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}
.template-section__header:hover {
    background: rgba(255,255,255,0.02);
}
.template-section__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.template-section__badge {
    font-size: 11px;
    color: var(--color-accent-light);
    background: rgba(212,154,62,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}
.template-section__toggle {
    margin-left: auto;
    font-size: 12px;
    color: var(--color-text-muted);
}

.template-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
    border-top: 1px solid var(--glass-border);
}

/* Template list */
.template-list {
    border-top: 1px solid var(--glass-border);
    padding: 8px;
}

/* Template card */
.template-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s;
    gap: 12px;
}
.template-card:hover {
    background: rgba(255,255,255,0.03);
}
.template-card + .template-card {
    margin-top: 2px;
}
.template-card--inactive {
    opacity: 0.5;
}
.template-card__main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.template-card__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.template-card__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.template-card__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.template-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--color-text-muted);
}
.template-card__weekdays {
    display: flex;
    gap: 3px;
}
.template-card__day {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    background: rgba(212,154,62,0.15);
    color: var(--color-accent-light);
    font-size: 10px;
    font-weight: 600;
}
.template-card__schedule {
    color: var(--color-text-muted);
    font-size: 11px;
}

.template-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.template-card__toggle {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: #2C3231;
    color: var(--color-text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.template-card__toggle:hover {
    border-color: var(--color-accent);
}
.template-card__toggle--on {
    background: rgba(56,168,120,0.15);
    border-color: rgba(56,168,120,0.4);
    color: #38A878;
}
.template-card__edit {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.template-card__edit:hover {
    color: var(--color-info);
    border-color: rgba(107,163,184,0.3);
}
.template-card__del {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.template-card__del:hover {
    color: var(--color-danger);
    border-color: rgba(242,107,104,0.3);
}

/* ================================================================
   Dashboard — Pending Habits (replaces 八维属性概览 radar)
   ================================================================ */
.dash-habit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dash-habit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #1a1c22;
    border-radius: 8px;
    border: 1px solid #2a2d35;
    transition: background 0.15s;
}
.dash-habit-item:hover {
    background: #1e2028;
}
.dash-habit-item__icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dash-habit-item__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}
.dash-habit-item__name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-habit-item__cat {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    flex-shrink: 0;
}
.dash-habit-item__streak {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

.dash-habit-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    gap: 10px;
}
.dash-habit-empty__icon {
    font-size: 36px;
}
.dash-habit-empty__text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* Template responsive */
@media (max-width: 700px) {
    .template-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .template-card__actions {
        width: 100%;
    }
    .weekday-picker {
        flex-wrap: wrap;
    }
    .dash-habit-item__cat {
        display: none;
    }
}

/* ===== Skills ===== */

/* -- Skill Empty State -- */
.skill-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px 60px;
}
.skill-empty__visual {
    width: 220px;
    height: 200px;
    margin-bottom: 24px;
}
.skill-empty__title {
    color: var(--color-text-secondary, #e2e8f0);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}
.skill-empty__desc {
    color: var(--color-text-muted, #64748b);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 280px;
}
.skill-empty__btn {
    padding: 9px 18px;
    background: rgba(45, 212, 191, 0.1);
    color: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.skill-empty__btn:hover {
    background: rgba(45, 212, 191, 0.15);
    border-color: rgba(45, 212, 191, 0.5);
}
.skill-empty__btn--ghost {
    background: transparent;
    color: var(--color-text-muted, #94a3b8);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
}
.skill-empty__btn--ghost:hover {
    background: var(--glass-bg, rgba(255, 255, 255, 0.04));
    color: var(--color-text-secondary, #e2e8f0);
    border-color: rgba(255, 255, 255, 0.15);
}

.skill-lib-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 4px;
}

.skill-lib-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--glass-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 12px);
}

.skill-lib-item__icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;   /* 管理员上传的图标要裁到圆角内；emoji 占位不受影响 */
}

/* 管理员设置了图标时用图片，没设置则显示 📚 占位 */
.skill-lib-item__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.skill-lib-item__info {
    flex: 1;
    min-width: 0;
}

.skill-lib-item__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text, #e0e0e0);
    margin-bottom: 2px;
}

.skill-lib-item__desc {
    font-size: 12px;
    color: var(--color-text-muted, #666680);
    margin-bottom: 4px;
}

.skill-lib-item__btn {
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid #4fc3f7;
    background: transparent;
    color: #4fc3f7;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    flex-shrink: 0;
}
.skill-lib-item__btn:hover {
    background: rgba(79, 195, 247, 0.15);
}

/* 技能树查看器模态层 */
.skill-viewer-modal {
    position: fixed;
    top: 5vh;
    left: 5vw;
    width: 90vw;
    height: 90vh;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.skill-viewer-modal--visible {
    transform: scale(1);
    opacity: 1;
}

.skill-viewer-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: #16213e;
    border-bottom: 1px solid #2a2a4a;
    flex-shrink: 0;
}

.skill-viewer-modal__title {
    font-size: 15px;
    font-weight: 700;
    color: #4fc3f7;
}

.skill-viewer-modal__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-viewer-modal__close {
    background: transparent;
    border: none;
    color: #a0a0b0;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.skill-viewer-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.skill-viewer-modal__iframe {
    width: 100%;
    flex: 1;
    border: none;
}

/* ===== 我的技能 — 方形卡片网格 ===== */
.skill-mine-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0 4px;
}

@media (max-width: 1200px) {
    .skill-mine-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .skill-mine-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .skill-mine-list { grid-template-columns: 1fr; }
}

.skill-mine-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 12px);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    /* 各区域按 flex 比例分配高度 */
    min-height: 320px;
}

.skill-mine-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 195, 247, 0.35);
    box-shadow: 0 8px 28px rgba(79, 195, 247, 0.1);
}

/* 编辑按钮（右上角） */
.skill-mine-card__edit {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #8888a0;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
}
.skill-mine-card:hover .skill-mine-card__edit {
    opacity: 1;
}
.skill-mine-card__edit:hover {
    background: rgba(79, 195, 247, 0.15);
    color: #4fc3f7;
}

/* 图片区域 — flex: 5 → 50% */
.skill-mine-card__image {
    flex: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    min-height: 0;
    /* 「我的」角标要相对这里定位 */
    position: relative;
}
.skill-mine-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* 自定义图标角标：只有"我设过私有图"的卡片才出现 */
.skill-mine-card__custom-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 16px;
    color: #5eead4;
    background: rgba(45, 212, 191, 0.16);
    border: 1px solid rgba(45, 212, 191, 0.35);
    pointer-events: none;
}
.skill-mine-card__image-default {
    font-size: 48px;
    line-height: 1;
    opacity: 0.6;
}

/* 名称/备注行 — flex: 2 → 20% */
.skill-mine-card__name-row {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 0 14px;
    min-height: 0;
    overflow: hidden;
}
.skill-mine-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text, #e0e0e0);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.skill-mine-card__remark {
    font-size: 11px;
    color: #8888a0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 空状态占位文字 */
.skill-mine-card__empty-text {
    color: #555568;
    font-style: italic;
    font-size: 11px;
}

/* 简介 — flex: 2 → 20% */
.skill-mine-card__desc {
    flex: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0 14px;
    font-size: 11px;
    color: var(--color-text-muted, #666680);
    line-height: 1.4;
    min-height: 0;
}

/* 当前在学节点 — flex: 2 → 20% */
.skill-mine-card__learning {
    flex: 2;
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 12px;
    color: #4fc3f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 0;
}
.skill-mine-card__learning-icon {
    margin-right: 4px;
    font-size: 10px;
    flex-shrink: 0;
}

/* 进度区域 — flex: 1 → 10% */
.skill-mine-card__progress-area {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px 12px;
    min-height: 0;
}
.skill-mine-card__progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.skill-mine-card__progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #4fc3f7, #29b6f6);
    transition: width 0.4s ease;
}
.skill-mine-card__progress-text {
    font-size: 11px;
    color: #4fc3f7;
    background: rgba(79, 195, 247, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ===== 编辑弹窗 ===== */
.skill-edit-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 420px;
    max-width: 90vw;
    background: #1e1e32;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.skill-edit-modal--visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.skill-edit-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #16213e;
    border-bottom: 1px solid #2a2a4a;
    flex-shrink: 0;
}

.skill-edit-modal__title {
    font-size: 15px;
    font-weight: 700;
    color: #4fc3f7;
}

.skill-edit-modal__close {
    background: transparent;
    border: none;
    color: #a0a0b0;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.skill-edit-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.skill-edit-modal__body {
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.skill-edit-modal__section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-edit-modal__label {
    font-size: 13px;
    font-weight: 600;
    color: #c0c0d0;
}

/* 裁剪舞台：正方形框，拖拽移动 / 滚轮缩放 / 保存时按框裁剪成 1:1 */
.skill-edit-crop {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    touch-action: none;
    transition: border-color 0.2s, background 0.2s;
}
.skill-edit-crop:hover {
    border-color: rgba(79, 195, 247, 0.35);
}
.skill-edit-crop--dragover {
    border-color: #4fc3f7;
    background: rgba(79, 195, 247, 0.08);
}

/* 底图：只靠 transform 摆位，避免重绘 */
.skill-edit-crop__img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    max-height: none;
    object-fit: fill;
    pointer-events: none;
    -webkit-user-drag: none;
    z-index: 1;
}

/* 三分线参考 */
.skill-edit-crop__grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background:
        linear-gradient(to right, transparent calc(33.333% - 0.5px), rgba(255,255,255,0.18) calc(33.333% - 0.5px), rgba(255,255,255,0.18) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
        linear-gradient(to right, transparent calc(66.666% - 0.5px), rgba(255,255,255,0.18) calc(66.666% - 0.5px), rgba(255,255,255,0.18) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px)),
        linear-gradient(to bottom, transparent calc(33.333% - 0.5px), rgba(255,255,255,0.18) calc(33.333% - 0.5px), rgba(255,255,255,0.18) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
        linear-gradient(to bottom, transparent calc(66.666% - 0.5px), rgba(255,255,255,0.18) calc(66.666% - 0.5px), rgba(255,255,255,0.18) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px));
}

.skill-edit-crop__empty {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #666680;
    text-align: center;
    pointer-events: none;
}

.skill-edit-crop__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}
.skill-edit-crop__btn {
    font-size: 12px;
    font-family: inherit;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #c8c8d8;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.skill-edit-crop__btn:hover {
    border-color: #4fc3f7;
    color: #4fc3f7;
}

/* 「重新选择图片」是换图的**主动作** → 高亮出来，别和「重置」长得一样 */
.skill-edit-crop__btn--primary {
    border-color: rgba(79, 195, 247, 0.55);
    background: rgba(79, 195, 247, 0.12);
    color: #7dd3fc;
    font-weight: 600;
}
.skill-edit-crop__btn--primary:hover {
    border-color: #4fc3f7;
    background: rgba(79, 195, 247, 0.2);
    color: #a5e3ff;
}

.skill-edit-modal__hint {
    margin-top: 10px;
    font-size: 11px;
    color: #555568;
    text-align: center;
}

.skill-edit-modal__upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #666680;
}
.skill-edit-modal__upload-icon {
    font-size: 36px;
    opacity: 0.6;
}
.skill-edit-modal__upload-text {
    font-size: 14px;
    color: #8888a0;
}
.skill-edit-modal__upload-hint {
    font-size: 11px;
    color: #555568;
}
.skill-edit-modal__upload-clear {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 80, 80, 0.85);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.skill-edit-modal__upload-clear:hover {
    background: #ff4040;
}

/* 备注输入框 */
.skill-edit-modal__textarea {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    color: #d0d0e0;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}
.skill-edit-modal__textarea:focus {
    border-color: #4fc3f7;
}
.skill-edit-modal__textarea::placeholder {
    color: #555568;
}

.skill-edit-modal__info {
    font-size: 11px;
    color: #555568;
    line-height: 1.4;
}

/* 底部按钮 */
.skill-edit-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid #2a2a4a;
    flex-shrink: 0;
}

.skill-edit-modal__btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border: none;
}

.skill-edit-modal__btn--cancel {
    background: rgba(255, 255, 255, 0.06);
    color: #a0a0b0;
}
.skill-edit-modal__btn--cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.skill-edit-modal__btn--save {
    background: #4fc3f7;
    color: #0a0a1a;
}
.skill-edit-modal__btn--save:hover {
    background: #39b0e4;
}

/* ===== 技能详情弹窗（库中查看） ===== */
.skill-detail-modal {
    position: fixed;
    top: 10vh;
    left: 10vw;
    width: 80vw;
    height: 80vh;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.skill-detail-modal--visible {
    transform: scale(1);
    opacity: 1;
}

.skill-detail-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #16213e;
    border-bottom: 1px solid #2a2a4a;
    flex-shrink: 0;
}

.skill-detail-modal__title {
    font-size: 15px;
    font-weight: 700;
    color: #4fc3f7;
}

.skill-detail-modal__close {
    background: transparent;
    border: none;
    color: #a0a0b0;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.skill-detail-modal__close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.skill-detail-modal__body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* 左侧：信息区 */
.skill-detail-modal__left {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    border-right: 1px solid #2a2a4a;
}

.skill-detail-modal__info-row {
    margin-bottom: 16px;
}

.skill-detail-modal__info-label {
    font-size: 12px;
    color: #666680;
    margin-bottom: 3px;
}

.skill-detail-modal__info-value {
    font-size: 14px;
    color: #e0e0e0;
    line-height: 1.5;
}

.skill-detail-modal__info-value--dim {
    color: #8888a0;
    font-size: 13px;
}

.skill-detail-modal__left-bottom {
    margin-top: auto;
    padding-top: 16px;
    text-align: center;
}

.skill-detail-modal__add-btn {
    padding: 8px 32px;
    border-radius: 8px;
    border: 1px solid #4fc3f7;
    background: transparent;
    color: #4fc3f7;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.skill-detail-modal__add-btn:hover {
    background: #4fc3f7;
    color: #000;
}

.skill-detail-modal__add-btn--added {
    border-color: #4ade80;
    color: #4ade80;
    cursor: default;
}

.skill-detail-modal__add-btn--added:hover {
    background: transparent;
    color: #4ade80;
}

/* 右侧：树图预览区 */
.skill-detail-modal__right {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #12121f;
    min-width: 0;
}

.skill-detail-modal__preview {
    width: 100%;
    flex: 1;
    border: none;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: var(--glass-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    border-radius: var(--radius-xl, 16px);
    padding: 40px 32px 28px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(12px);
}

.login-logo {
    width: 48px;
    height: 48px;
    color: var(--color-accent-light, #4fc3f7);
    margin: 0 auto 12px;
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text, #e0e0e0);
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--color-text-muted, #666680);
    margin-bottom: 28px;
}

.login-prompt {
    font-size: 14px;
    color: var(--color-text-secondary, #a0a0b0);
    margin-bottom: 16px;
}

.login-users {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.login-loading {
    color: var(--color-text-muted, #666680);
    font-size: 14px;
    padding: 24px 0;
}

.login-error {
    color: #ef5350;
    font-size: 14px;
    padding: 16px;
    background: rgba(239,83,80,0.08);
    border-radius: 10px;
    line-height: 1.6;
}

.login-retry-btn {
    margin-top: 12px;
    padding: 8px 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    border-radius: 8px;
    color: var(--color-text, #e0e0e0);
    cursor: pointer;
    font-size: 13px;
}
.login-retry-btn:hover {
    background: rgba(255,255,255,0.1);
}

.login-hint {
    font-size: 11px;
    color: var(--color-text-muted, #4a4a5a);
}

.login-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.06));
    border-radius: var(--radius-lg, 12px);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: left;
}
.login-user-card:hover {
    border-color: rgba(79,195,247,0.4);
    background: rgba(255,255,255,0.06);
}

.login-user-card__icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    flex-shrink: 0;
}

.login-user-card__info {
    flex: 1;
    min-width: 0;
}

.login-user-card__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text, #e0e0e0);
    margin-bottom: 2px;
}

.login-user-card__role {
    font-size: 12px;
    color: var(--color-text-muted, #666680);
}

.login-user-card__arrow {
    font-size: 18px;
    color: var(--color-text-muted, #4a4a5a);
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}
.login-user-card:hover .login-user-card__arrow {
    transform: translateX(4px);
    color: #4fc3f7;
}

/* ================================================================
   Agent — 表达训练系统
   ================================================================ */

/* 全局容器 */
.expr {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 16px;
}

/* 顶栏 — 滑块容器内嵌在 page-header 右侧 */
.expr__tabs {
    position: relative;
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
    cursor: pointer;
    flex-shrink: 0;
}
.expr__tab {
    position: relative;
    z-index: 2;
    padding: 7px 22px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    border-radius: 8px;
    transition: color 0.3s ease;
    user-select: none;
}
.expr__tab--active {
    color: var(--color-text-primary);
}
.expr__tab-slider {
    position: absolute;
    z-index: 1;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: var(--color-bg-secondary);
    border-radius: 7px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.expr__tab:nth-child(3).expr__tab--active ~ .expr__tab-slider {
    transform: translateX(100%);
}

/* 视图容器 */
.expr__body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.expr__view {
    display: none;
    height: 100%;
}
.expr__view--active {
    display: block;
}

/* 空状态 */
.expr__empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--color-text-muted);
}
.expr__empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.expr__empty-text {
    font-size: 15px;
    opacity: 0.7;
}

/* ===== 卡片 ===== */
.expr__card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}
.expr__card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

/* ===== 训练首页布局 ===== */
.expr__train-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    height: 100%;
}
.expr__train-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}
.expr__train-sidebar {
    flex-shrink: 0;
}

/* 题型选择器 */
.expr__type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.expr__type-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}
.expr__type-btn:hover {
    border-color: var(--type-color, var(--color-accent));
    background: rgba(255,255,255,0.05);
}
.expr__type-btn--active {
    border-color: var(--type-color, var(--color-accent));
    background: color-mix(in srgb, var(--type-color, var(--color-accent)) 12%, transparent);
    color: var(--color-text-primary);
}
.expr__type-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--type-color, var(--color-accent));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}
.expr__type-btn--active .expr__type-check {
    opacity: 1;
}

/* 生成按钮 */
.expr__gen-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #B794F6, #8B5CF6);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
}
.expr__gen-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.expr__gen-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.expr__gen-btn-text {
    display: block;
}
.expr__gen-btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.expr__custom-question {
    position: relative;
}
.expr__custom-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}
.expr__custom-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}
.expr__custom-input::placeholder {
    color: var(--color-text-muted);
    font-size: 13px;
}
/* 自定义问题模式选择 + AI 美化 */
.expr__custom-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.expr__custom-select {
    padding: 5px 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 12px;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
}
.expr__custom-select:focus {
    border-color: var(--color-accent);
}
.expr__beautify-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.expr__beautify-btn {
    padding: 5px 12px;
    font-size: 12px;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}
.expr__beautify-btn:hover:not(:disabled) {
    opacity: 0.85;
}
.expr__beautify-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.expr__undo-btn {
    padding: 5px 10px;
    font-size: 12px;
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}
.expr__undo-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.expr__detail-ai-btn {
    display: inline-flex !important;
}

/* 加载动画 */
.expr__spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: expr-spin 0.6s linear infinite;
}
@keyframes expr-spin {
    to { transform: rotate(360deg); }
}

/* ===== 统计面板 ===== */
.expr__stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.expr__stats-loading {
    color: var(--color-text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}
.expr__stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}
.expr__stats-item:last-child {
    border-bottom: none;
}
.expr__stats-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1.2;
}
.expr__stats-label {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.expr__stats-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}
.expr__stats-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}
.expr__stats-type-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.expr__stats-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.expr__stats-type-name {
    flex: 1;
    color: var(--color-text-secondary);
}
.expr__stats-type-count {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* ===== 历史记录列表 ===== */
.expr__history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.expr__history-empty {
    color: var(--color-text-muted);
    font-size: 13px;
    text-align: center;
    padding: 24px;
}
.expr__history-item {
    position: relative;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}
.expr__history-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
}
.expr__history-question {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.expr__history-answer {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.expr__history-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}
.expr__history-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}
.expr__history-type.hot_opinion { background: rgba(255,107,107,0.15); color: #FF6B6B; }
.expr__history-type.emotional { background: rgba(244,114,182,0.15); color: #F472B6; }
.expr__history-type.life_reflection { background: rgba(52,211,153,0.15); color: #34D399; }
.expr__history-type.career { background: rgba(96,165,250,0.15); color: #60A5FA; }
.expr__history-score {
    color: #FBBF24;
    font-weight: 600;
}
.expr__history-date {
    color: var(--color-text-muted);
    margin-left: auto;
}

/* 历史记录悬浮弹窗 */
.expr__history-popup {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 200;
    margin-top: 6px;
    background: var(--color-bg-secondary, #1a1a2e);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    backdrop-filter: blur(12px);
}
.expr__history-popup-content {
    padding: 16px;
    position: relative;
}
.expr__history-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 16px;
    opacity: 0.8;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(0,0,0,0.2);
}
.expr__history-popup-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.4);
}
.expr__history-popup-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.expr__history-popup-text {
    font-size: 13px;
    color: var(--color-text-primary);
    line-height: 1.8;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px 10px;
    background: rgba(0,0,0,0.15);
    border-radius: 6px;
}

/* ===== 答题布局 ===== */
.expr__answer-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 16px;
    height: 100%;
}
.expr__answer-main {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.expr__answer-sidebar {
    flex-shrink: 0;
}

/* 题目卡片 */
.expr__question-card {
    border-left: 3px solid #B794F6;
}
.expr__question-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.expr__question-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.expr__question-type.hot_opinion { background: rgba(255,107,107,0.15); color: #FF6B6B; }
.expr__question-type.emotional { background: rgba(244,114,182,0.15); color: #F472B6; }
.expr__question-type.life_reflection { background: rgba(52,211,153,0.15); color: #34D399; }
.expr__question-type.career { background: rgba(96,165,250,0.15); color: #60A5FA; }
.expr__question-type.custom { background: rgba(183,148,246,0.15); color: #B794F6; }
.expr__question-attempt {
    font-size: 11px;
    color: var(--color-text-muted);
}
.expr__question-text {
    font-size: 15px;
    color: var(--color-text-primary);
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 控制按钮 */
.expr__answer-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.expr__ctrl-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--glass-bg);
    color: var(--color-text-secondary);
    user-select: none;
}
.expr__ctrl-btn:hover:not(:disabled) {
    border-color: var(--color-accent);
    color: var(--color-text-primary);
}
.expr__ctrl-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.expr__ctrl-btn--start { color: #34D399; }
.expr__ctrl-btn--start:hover:not(:disabled) { border-color: #34D399; background: rgba(52,211,153,0.1); }
.expr__ctrl-btn--pause { color: #FBBF24; }
.expr__ctrl-btn--pause:hover:not(:disabled) { border-color: #FBBF24; background: rgba(251,191,36,0.1); }
.expr__ctrl-btn--done { color: #60A5FA; }
.expr__ctrl-btn--done:hover:not(:disabled) { border-color: #60A5FA; background: rgba(96,165,250,0.1); }

/* 录音状态指示器 */
.expr__recording-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.expr__recording-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
    animation: expr-recording-pulse 1.5s ease-in-out infinite;
}
.expr__recording-label {
    font-size: 12px;
    color: #EF4444;
    font-weight: 500;
}
@keyframes expr-recording-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* 麦克风诊断弹窗 */
.expr__diag {
    min-width: 420px;
    max-width: 520px;
}
.expr__diag-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}
.expr__diag-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.expr__diag-tab:hover {
    color: var(--color-text);
    background: rgba(255,255,255,0.04);
}
.expr__diag-tab--active {
    color: var(--color-accent);
    background: rgba(99,102,241,0.1);
}
.expr__diag-body {
    min-height: 260px;
}
.expr__diag-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.expr__diag-actions {
    display: flex;
    gap: 10px;
}
.expr__diag-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
}
.expr__diag-btn:hover:not(:disabled) {
    border-color: var(--color-accent);
    background: rgba(99,102,241,0.08);
}
.expr__diag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.expr__diag-btn--stop { color: #EF4444; }
.expr__diag-btn--stop:hover:not(:disabled) { border-color: #EF4444; background: rgba(239,68,68,0.08); }

/* 音量条 */
.expr__diag-volume {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 80px;
    padding: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}
.expr__diag-volume-bar {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
}
.expr__diag-volume-fill {
    width: 0%;
    height: 100%;
    border-radius: 4px;
    transition: width 0.08s ease, background 0.2s ease;
    min-height: 4px;
}

/* 实时监听开关 */
.expr__diag-monitor {
    display: flex;
    align-items: center;
    gap: 10px;
}
.expr__diag-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
}
.expr__diag-toggle:hover:not(:disabled) {
    border-color: var(--color-accent);
}
.expr__diag-toggle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.expr__diag-hint {
    font-size: 11px;
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* 倒计时 */
.expr__diag-countdown {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}
.expr__diag-countdown-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
}
.expr__diag-countdown-unit {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* 识别结果 */
.expr__diag-result {
    min-height: 60px;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
}
.expr__diag-result-placeholder {
    color: var(--color-text-muted);
    opacity: 0.5;
}
.expr__diag-result-text {
    color: var(--color-text);
}

/* 标签 & 状态 */
.expr__diag-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.expr__diag-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.expr__diag-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    font-size: 12px;
    color: var(--color-text-muted);
}
.expr__diag-status-idle { color: var(--color-text-muted); }
.expr__diag-status-connecting { color: #FBBF24; }
.expr__diag-status-listening { color: #34D399; }
.expr__diag-status-success { color: #34D399; }
.expr__diag-status-error { color: #EF4444; }

/* 答题控制区按钮布局 */
.expr__answer-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.expr__ctrl-group {
    display: flex;
    gap: 8px;
}
.expr__ctrl-btn--mic-test {
    margin-left: auto;
    color: #818CF8;
    font-size: 12px;
    padding: 6px 10px;
}
.expr__ctrl-btn--mic-test:hover:not(:disabled) {
    border-color: #818CF8;
    background: rgba(129,140,248,0.1);
}

/* 回答显示区 */
.expr__answer-display {
    min-height: 180px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}
.expr__answer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: var(--color-text-muted);
    text-align: center;
    gap: 8px;
}
.expr__answer-placeholder p {
    font-size: 13px;
    opacity: 0.6;
}
.expr__answer-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
    min-height: 80px;
    padding: 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
}
.expr__answer-content:focus {
    background: rgba(255,255,255,0.04);
}

/* 填充词高亮 */
.expr__filler-highlight {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.12);
    border-bottom: 2px wavy #EF4444;
    padding: 0 2px;
    border-radius: 2px;
}

/* AI 分析按钮 */
.expr__ai-section {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.expr__ai-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #B794F6, #8B5CF6);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.expr__ai-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.expr__ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.expr__back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.expr__back-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* 草稿恢复卡片 */
.expr__draft-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.02));
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.expr__draft-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.expr__draft-icon {
    font-size: 18px;
}
.expr__draft-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.expr__draft-question {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
}
.expr__draft-preview {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding: 0 2px;
    font-style: italic;
}
.expr__draft-actions {
    display: flex;
    gap: 10px;
}
.expr__draft-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.expr__draft-btn--resume {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    color: #1a1a2e;
}
.expr__draft-btn--resume:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}
.expr__draft-btn--discard {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.expr__draft-btn--discard:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* AI 分析结果 */
.expr__evaluation {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}
.expr__eval-header {
    display: flex;
    gap: 24px;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}
.expr__eval-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}
.expr__eval-score {
    font-size: 44px;
    font-weight: 800;
    color: #B794F6;
    line-height: 1;
}
.expr__eval-label {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.expr__eval-dims {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}
.expr__eval-dim {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.expr__eval-dim-bar {
    height: 6px;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.expr__eval-dim-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* 填充词分析 */
.expr__eval-filler {
    padding: 14px 20px;
    border-bottom: 1px solid var(--glass-border);
}
.expr__eval-filler-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.expr__filler-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.expr__filler-tag--high {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}
.expr__filler-tag--mid {
    background: rgba(251, 191, 36, 0.15);
    color: #FBBF24;
}
.expr__filler-tag--low {
    background: rgba(96, 165, 250, 0.12);
    color: #60A5FA;
}
.expr__filler-total {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-left: 4px;
    display: flex;
    align-items: center;
}

/* 评价正文 */
.expr__eval-body {
    padding: 16px 20px;
}
.expr__eval-section {
    margin-bottom: 16px;
}
.expr__eval-section:last-child {
    margin-bottom: 0;
}
.expr__eval-section-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}
.expr__eval-section-title--good { color: #34D399; }
.expr__eval-section-title--warn { color: #FBBF24; }
.expr__eval-section-title--tip { color: #60A5FA; }
.expr__eval-list {
    margin: 0;
    padding-left: 18px;
}
.expr__eval-list li {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 4px;
}
.expr__eval-suggestion {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.8;
    padding: 10px 14px;
    background: rgba(96, 165, 250, 0.06);
    border-radius: var(--radius-md);
    border: 1px solid rgba(96, 165, 250, 0.12);
}

/* ===== 提示面板 ===== */
.expr__hints {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.expr__hints-empty {
    color: var(--color-text-muted);
    font-size: 13px;
    text-align: center;
    padding: 24px;
}
.expr__hint-group {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.expr__hint-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}
.expr__hint-toggle:hover {
    background: rgba(255,255,255,0.04);
    color: var(--color-text-primary);
}
.expr__hint-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.expr__hint-toggle--open .expr__hint-arrow {
    transform: rotate(180deg);
}

/* 提示方向 */
.expr__hint-direction {
    padding: 0 14px 12px;
}
.expr__hint-loading {
    font-size: 12px;
    color: var(--color-text-muted);
    padding: 8px 0;
    opacity: 0.7;
}
.expr__hint-direction-text {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}
.expr__hint-examples-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(183, 148, 246, 0.1);
    border: 1px solid rgba(183, 148, 246, 0.2);
    border-radius: 6px;
    color: #B794F6;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.expr__hint-examples-toggle:hover {
    background: rgba(183, 148, 246, 0.18);
    border-color: rgba(183, 148, 246, 0.35);
}
.expr__hint-examples-arrow {
    transition: transform 0.2s ease;
}
.expr__hint-examples {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}
.expr__hint-example {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.7;
    padding: 2px 0;
}

/* ===== 响应式 ===== */
/* ================================================================
   表达训练 — 历史视图（筛选栏 + 问题列表 + 分页）
   ================================================================ */

/* 筛选栏 */
.expr__history-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    align-items: flex-end;
}
.expr__filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 1;
}
.expr__filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.expr__filter-select {
    padding: 8px 12px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}
.expr__filter-select:hover,
.expr__filter-select:focus {
    border-color: var(--color-accent);
}
.expr__filter-select option {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 8px;
}

/* 历史问题列表容器 */
.expr__history-question-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 单条历史问题条目 */
.expr__history-question-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.expr__history-question-item:hover {
    border-color: rgba(255,255,255,0.1);
}
.expr__history-question-item--expanded {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.2);
}

/* 条目头部（可点击展开） */
.expr__history-question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.expr__history-question-header:hover {
    background: rgba(255,255,255,0.03);
}
.expr__history-question-info {
    flex: 1;
    min-width: 0;
}
.expr__history-question-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.expr__history-question-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--color-text-muted);
}
.expr__history-question-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.expr__history-question-type.hot_opinion { background: rgba(255,107,107,0.15); color: #FF6B6B; }
.expr__history-question-type.emotional { background: rgba(244,114,182,0.15); color: #F472B6; }
.expr__history-question-type.life_reflection { background: rgba(52,211,153,0.15); color: #34D399; }
.expr__history-question-type.career { background: rgba(96,165,250,0.15); color: #60A5FA; }
.expr__history-question-count {
    display: flex;
    align-items: center;
    gap: 4px;
}
.expr__history-question-time {
    display: flex;
    align-items: center;
    gap: 4px;
}
.expr__history-expand-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: transform 0.3s ease;
}
.expr__history-expand-icon--open {
    transform: rotate(180deg);
}

/* 展开区域（作答记录列表） */
.expr__history-answers-container {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    max-height: 0;
    opacity: 0;
}
.expr__history-answers-container--open {
    max-height: 600px;
    opacity: 1;
}
.expr__history-answers-inner {
    border-top: 1px solid var(--glass-border);
    padding: 8px 18px 14px;
}

/* 单条作答行 */
.expr__history-answer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: background 0.2s;
    position: relative;
}
.expr__history-answer-row:hover {
    background: rgba(255,255,255,0.04);
}
.expr__history-answer-row + .expr__history-answer-row {
    border-top: 1px solid var(--glass-border);
    margin-top: 0;
}
.expr__answer-attempt {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-secondary);
}
.expr__answer-info {
    flex: 1;
    min-width: 0;
}
.expr__answer-time {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}
.expr__answer-text {
    font-size: 13px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.expr__answer-detail-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.expr__answer-detail-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--color-accent);
}

/* 悬浮弹窗 */
.expr__hover-popup {
    position: absolute;
    z-index: 100;
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    background: var(--color-bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.expr__hover-popup--visible {
    opacity: 1;
    transform: translateY(0);
}
.expr__hover-popup-text {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
}

/* 分页控件 */
.expr__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0 8px;
}
.expr__page-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}
.expr__page-btn:hover:not(:disabled):not(.expr__page-btn--active) {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.expr__page-btn--active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.expr__page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.expr__page-info {
    font-size: 12px;
    color: var(--color-text-muted);
    padding: 0 8px;
}

/* ================================================================
   表达训练 — 历史详情页面
   ================================================================ */

/* 详情页整体布局 */
.expr__detail-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    height: 100%;
    overflow: hidden;
}

/* 左侧边栏 */
.expr__detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}
.expr__detail-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.expr__detail-back-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.expr__detail-sidebar-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.expr__detail-sidebar-item {
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}
.expr__detail-sidebar-item:hover {
    border-color: rgba(255,255,255,0.1);
}
.expr__detail-sidebar-item--active {
    border-color: var(--color-accent);
    background: rgba(139, 92, 246, 0.08);
}
.expr__detail-sidebar-q {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}
.expr__detail-sidebar-time {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* 右侧主内容区 */
.expr__detail-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 4px;
}
.expr__detail-question-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.expr__detail-question-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.expr__detail-question-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.expr__detail-question-type.hot_opinion { background: rgba(255,107,107,0.15); color: #FF6B6B; }
.expr__detail-question-type.emotional { background: rgba(244,114,182,0.15); color: #F472B6; }
.expr__detail-question-type.life_reflection { background: rgba(52,211,153,0.15); color: #34D399; }
.expr__detail-question-type.career { background: rgba(96,165,250,0.15); color: #60A5FA; }
.expr__detail-question-type.custom { background: rgba(183,148,246,0.15); color: #B794F6; }
.expr__detail-answer-again-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #B794F6, #8B5CF6);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s;
}
.expr__detail-answer-again-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}
.expr__detail-question-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.5;
}

/* 第X次回答按钮组 */
.expr__detail-attempt-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.expr__detail-attempt-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}
.expr__detail-attempt-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.expr__detail-attempt-btn--active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.expr__detail-attempt-btn--active:hover {
    color: #fff;
}

/* 回答内容展示区 */
.expr__detail-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.expr__detail-content-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}
.expr__detail-answer-text {
    font-size: 14px;
    color: var(--color-text-primary);
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 20px;
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
}
.expr__detail-evaluation {
    padding: 0;
}

/* 在详情页中复用评分样式 */
.expr__detail-evaluation .expr__eval-header {
    margin-bottom: 16px;
}

/* 空状态 */
.expr__detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}
.expr__detail-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.expr__detail-empty-text {
    font-size: 14px;
}

/* 加载状态 */
.expr__history-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--color-text-muted);
    font-size: 14px;
    gap: 8px;
}

/* 滚动条美化 */
.expr__detail-sidebar-list::-webkit-scrollbar,
.expr__detail-main::-webkit-scrollbar {
    width: 4px;
}
.expr__detail-sidebar-list::-webkit-scrollbar-thumb,
.expr__detail-main::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

@media (max-width: 900px) {
    .expr__train-layout {
        grid-template-columns: 1fr;
    }
    .expr__answer-layout {
        grid-template-columns: 1fr;
    }
    .expr__train-sidebar {
        order: -1;
    }
    .expr__eval-header {
        flex-direction: column;
        align-items: center;
    }
    .expr__detail-layout {
        grid-template-columns: 1fr;
    }
    .expr__detail-sidebar {
        max-height: 200px;
    }
    .expr__history-filter {
        flex-direction: column;
    }
    .expr__filter-group {
        min-width: 0;
    }
}

/* ================================================================
   用户中心
   ================================================================ */
.usercenter-card {
    margin-bottom: 20px;
}
.usercenter-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border-light);
}
.usercenter-card__header-icon {
    font-size: 18px;
}

/* 基础信息 */
.usercenter-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}
.usercenter-profile__badge {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}
.usercenter-profile__body {
    flex: 1;
    min-width: 0;
}
.usercenter-profile__name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.usercenter-profile__name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}
.usercenter-profile__role {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--color-bg-high);
    color: var(--color-text-secondary);
}
.usercenter-profile__role--admin {
    background: var(--color-accent-bg);
    color: var(--color-accent-light);
}
.usercenter-info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}
.usercenter-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--color-border-light);
}
.usercenter-info-row__label {
    font-size: 13px;
    color: var(--color-text-muted);
}
.usercenter-info-row__value {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* 模型信息 */
.usercenter-loading {
    padding: 30px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}
.usercenter-model-group {
    margin-bottom: 22px;
}
.usercenter-model-group:last-child {
    margin-bottom: 0;
}
.usercenter-model-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.usercenter-model-group__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.5px;
}
.usercenter-model-add {
    font-size: 12px;
    color: var(--color-primary-light);
    background: none;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.usercenter-model-add:hover {
    border-color: var(--color-primary-light);
    background: var(--color-primary-bg);
}
.usercenter-model-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.usercenter-model-empty {
    padding: 18px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 12px;
    border: 1px dashed var(--color-border-light);
    border-radius: var(--radius-md);
}
.usercenter-model-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-fast);
}
.usercenter-model-card:hover {
    background: var(--color-bg-surface);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.usercenter-model-card--active {
    border-left: 3px solid var(--color-accent);
    background: linear-gradient(90deg, var(--color-accent-bg), transparent 45%);
}
.usercenter-model-card__main {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    position: relative;
}
.usercenter-model-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}
.usercenter-model-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.usercenter-model-card__model {
    font-size: 12px;
    color: var(--color-accent-light);
    font-family: var(--font-mono);
}
.usercenter-model-card__url {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.usercenter-model-card__badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-accent-light);
}
.usercenter-model-card__badge--off {
    color: var(--color-text-muted);
}
.usercenter-model-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.usercenter-model-btn {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-high);
    color: var(--color-text-secondary);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.usercenter-model-btn:hover {
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
}
.usercenter-model-btn--danger:hover {
    background: rgba(200, 90, 74, 0.2);
    color: var(--color-danger);
}
.usercenter-modal-type {
    font-size: 12px;
    color: var(--color-accent-light);
    background: var(--color-accent-bg);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    align-self: flex-start;
    font-weight: 600;
}
.usercenter-modal-test {
    display: flex;
    align-items: center;
    gap: 10px;
}
.usercenter-modal-test-result {
    font-size: 12px;
}
.usercenter-modal-test-result--ok {
    color: var(--color-success);
}
.usercenter-modal-test-result--fail {
    color: var(--color-danger);
}

/* ================================================================
   全局版本号（右下角固定）
   ================================================================ */
.global-version {
    position: fixed;
    right: 16px;
    bottom: 12px;
    z-index: 90;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
    letter-spacing: 0.3px;
}
