/* ── 盲打练习页面布局 ── 居中三段: 顶部仪表 / 中央单词卡 / 底部大键盘 */
.tt-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
    min-height: calc(100vh - 62px);
    color: #e2e8f0;
}

/* 顶栏 */
.tt-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .8rem 1.2rem .2rem;
}
.tt-back {
    color: #94a3b8;
    text-decoration: none;
    font-size: .9rem;
}
.tt-back:hover { color: #e2e8f0; }
.tt-brand { font-weight: 700; letter-spacing: .05em; }
.tt-reroll {
    margin-left: auto;
    background: rgba(96,165,250,.12);
    color: #93c5fd;
    border: 1px solid rgba(96,165,250,.35);
    border-radius: 8px;
    padding: .3rem .8rem;
    font-size: .85rem;
    cursor: pointer;
}
.tt-reroll:hover { background: rgba(96,165,250,.22); }

/* 计数柱区 */
.tt-meters {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: min(560px, 86vw);
    margin: .5rem auto 0;
}
.tt-bar {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,.1);
    border-radius: 5px;
    overflow: hidden;
}
.tt-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    border-radius: 5px;
    transition: width .3s ease;
}
.tt-meter-text {
    font-size: .78rem;
    color: #94a3b8;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 中央舞台 */
.tt-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}
.tt-card {
    text-align: center;
    padding: 1.2rem 2.2rem;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.15);
    background: rgba(255,255,255,.02);
    transition: box-shadow .25s ease, border-color .25s ease;
}
.tt-card.flash-done {
    border-color: rgba(34,197,94,.7);
    box-shadow: 0 0 24px rgba(34,197,94,.25);
}
.tt-word {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.25;
    white-space: pre-wrap;
    word-break: break-all;
}
.tt-word .lt { color: #e2e8f0; transition: color .12s; }
.tt-word .lt.cur { color: #ef4444; }
.tt-word .lt.done { color: #e2e8f0; }
.tt-cn {
    margin-top: .55rem;
    min-height: 2.6rem;
    font-size: 1.05rem;
    color: #60a5fa;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tt-toast {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239,68,68,.14);
    border: 1px solid rgba(239,68,68,.4);
    color: #fca5a5;
    font-size: .8rem;
    padding: .3rem .9rem;
    border-radius: 8px;
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
    white-space: nowrap;
}
.tt-toast.show { opacity: 1; }

/* 底部键盘区 */
.tt-dock-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: .8rem;
}
#ttDock { width: 100%; }
.tt-dock-hint {
    display: none;
    color: #64748b;
    font-size: .8rem;
    text-align: center;
    padding: .4rem 1rem 1rem;
}

/* 小屏: 键盘坞隐藏, 显示提示 */
@media (max-width: 1199px), (pointer: coarse) {
    #ttDock { display: none !important; }
    .tt-dock-hint { display: block; }
}

/* 遮罩层 */
.tt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,6,17,.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.tt-overlay-box {
    background: #0f172a;
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 18px;
    padding: 2.2rem 2.6rem;
    text-align: center;
    max-width: 460px;
    width: 88vw;
}
.tt-overlay-title { font-size: 1.5rem; font-weight: 800; margin-bottom: .8rem; }
.tt-overlay-sub { font-size: .9rem; color: #94a3b8; line-height: 1.8; margin-bottom: 1.4rem; }
.tt-btn-primary {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    color: #0b1120;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: .7rem 2.4rem;
    font-size: 1.05rem;
    cursor: pointer;
}
.tt-btn-primary:hover { filter: brightness(1.1); }
.tt-btn-ghost {
    display: inline-block;
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,.35);
    border-radius: 12px;
    padding: .7rem 1.6rem;
    font-size: .95rem;
    text-decoration: none;
}
.tt-btn-ghost:hover { color: #e2e8f0; border-color: #94a3b8; }
.tt-done-btns { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
