/* =========================================================
        *  设计变量
        * ========================================================= */
:root {
    --c-primary: #FFD100;
    --c-primary-dark: #E6B800;
    --c-primary-soft: #FFF9E0;
    --c-primary-line: #FFE07A;

    --c-text: #1F1F1F;
    --c-text-2: #5C5C5C;
    --c-text-3: #9A9A9A;
    --c-text-4: #C4C4C4;

    --c-bg: #F4F5F7;
    --c-card: #FFFFFF;
    --c-border: #ECECEC;
    --c-border-2: #F4F4F4;

    --c-ok: #22B45B;
    --c-ok-soft: #EBFAF0;
    --c-bad: #FF4D4F;
    --c-bad-soft: #FFF0F0;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background: var(--c-bg);
    color: var(--c-text);
    padding-top: 5px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.kai {
    font-family: "KaiTi", "STKaiti", "Kaiti SC", "楷体", serif;
}

button {
    outline: none !important;
    font-family: inherit;
}

/* =========================================================
 *  顶部导航
 * ========================================================= */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 1030;
    background: linear-gradient(135deg, #FFD100 0%, #FFC300 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}
/* =========================================================
 *  功能区栏（题库 Tab + 工具按钮）
 * ========================================================= */
.bank-bar {
    border-bottom: 1px solid var(--c-border);
}

.bank-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.bank-tabs {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bank-tabs::-webkit-scrollbar {
    height: 0;
    display: none;
}

.bank-tab {
    flex: 1 1 0;
    min-width: 104px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px solid var(--c-border);
    background: #FAFAFB;
    border-radius: 10px;
    padding: 0 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-2);
    white-space: nowrap;
    transition: all .18s ease;
}

.bank-tab:hover {
    border-color: var(--c-primary-line);
    background: #FFFDF3;
}

.bank-tab.active {
    background: linear-gradient(135deg, var(--c-primary), #FFC300);
    border-color: transparent;
    color: var(--c-text);
    box-shadow: 0 3px 10px rgba(255, 195, 0, .3);
}

.bank-tab .glyphicon {
    font-size: 13px;
}

.bank-tab.active .glyphicon {
    color: #1F1F1F;
}

.util-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.util-btn {
    height: 32px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--c-border);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text-2);
    transition: all .18s ease;
    white-space: nowrap;
    position: relative;
}

.util-btn:hover:not(:disabled) {
    border-color: #D8D8D8;
    background: #FAFAFA;
    color: var(--c-text);
}

.util-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.util-btn .glyphicon {
    font-size: 12px;
    color: #909090;
}

.util-btn:hover:not(:disabled) .glyphicon {
    color: var(--c-text-2);
}

.util-btn .tab-badge {
    background: #FF4D4F;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    padding: 1px 5px;
    line-height: 14px;
    min-width: 16px;
    display: none;
    text-align: center;
}

.util-btn .tab-badge.on {
    display: inline-block;
}

/* =========================================================
 *  主容器
 * ========================================================= */
.main-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 2px;
}

/* =========================================================
 *  练习卡片
 * ========================================================= */
.practice-card {
    background: var(--c-card);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(20, 20, 20, .06);
    padding: 22px 24px 18px;
    margin-top: 16px;
}

.stat-strip {
    display: flex;
    align-items: center;
    background: #FAFAFB;
    border: 1px solid var(--c-border-2);
    border-radius: 12px;
    padding: 10px 0;
    margin-bottom: 12px;
}

.stat-strip .st {
    flex: 1;
    text-align: center;
    line-height: 1.25;
    border-right: 1px solid #EFEFEF;
}

.stat-strip .st:last-child {
    border-right: none;
}

.stat-strip .st b {
    display: block;
    font-size: 17px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--c-text);
}

.stat-strip .st span {
    font-size: 11px;
    color: var(--c-text-3);
}

.prog-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.prog-track {
    flex: 1;
    height: 6px;
    background: #F0F0F0;
    border-radius: 3px;
    overflow: hidden;
}

.prog-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--c-primary), #FFC300);
    transition: width .32s ease;
}

