/**
 * 学易笔记练习页（独立模块）
 * - 页脚“练习”按钮
 * - 练习页标签与面板
 * - 六合连线交互样式
 */

.liuyao-footer-row {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
}

.liuyao-footer-row #liuyao-footer-brand {
    margin: 0;
    text-align: center;
}

.liuyao-footer-practice-btn {
    display: none;
    justify-self: end;
    padding: 6px 14px; 
}

.liuyao-main #notes-mode.active ~ .footer .liuyao-footer-practice-btn {
    display: inline-flex;
}

#notes-mode .notes-admin-bar .liuyao-footer-practice-btn {
    display: inline-flex;
    flex: 0 0 auto;
}

#notes-mode .notes-practice-inline-bar,
#notes-mode .notes-practice-return-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 12px;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 10px;
    border-top: none;
}

#notes-mode .notes-practice-inline-bar .liuyao-footer-practice-btn,
#notes-mode .notes-practice-return-bar .liuyao-footer-practice-btn {
    display: inline-flex;
}

.notes-practice-page {
    max-width: 800px;
    margin: 10px auto 0;
    text-align: left;
}

.notes-practice-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.notes-practice-tab {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

.notes-practice-tab.is-active {
    border-color: #2f6b52;
    color: #2f6b52;
    font-weight: 600;
}

.notes-practice-tab:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.notes-practice-panel {
    display: none;
}

.notes-practice-panel.is-active {
    display: block;
}

.notes-practice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.notes-practice-head--stack {
    display: block;
}

.notes-practice-head--xunkong {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.notes-practice-desc {
    margin: 0;
    font-size: 13px;
    color: #475569;
}

.notes-practice-reset-btn {
    flex: 0 0 auto;
}

.notes-practice-board {
    position: relative;
    height: 380px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: transparent;
    overflow: hidden;
}

.notes-practice-board-wrap {
    position: relative;
}

.notes-practice-hint-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.notes-practice-hint-reset-btn {
    position: absolute;
    top: 42px;
    right: 10px;
    z-index: 3;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.notes-practice-hint-pop {
    position: absolute;
    top: 40px;
    left: 10px;
    right: auto;
    z-index: 4;
    min-width: 188px;
    max-width: min(92vw, 320px);
    padding: 10px 12px;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-100%) scale(0.88);
    transform-origin: right top;
    transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.notes-practice-hint-pop.is-open {
    pointer-events: auto;
    opacity: 1;
    transform: translateX(-100%) scale(1);
}

.notes-practice-hint-row {
    font-size: 16px;
    line-height: 1.45;
    font-weight: 700;
    white-space: nowrap;
}

.notes-practice-hint-zhi {
    display: inline-block;
}

.notes-practice-hint-word {
    color: #334155;
}

.notes-practice-line-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.notes-practice-link-line {
    stroke: #2f6b52;
    stroke-width: 2.5;
    opacity: 0.9;
}

.notes-practice-zhi {
    position: absolute;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 999px;
    min-width: 42px;
    height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.notes-practice-zhi.is-selected {
    border-color: #2f6b52;
    box-shadow: 0 0 0 2px rgba(47, 107, 82, 0.16);
}

.notes-practice-zhi.is-matched {
    border-color: #2f6b52;
    background: #f0fdf4;
}

.notes-practice-xunkong-wrap {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 14px;
    box-sizing: border-box;
    position: relative;
}

.notes-practice-xk-toggle-num {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.notes-practice-xunkong-counter {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: #2f6b52;
    white-space: nowrap;
}

.notes-practice-xunkong-question {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 44px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.06em;
}

.notes-practice-jz-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.notes-practice-jz-char {
    font-size: 44px;
    font-weight: 700;
}

.notes-practice-jz-num {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0;
}

.notes-practice-xunkong-options {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: 18px;
}

.notes-practice-xk-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    min-height: 38px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 6px 6px;
    position: relative;
    overflow: visible;
}

.notes-practice-xk-btn.is-correct {
    border-color: #2f6b52;
    color: #2f6b52;
}

.notes-practice-xk-main {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

.notes-practice-xk-num {
    position: absolute;
    left: 50%;
    top: calc(100% + 3px);
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
}

.notes-practice-xunkong-wrap.is-hide-num .notes-practice-jz-num,
.notes-practice-xunkong-wrap.is-hide-num .notes-practice-xk-num {
    display: none;
}
