/* 标点符号用法速查 /tool/punctuation-guide */

.pg-main { margin-bottom: 24px; }

/* ============ 标点选择条 ============ */
.pg-punct-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.pg-punct-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    border: none;
    border-radius: 99px;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    transition: all .14s ease;
    white-space: nowrap;
}
.pg-tab-char {
    font-size: 20px;
    font-weight: 800;
    color: var(--c-primary);
}
.pg-tab-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text-muted);
}
.pg-punct-tab:hover .pg-tab-name { color: var(--c-text-sub); }
.pg-punct-tab.active {
    background: #ea580c;
    box-shadow: 0 2px 8px rgba(234,88,12,.25);
}
.pg-punct-tab.active .pg-tab-char,
.pg-punct-tab.active .pg-tab-name { color: #fff; }

/* ============ 用法卡片 ============ */
.pg-card {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 16px;
}
.pg-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 14px;
}
.pg-card-char {
    width: 56px; height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: #ea580c;
    background: rgba(234,88,12,.1);
    border: 2px solid #ea580c;
    border-radius: 16px;
    line-height: 1;
}
.pg-card-title { font-size: 22px; font-weight: 800; color: var(--c-text); }

.pg-card-section { margin-bottom: 14px; }
.pg-section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--c-text-sub);
    margin-bottom: 6px;
}
.pg-kid-desc {
    font-size: 15px;
    line-height: 1.8;
    padding: 10px 14px;
    background: rgba(59,130,246,.08);
    border-radius: 10px;
    color: var(--c-text);
}

.pg-example {
    font-size: 15px;
    line-height: 1.9;
    padding: 12px 14px;
    border-radius: 10px;
}
.pg-example--ok {
    background: rgba(22,163,74,.08);
    border-left: 3px solid #16a34a;
    color: var(--c-text);
}
.pg-example--bad {
    background: rgba(239,68,68,.08);
    border-left: 3px solid #ef4444;
    color: var(--c-text);
}
.pg-example-fix {
    font-size: 13px;
    color: var(--c-text-muted);
    margin-top: 4px;
    padding-left: 3px;
}

.pg-memory-tip {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.9;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(245,158,11,.04));
    border-radius: 10px;
    color: #b45309;
    font-style: italic;
}

/* ============ AI 测验区 ============ */
.pg-quiz-section {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}
.pg-quiz-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.pg-quiz-title { font-size: 15px; font-weight: 800; }
.pg-quiz-gen-btn {
    padding: 5px 12px;
    border: 1px solid var(--c-border);
    border-radius: 99px;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all .14s ease;
}
.pg-quiz-gen-btn:hover { border-color: #ea580c; color: #ea580c; }

.pg-quiz-box {
    text-align: center;
    padding: 20px;
    background: var(--c-surface-soft);
    border-radius: 12px;
}
.pg-quiz-empty {
    color: var(--c-text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}
.pg-quiz-sentence {
    font-size: 16px;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 12px;
}

.pg-btn {
    height: 40px;
    padding: 0 20px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s ease;
    border: none;
}
.pg-btn--primary {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
    box-shadow: 0 2px 8px rgba(234,88,12,.3);
}
.pg-btn--primary:hover { transform: translateY(-1px); }
.pg-btn--block { width: 100%; }

/* 测验中 */
.pg-quiz-play { padding: 10px 0; }
.pg-quiz-progress {
    margin-bottom: 14px;
    font-size: 12.5px;
    color: var(--c-text-sub);
    font-weight: 700;
}
.pg-progress-bar {
    height: 6px;
    background: var(--c-surface-soft);
    border-radius: 99px;
    margin-top: 6px;
    overflow: hidden;
}
.pg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ea580c, #f97316);
    border-radius: 99px;
    transition: width .3s ease;
}
.pg-quiz-sentence-play {
    font-size: 17px;
    line-height: 1.9;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 14px;
    font-weight: 600;
}
.pg-quiz-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.pg-quiz-option {
    padding: 12px;
    border: 2px solid var(--c-border);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all .14s ease;
}
.pg-quiz-option:hover { border-color: #ea580c; transform: translateY(-1px); }
.pg-quiz-option.is-picked {
    border-color: #ea580c;
    background: rgba(234,88,12,.08);
    color: #ea580c;
}
.pg-quiz-option.is-correct {
    border-color: #16a34a;
    background: rgba(22,163,74,.1);
    color: #16a34a;
}
.pg-quiz-option.is-wrong {
    border-color: #ef4444;
    background: rgba(239,68,68,.08);
    color: #ef4444;
}

/* 结果 */
.pg-quiz-result {
    text-align: center;
    padding: 16px 0;
}
.pg-result-emoji { font-size: 48px; margin-bottom: 6px; }
.pg-result-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.pg-result-score { font-size: 14px; color: var(--c-text-sub); margin-bottom: 12px; }
.pg-result-score b { color: #ea580c; font-size: 20px; }
.pg-result-breakdown {
    text-align: left;
    margin-bottom: 14px;
}
.pg-breakdown-item {
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    font-size: 13px;
}
.pg-breakdown-item.ok { background: rgba(22,163,74,.08); }
.pg-breakdown-item.bad { background: rgba(239,68,68,.08); }

/* 响应式 */
@media (max-width: 640px) {
    .pg-card { padding: 16px; }
    .pg-card-char { width: 44px; height: 44px; font-size: 26px; }
    .pg-quiz-options { grid-template-columns: repeat(2, 1fr); }
}

/* 黑夜模式 */
[data-theme="dark"] .pg-kid-desc { background: rgba(59,130,246,.15); }
[data-theme="dark"] .pg-example--ok { background: rgba(22,163,74,.12); }
[data-theme="dark"] .pg-example--bad { background: rgba(239,68,68,.12); }
[data-theme="dark"] .pg-memory-tip { background: rgba(245,158,11,.15); }
[data-theme="dark"] .pg-quiz-sentence,
[data-theme="dark"] .pg-quiz-sentence-play,
[data-theme="dark"] .pg-quiz-option { background: var(--c-surface-soft); }