.prog-txt {
    font-size: 12px;
    color: var(--c-text-3);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* =========================================================
 *  目标字 + 笔顺（并行布局）
 * ========================================================= */
.target-area {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 20px;
}

.char-box {
    width: 94px;
    flex: 0 0 94px;
    border-radius: 18px;
    background: linear-gradient(145deg, #FFFCEB 0%, #FFEFAF 100%);
    border: 2.5px solid var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 54px;
    line-height: 1;
    color: var(--c-text);
    box-shadow: 0 6px 20px rgba(255, 195, 0, .22);
    position: relative;
    overflow: hidden;
}

.char-box::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px dashed rgba(0, 0, 0, .08);
    border-radius: 12px;
    pointer-events: none;
}

@keyframes popIn {
    0% {
        transform: scale(.84);
        opacity: .4
    }
    100% {
        transform: scale(1);
        opacity: 1
    }
}

.char-info {
    flex: 1;
    min-width: 0;
}

.ci-steps {
    height: 100%;
    background: #FAFAFB;
    border: 1px dashed #E8E8E8;
    border-radius: 12px;
    padding: 9px 12px 10px;
    display: flex;
    flex-direction: column;
}

.ci-steps-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    flex-wrap: wrap;
}

.ci-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.ci-meta .py {
    font-size: 14px;
    font-weight: 800;
    color: var(--c-text-2);
    letter-spacing: .4px;
}

.ci-meta .word {
    font-size: 11.5px;
    font-weight: 600;
    color: #A07800;
    background: var(--c-primary-soft);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
}

.ci-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-text-3);
    font-variant-numeric: tabular-nums;
    background: #fff;
    border-radius: 6px;
    padding: 1px 8px;
    border: 1px solid var(--c-border-2);
    white-space: nowrap;
    flex-shrink: 0;
}

.stroke-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.step {
    width: 34px;
    height: 44px;
    border: 1.5px solid var(--c-border);
    border-radius: 9px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 1px;
    position: relative;
    transition: all .22s ease;
}

.step .s-glyph {
    font-size: 16px;
    line-height: 1;
    color: #4A4A4A;
}

.step .s-name {
    font-size: 9px;
    color: #B8B8B8;
    margin-top: 3px;
    line-height: 1;
}

.step.done {
    border-color: var(--c-ok);
    background: var(--c-ok-soft);
}

.step.done .s-glyph, .step.done .s-name {
    color: var(--c-ok);
}

.step.current {
    border-color: var(--c-primary);
    background: #FFFBE6;
    box-shadow: 0 0 0 3px rgba(255, 209, 0, .24);
    transform: translateY(-2px);
    animation: breathe 1.6s ease-in-out infinite;
}

.step.current .s-glyph, .step.current .s-name {
    color: #B58A00;
    font-weight: 700;
}

@keyframes breathe {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(255, 209, 0, .24);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(255, 209, 0, .08);
    }
}

.shake {
    animation: shakeX .32s;
}

@keyframes shakeX {
    0%, 100% {
        transform: translateX(0)
    }
    20% {
        transform: translateX(-6px)
    }
    40% {
        transform: translateX(6px)
    }
    60% {
        transform: translateX(-4px)
    }
    80% {
        transform: translateX(4px)
    }
}

/* =========================================================
 *  输入区
 * ========================================================= */
