/* 背单词工具（艾宾浩斯）—— 配色走站点共享变量（暗色自动适配），强调色用学习绿 */
.vm-hero {
    --accent: #1f9d55;
    --accent-2: #16a34a;
    --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
    background: var(--c-bg-soft, #f6f8fc);
    border: 1px solid var(--c-border, #e3e8f1);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 18px;
}

.vm-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.vm-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vm-logo {
    width: 44px; height: 44px; border-radius: 12px; flex: none;
    display: grid; place-items: center; font-size: 24px; background: var(--accent-soft);
}
.vm-title { font-size: 20px; font-weight: 800; color: var(--c-text, #1f2b45); letter-spacing: .3px; }
.vm-tagline { font-size: 13px; color: var(--c-text-sub, #6b7a96); margin-top: 2px; }
.vm-privacy {
    font-size: 12px; color: var(--c-text-sub, #6b7a96); white-space: nowrap;
    background: var(--c-bg, #fff); border: 1px solid var(--c-border, #e3e8f1);
    padding: 6px 12px; border-radius: 999px;
}

/* 统计卡 */
.vm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.vm-stat {
    background: var(--c-bg, #fff); border: 1px solid var(--c-border, #e3e8f1);
    border-radius: 12px; padding: 12px; text-align: center;
}
.vm-stat-num { font-size: 24px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.vm-stat-label { font-size: 12px; color: var(--c-text-muted, #8a94ab); margin-top: 2px; }

/* 复习区 */
.vm-review {
    background: var(--c-bg, #fff); border: 1px solid var(--c-border, #e3e8f1);
    border-radius: 12px; padding: 14px; margin-bottom: 14px;
}
.vm-review-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    flex-wrap: wrap; font-size: 14px; font-weight: 700;
    color: var(--c-text, #1f2b45); margin-bottom: 12px;
}
.vm-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vm-streak {
    font-size: 12px; font-weight: 600; color: #b45309;
    background: #fef3c7; padding: 3px 10px; border-radius: 999px;
}
.vm-due {
    font-size: 12px; font-weight: 600; color: var(--accent);
    background: var(--accent-soft); padding: 3px 10px; border-radius: 999px;
}

.vm-card {
    position: relative; min-height: 130px; border-radius: 12px; padding: 24px 22px;
    background: var(--accent-soft); display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.vm-speak {
    position: absolute; top: 10px; right: 12px;
    border: 0; background: transparent; cursor: pointer; font-size: 17px;
    padding: 4px 6px; border-radius: 8px; line-height: 1;
}
.vm-speak:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.vm-word { font-size: 34px; font-weight: 800; color: var(--c-text, #1f2b45); word-break: break-word; }
.vm-def { font-size: 18px; color: var(--c-text-sub, #4a587a); }
.vm-next { font-size: 12px; color: var(--c-text-muted, #8a94ab); margin-top: 2px; }

.vm-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.vm-btn {
    border: 1px solid var(--c-border, #e3e8f1); background: var(--c-bg, #fff);
    color: var(--c-text, #1f2b45); border-radius: 10px;
    padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s;
}
.vm-btn:hover { border-color: var(--accent); color: var(--accent); }
.vm-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.vm-btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.vm-btn.ok { background: #16a34a; color: #fff; border-color: #16a34a; }
.vm-btn.ok:hover { background: #15803d; color: #fff; }
.vm-btn.warn { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.vm-btn.warn:hover { background: #d97706; color: #fff; }
.vm-btn.bad { background: #ef4444; color: #fff; border-color: #ef4444; }
.vm-btn.bad:hover { background: #dc2626; color: #fff; }
.vm-btn.ghost { background: transparent; }
.vm-btn.danger { color: #ef4444; border-color: #f1b0b0; }
.vm-btn.danger:hover { background: #fef2f2; color: #dc2626; }

.vm-empty { text-align: center; padding: 24px 10px; color: var(--c-text-sub, #4a587a); }
.vm-empty-emoji { font-size: 40px; margin-bottom: 6px; }

/* 掌握度分布 */
.vm-dist-box {
    background: var(--c-bg, #fff); border: 1px solid var(--c-border, #e3e8f1);
    border-radius: 12px; padding: 14px; margin-bottom: 14px;
}
.vm-dist-head { font-size: 14px; font-weight: 800; color: var(--c-text, #1f2b45); margin-bottom: 10px; }
.vm-dist { display: flex; flex-direction: column; gap: 5px; }
.vm-bar-row { display: flex; align-items: center; gap: 9px; }
.vm-bar-label {
    width: 16px; flex: none; text-align: center;
    font-size: 11px; color: var(--c-text-muted, #8a94ab); font-variant-numeric: tabular-nums;
}
.vm-bar-track {
    flex: 1; height: 9px; display: block; border-radius: 999px; overflow: hidden;
    background: var(--c-bg-soft, #eef2f9);
}
.vm-bar-fill { display: block; height: 100%; border-radius: 999px; background: #60a5fa; min-width: 0; }
.vm-bar-fill.is-master { background: var(--accent); }
.vm-bar-num {
    width: 30px; flex: none; text-align: right;
    font-size: 11px; color: var(--c-text-sub, #4a587a); font-variant-numeric: tabular-nums;
}
.vm-dist-foot { font-size: 11.5px; color: var(--c-text-muted, #8a94ab); margin-top: 9px; line-height: 1.6; }

/* 词库 */
.vm-bank { background: var(--c-bg, #fff); border: 1px solid var(--c-border, #e3e8f1); border-radius: 12px; padding: 14px; }
.vm-bank-head { font-size: 15px; font-weight: 800; color: var(--c-text, #1f2b45); margin-bottom: 12px; }
.vm-add { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.vm-input {
    flex: 1 1 160px; min-width: 0; border: 1px solid var(--c-border, #e3e8f1);
    border-radius: 10px; padding: 9px 12px; font-size: 14px;
    color: var(--c-text, #1f2b45); background: var(--c-bg, #fff); outline: none;
}
.vm-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.vm-search { flex: 0 1 200px; }

.vm-import-box { border-top: 1px dashed var(--c-border, #e3e8f1); padding-top: 10px; margin-bottom: 12px; }
.vm-import-box summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); }
.vm-import-box[open] summary { margin-bottom: 8px; }
.vm-tip { font-size: 12px; color: var(--c-text-sub, #4a587a); line-height: 1.6; margin: 6px 0; }
.vm-tip code { background: var(--c-bg-soft, #f6f8fc); padding: 1px 6px; border-radius: 4px; }
.vm-textarea {
    width: 100%; min-height: 92px; border: 1px solid var(--c-border, #e3e8f1);
    border-radius: 10px; padding: 10px 12px; font-size: 14px; resize: vertical;
    color: var(--c-text, #1f2b45); background: var(--c-bg, #fff); outline: none; font-family: inherit;
}
.vm-textarea:focus { border-color: var(--accent); }
.vm-import-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.vm-list-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-bottom: 8px; font-size: 13px; color: var(--c-text-sub, #4a587a);
}
.vm-list { list-style: none; margin: 0; padding: 0; max-height: 330px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.vm-li {
    display: flex; align-items: center; gap: 9px; padding: 8px 10px;
    border: 1px solid var(--c-border, #e3e8f1); border-radius: 10px; background: var(--c-bg-soft, #f6f8fc);
}
.vm-li-word { font-weight: 700; color: var(--c-text, #1f2b45); min-width: 84px; }
.vm-li-def { flex: 1; color: var(--c-text-sub, #4a587a); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-li-lv { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e5e7eb; color: #555; }
.vm-lv-due { background: #fee2e2; color: #b91c1c; }
.vm-lv-master { background: #dcfce7; color: #15803d; }
.vm-lv-wait { background: #e0f2fe; color: #0369a1; }
.vm-li-next { font-size: 11.5px; color: var(--c-text-muted, #8a94ab); white-space: nowrap; }
.vm-li-btn {
    border: 0; background: transparent; color: var(--c-text-muted, #8a94ab);
    cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 6px; line-height: 1;
}
.vm-li-btn:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.vm-li-btn.danger:hover { background: #fef2f2; color: #ef4444; }
.vm-list-empty { color: var(--c-text-muted, #8a94ab); font-size: 13px; padding: 14px; text-align: center; }

.vm-status { margin-top: 12px; font-size: 13px; color: var(--c-text-sub, #4a587a); min-height: 18px; }
.vm-status.is-ok { color: var(--accent); }
.vm-status.is-warn { color: #c0392b; }

.vm-disclaim {
    background: var(--c-bg-soft, #f6f8fc); border: 1px solid var(--c-border, #e3e8f1);
    border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--c-text-sub, #4a587a);
    line-height: 1.75; margin: 6px 0 22px;
}
.vm-disclaim b { color: var(--c-text, #1f2b45); }

/* 黑夜模式 */
:root[data-theme="dark"] .vm-hero { background: #161e33; border-color: #2a3552; }
:root[data-theme="dark"] .vm-privacy,
:root[data-theme="dark"] .vm-stat,
:root[data-theme="dark"] .vm-review,
:root[data-theme="dark"] .vm-dist-box,
:root[data-theme="dark"] .vm-bank,
:root[data-theme="dark"] .vm-input,
:root[data-theme="dark"] .vm-textarea { background: #0f1525; border-color: #2a3552; }
:root[data-theme="dark"] .vm-li { background: #11182b; border-color: #2a3552; }
:root[data-theme="dark"] .vm-tip code { background: #11182b; }
:root[data-theme="dark"] .vm-bar-track { background: #1b243d; }
:root[data-theme="dark"] .vm-streak { background: rgba(245, 158, 11, .18); color: #fbbf24; }

@media (max-width: 560px) {
    .vm-stats { grid-template-columns: repeat(2, 1fr); }
    .vm-word { font-size: 28px; }
    .vm-li-def, .vm-li-next { display: none; }
}