.input-area {
    position: relative;
    background: linear-gradient(135deg, #FFFCEB 0%, #FFF6D6 100%);
    border: 2px solid var(--c-primary);
    border-radius: 14px;
    padding: 16px 18px 14px;
    margin-bottom: 18px;
    box-shadow: 0 4px 18px rgba(255, 209, 0, .18);
}

.input-area::before {
    content: '输入区';
    position: absolute;
    top: -11px;
    left: 16px;
    height: 22px;
    line-height: 22px;
    padding: 0 10px;
    background: linear-gradient(135deg, var(--c-primary), #FFC300);
    color: var(--c-text);
    font-size: 11px;
    font-weight: 800;
    border-radius: 11px;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(255, 195, 0, .35);
}

.ia-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ia-status {
    font-size: 11.5px;
    font-weight: 700;
    color: #A07800;
    background: rgba(255, 209, 0, .28);
    border-radius: 8px;
    padding: 3px 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ia-status .glyphicon {
    font-size: 11px;
}

.ia-code {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 8px;
    line-height: 1.35;
    color: #B58A00;
    min-height: 42px;
    word-break: break-all;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.typed-caret {
    display: inline-block;
    width: 3px;
    height: 28px;
    border-radius: 2px;
    background: #B58A00;
    vertical-align: -4px;
    margin-left: 3px;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0
    }
}

.ia-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 12px;
    color: #A07800;
    font-weight: 700;
}

.ia-foot .glyphicon {
    font-size: 11px;
    margin-right: 3px;
}

/* ---- 虚拟键盘 ---- */
.vk {
    display: flex;
    gap: 9px;
    margin-bottom: 18px;
}

.vk.is-hidden {
    display: none;
}

.vk-key {
    flex: 1;
    min-width: 0;
    height: 78px;
    border: 2px solid var(--c-border);
    border-radius: 14px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    cursor: pointer;
    transition: all .15s ease;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

.vk-key:active {
    transform: scale(.96);
}

.vk-key .vk-num {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 10.5px;
    font-weight: 700;
    color: #C8C8C8;
    font-family: Consolas, Monaco, monospace;
}

.vk-key .vk-glyph {
    font-size: 28px;
    line-height: 1;
    color: #2A2A2A;
}

.vk-key .vk-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--c-text-2);
}

.vk-key.hint {
    border-color: var(--c-primary);
    background: #FFFBE6;
    box-shadow: 0 0 0 4px rgba(255, 209, 0, .22);
    animation: breathe 1.6s ease-in-out infinite;
}

.vk-key.hint .vk-glyph, .vk-key.hint .vk-name {
    color: #B58A00;
}

.vk-key.ok {
    background: var(--c-ok);
    border-color: var(--c-ok);
}

.vk-key.ok .vk-glyph, .vk-key.ok .vk-name, .vk-key.ok .vk-num {
    color: #fff;
}

.vk-key.bad {
    background: var(--c-bad);
    border-color: var(--c-bad);
    animation: shakeX .3s;
}

.vk-key.bad .vk-glyph, .vk-key.bad .vk-name, .vk-key.bad .vk-num {
    color: #fff;
}

/* ---- 操作按钮 ---- */
.actions {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.btn-act {
    flex: 1 1 0;
    min-width: 0;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px solid var(--c-primary-line);
    background: #fff;
    border-radius: 11px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    color: #8A6B00;
    transition: all .18s ease;
    padding: 0 12px;
    white-space: nowrap;
}

.btn-act .glyphicon {
    font-size: 13px;
}

.btn-act:hover {
    background: var(--c-primary-soft);
    border-color: var(--c-primary);
    color: #6B5200;
}

.btn-act:active {
    transform: translateY(1px);
}

/* =========================================================
 *  SEO 说明卡
 * ========================================================= */
.seo-card {
    background: var(--c-card);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(20, 20, 20, .05);
    padding: 22px 24px;
    margin: 18px 0 30px;
}

.seo-card h2 {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-card h2::before {
    content: '';
    width: 4px;
    height: 15px;
    border-radius: 2px;
    background: var(--c-primary);
}

.seo-card h3 {
    font-size: 13.5px;
    font-weight: 800;
    color: #333;
    margin: 14px 0 8px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.seo-card h3:first-of-type {
    margin-top: 0;
}

.seo-card h3 .glyphicon {
    color: #B58A00;
    font-size: 12px;
}

.seo-card p {
    font-size: 13px;
    line-height: 1.95;
    color: var(--c-text-2);
    margin-bottom: 10px;
}

.seo-card p:last-child {
    margin-bottom: 0;
}

.seo-card b {
    color: #333;
}

.seo-card code {
    background: var(--c-primary-soft);
    color: #A07800;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 12.5px;
    font-family: Consolas, Monaco, monospace;
}

.seo-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.seo-card ul li {
    font-size: 13px;
    line-height: 1.9;
    color: var(--c-text-2);
    padding-left: 20px;
    position: relative;
}

.seo-card ul li::before {
    content: '▸';
    position: absolute;
    left: 4px;
    top: 0;
    color: var(--c-primary-dark);
    font-weight: 800;
}

.seo-card ul li b {
    color: #333;
}

.ime-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    margin-bottom: 10px;
}

.ime-tags span {
    font-size: 12px;
    font-weight: 600;
    background: #F4F5F7;
    color: var(--c-text-2);
    border-radius: 8px;
    padding: 3px 10px;
    border: 1px solid var(--c-border);
}

.seo-more {
    display: none;
}

.seo-more.show {
    display: block;
    animation: seoFadeIn .26s ease;
}

@keyframes seoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.seo-toggle-wrap {
    text-align: center;
    margin-top: 12px;
}

.seo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 18px;
    border: 1.5px solid var(--c-border);
    background: #fff;
    border-radius: 17px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--c-text-2);
    transition: all .18s ease;
}

.seo-toggle:hover {
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
    color: #A07800;
}

.seo-toggle .glyphicon {
    font-size: 11px;
    transition: transform .24s ease;
}

.seo-toggle.expanded .glyphicon-chevron-down {
    transform: rotate(180deg);
}

/* =========================================================
 *  通用弹窗（复用 Bootstrap .modal 体系）
 * ========================================================= */
.modal-content {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}

.modal-header {
    border: none;
    padding: 20px 22px 6px;
    position: relative;
}

.modal-header .modal-title {
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header .modal-title .glyphicon {
    color: #A07800;
    font-size: 15px;
}

.modal-header .close {
    font-size: 24px;
    font-weight: 400;
    opacity: .35;
    margin-top: 2px;
    outline: none;
}

.modal-header .close:hover {
    opacity: .7;
}

.modal-body {
    padding: 10px 22px 18px;
}

.modal-footer {
    border: none;
    padding: 6px 22px 20px;
    display: flex;
    gap: 10px;
}

.modal-footer .btn {
    flex: 1 1 0;
    height: 44px;
    border-radius: 11px;
    font-weight: 700;
    font-size: 13.5px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.modal-footer .btn .glyphicon {
    font-size: 13px;
}

/* 主题按钮（浅黄底 / 黄底） */
.btn-mt {
    background: linear-gradient(135deg, var(--c-primary), #FFC300);
    border: none;
    color: var(--c-text);
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(255, 195, 0, .3);
    outline: none;
}

.btn-mt:hover, .btn-mt:focus {
    background: linear-gradient(135deg, #FFC300, #FFB300);
    color: var(--c-text);
    outline: none;
    box-shadow: 0 5px 14px rgba(255, 195, 0, .42);
}

.btn-mt[disabled], .btn-mt.disabled {
    background: #EDEDED !important;
    color: #B6B6B6 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.btn-ghost {
    background: #fff;
    border: 1.5px solid var(--c-border);
    color: var(--c-text-2);
    font-weight: 700;
    outline: none;
}

.btn-ghost:hover, .btn-ghost:focus {
    background: #FAFAFA;
    border-color: #D8D8D8;
    color: var(--c-text);
    outline: none;
}

.btn-ghost[disabled], .btn-ghost.disabled {
    background: #F8F8F8 !important;
    color: #C0C0C0 !important;
    border-color: #EDEDED !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* 设置弹窗 */
.set-group {
    margin-bottom: 20px;
}

.set-group:last-child {
    margin-bottom: 0;
}

.set-group-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--c-text-3);
    margin-bottom: 8px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* 输入模式：卡片式 */
.mode-toggle {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 8px;
}

.mode-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px 8px;
    min-height: 82px;
    border: 1.5px solid var(--c-border);
    background: #fff;
    border-radius: 11px;
    cursor: pointer;
    transition: all .18s ease;
    text-align: center;
    font-family: inherit;
}

.mode-opt:hover {
    border-color: #D8D8D8;
    background: #FAFAFA;
}

.mode-opt .mo-icon {
    font-size: 19px;
    color: #9A9A9A;
    line-height: 1;
    margin-bottom: 3px;
    transition: color .18s ease;
}

.mode-opt .mo-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--c-text-2);
    line-height: 1.2;
}

.mode-opt .mo-desc {
    font-size: 11px;
    color: var(--c-text-3);
    line-height: 1.35;
    margin-top: 1px;
}

.mode-opt.active {
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
    box-shadow: 0 0 0 3px rgba(255, 209, 0, .18);
}

.mode-opt.active .mo-icon,
.mode-opt.active .mo-label {
    color: #A07800;
}

.mode-opt.active .mo-desc {
    color: #B58A00;
}

/* 开关行 */
.set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border-2);
}

.set-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.set-txt {
    flex: 1;
    min-width: 0;
}

.set-txt b {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--c-text);
}

.set-txt small {
    display: block;
    font-size: 11.5px;
    color: var(--c-text-3);
    margin-top: 2px;
    line-height: 1.5;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #D8D8D8;
    transition: .25s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}

.switch input:checked + .slider {
    background: var(--c-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(18px);
}

.switch.is-disabled {
    pointer-events: none;
    opacity: .5;
}

/* 成绩单 */
.result-hero {
    text-align: center;
    padding: 4px 0 8px;
}

.result-hero .rh-emoji {
    font-size: 38px;
    line-height: 1;
}

.result-hero .rh-title {
    font-size: 17px;
    font-weight: 800;
    margin-top: 6px;
}

.result-hero .rh-sub {
    font-size: 12.5px;
    color: var(--c-text-3);
    margin-top: 4px;
}

.result-grid {
    display: grid;
    grid-template-columns:repeat(2, 1fr);
    gap: 9px;
}

.rg-item {
    background: #FAFAFB;
    border: 1px solid var(--c-border-2);
    border-radius: 12px;
    padding: 11px 6px;
    text-align: center;
}

.rg-item .glyphicon {
    font-size: 13px;
    color: #B58A00;
    margin-bottom: 3px;
    display: block;
}

.rg-v {
    font-size: 19px;
    font-weight: 800;
    color: #A07800;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.rg-l {
    font-size: 11px;
    color: var(--c-text-3);
    margin-top: 2px;
}

.wrong-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.wrong-mini span {
    font-family: "KaiTi", "STKaiti", serif;
    font-size: 17px;
    font-weight: 700;
    background: var(--c-primary-soft);
    color: #A07800;
    border-radius: 9px;
    padding: 3px 10px;
}

/* 错题本 */
.wb-list {
    max-height: 54vh;
    overflow-y: auto;
    padding-right: 4px;
}

.wb-list::-webkit-scrollbar {
    width: 5px;
}

.wb-list::-webkit-scrollbar-thumb {
    background: #E0E0E0;
    border-radius: 3px;
}

.wb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--c-border-2);
}

.wb-row:last-child {
    border-bottom: none;
}

.wb-char {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 11px;
    background: var(--c-primary-soft);
    border: 1.5px solid #FFE89A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #A07800;
    font-family: "KaiTi", "STKaiti", serif;
    font-weight: 700;
}

.wb-info {
    flex: 1;
    min-width: 0;
}

.wb-info .t1 {
    font-size: 14px;
    font-weight: 700;
}

.wb-info .t1 small {
    font-weight: 400;
    color: var(--c-text-3);
    font-size: 12px;
    margin-left: 4px;
}

.wb-info .t2 {
    font-size: 11.5px;
    color: var(--c-text-3);
    letter-spacing: 1.5px;
    margin-top: 2px;
    font-family: Consolas, Monaco, monospace;
}

.wb-count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #B58A00;
    background: var(--c-primary-soft);
    border-radius: 8px;
    padding: 3px 9px;
}

.empty-state {
    text-align: center;
    padding: 34px 10px;
    color: var(--c-text-3);
    font-size: 13.5px;
    line-height: 1.9;
}

.empty-state .es-icon {
    font-size: 38px;
    margin-bottom: 8px;
    color: #D8D8D8;
}

/* =========================================================
 *  Toast（统一黄色主题配色）
 * ========================================================= */
#toastBox {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2100;
    pointer-events: none;
    width: 92%;
    max-width: 360px;
}

.toast-item {
    background: #2B2B2B;
    color: #fff;
    border-radius: 11px;
    padding: 10px 16px;
    font-size: 13.5px;
    text-align: center;
    margin-bottom: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    animation: toastIn .26s ease;
}

.toast-item.ok {
    background: linear-gradient(135deg, #FFD100, #FFC300);
    color: #1F1F1F;
    font-weight: 700;
}

.toast-item.bad {
    background: linear-gradient(135deg, #FFB07A, #F26B3A);
    color: #fff;
    font-weight: 600;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-10px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* 页脚 */
.site-foot {
    text-align: center;
    color: #B4B4B4;
    font-size: 12.5px;
    line-height: 1.9;
    padding: 6px 15px 32px;
}

.site-foot b {
    color: #9A9A9A;
}

/* =========================================================
 *  响应式
 * ========================================================= */
@media (max-width: 991px) {
    .main-wrap {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    body {
        padding-top: 52px;
        font-size: 13.5px;
    }

    .bank-bar-inner {
        padding: 8px 0;
        gap: 8px;
    }

    .bank-tab {
        min-width: 88px;
        height: 36px;
        font-size: 12px;
        border-radius: 9px;
        padding: 0 9px;
    }

    .bank-tab .glyphicon {
        font-size: 12px;
    }

    .util-btn {
        height: 30px;
        padding: 0 9px;
        font-size: 12px;
        border-radius: 7px;
    }

    .util-btn .glyphicon {
        font-size: 11px;
    }

    .practice-card {
        padding: 16px 14px 14px;
        border-radius: 16px;
        margin-top: 12px;
    }

    .stat-strip {
        padding: 9px 0;
        margin-bottom: 10px;
    }

    .stat-strip .st b {
        font-size: 15px;
    }

    .stat-strip .st span {
        font-size: 10.5px;
    }

    .target-area {
        gap: 12px;
    }

    .char-box {
        width: 78px;
        flex-basis: 78px;
        font-size: 44px;
        border-radius: 14px;
    }

    .ci-meta .py {
        font-size: 13px;
    }

    .ci-meta .word {
        font-size: 10.5px;
        padding: 2px 7px;
    }

    .ci-count {
        font-size: 10px;
    }

    .ci-steps {
        padding: 8px 10px 9px;
    }

    .step {
        width: 30px;
        height: 40px;
        border-radius: 8px;
    }

    .step .s-glyph {
        font-size: 15px;
    }

    .step .s-name {
        font-size: 8.5px;
    }

    .ia-code {
        font-size: 24px;
        letter-spacing: 6px;
        min-height: 36px;
    }

    .typed-caret {
        height: 22px;
    }

    .vk {
        gap: 6px;
    }

    .vk-key {
        height: 68px;
        border-radius: 12px;
    }

    .vk-key .vk-glyph {
        font-size: 23px;
    }

    .vk-key .vk-name {
        font-size: 10.5px;
    }

    .vk-key .vk-num {
        font-size: 9px;
        top: 4px;
        right: 6px;
    }

    .btn-act {
        height: 42px;
        font-size: 13px;
    }

    .seo-card {
        padding: 18px 16px;
        margin: 14px 0 24px;
    }

    .modal-footer .btn {
        height: 42px;
        font-size: 13px;
    }

    .mode-opt {
        min-height: 76px;
        padding: 10px 6px;
    }

    .mode-opt .mo-icon {
        font-size: 17px;
    }

    .mode-opt .mo-label {
        font-size: 12.5px;
    }

    .mode-opt .mo-desc {
        font-size: 10.5px;
    }
}

@media (max-width: 400px) {
    .char-box {
        width: 70px;
        flex-basis: 70px;
        font-size: 40px;
    }

    .step {
        width: 28px;
        height: 38px;
    }

    .step .s-glyph {
        font-size: 14px;
    }

    .step .s-name {
        font-size: 8px;
    }

    .ia-code {
        font-size: 21px;
        letter-spacing: 5px;
    }

    .vk-key {
        height: 62px;
    }

    .vk-key .vk-glyph {
        font-size: 20px;
    }

    .util-btn span:not(.glyphicon):not(.tab-badge) {
        display: none;
    }

    .util-btn {
        padding: 0 8px;
    }
}