/* =============================================================================
   PRE-PRIMARY FUN WORKSHEET CSS (Prefix: .ex-pp- — Isolated per GEMINI.md Law 4)
   - Rỗng ruột nét đen sắc nét khi in A4 cho bé 5–6 tuổi cầm bút sáp / bút chì.
   - Hỗ trợ tương tác tô màu & kéo nối dây màu ngay trên màn hình máy tính / iPad.
   ============================================================================= */
.ex-pp-palette {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    padding: 6px 10px; margin-bottom: 8px; border-radius: 8px;
    background: #fef9c3; border: 1px dashed #eab308; font-size: 12px; font-weight: 700;
}
.ex-pp-palette > span { margin-right: 4px; }
.ex-pp-swatch {
    width: 26px; height: 26px; border-radius: 999px; border: 2px solid #fff;
    box-shadow: 0 0 0 1.5px #94a3b8; cursor: pointer; transition: transform 0.12s ease;
}
.ex-pp-swatch.is-active { transform: scale(1.18); box-shadow: 0 0 0 2.5px #0f172a; }
.ex-pp-eraser {
    border: 1.5px solid #94a3b8; background: #fff; color: #334155; border-radius: 999px;
    padding: 2px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.ex-pp-eraser.is-active { background: #0f172a; color: #fff; border-color: #0f172a; }

.ex-pp-trace-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ex-pp-trace-row {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px dashed #cbd5e1; border-radius: 10px; padding: 6px 12px; background: #fff;
}
.ex-pp-trace-icon { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.ex-pp-trace-svg { flex: 1 1 auto; height: 34px; display: block; }

.ex-pp-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.ex-pp-color-card {
    border: 1.5px solid #94a3b8; border-radius: 10px; padding: 8px 10px; background: #fff;
    break-inside: avoid;
}
.ex-pp-color-prompt { font-size: 12.5px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.ex-pp-shapes-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 6px; }
.ex-pp-shape-btn {
    border: none; background: transparent; padding: 2px; cursor: pointer;
    transition: transform 0.12s ease;
}
.ex-pp-shape-btn:hover { transform: scale(1.1); }

.ex-pp-match-wrap {
    position: relative; display: grid; grid-template-columns: 1fr 120px 1fr;
    align-items: center; gap: 4px; margin-top: 6px;
}
.ex-pp-match-col { display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.ex-pp-match-card {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    border: 1.5px solid #64748b; border-radius: 10px; padding: 6px 10px;
    background: #fff; min-height: 46px; cursor: pointer;
}
.ex-pp-match-card.is-selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 2px rgba(37,99,235,0.2); }
.ex-pp-match-num { font-size: 24px; font-weight: 800; color: #0f172a; margin: 0 auto; }
.ex-pp-dot {
    width: 14px; height: 14px; border-radius: 999px; background: #0f172a;
    border: 2px solid #fff; box-shadow: 0 0 0 1.5px #0f172a; flex: 0 0 auto;
}
.ex-pp-match-svg {
    position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; overflow: visible;
}

.ex-pp-count-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 6px; }
.ex-pp-count-card {
    border: 1.5px solid #94a3b8; border-radius: 10px; padding: 7px 10px; background: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    break-inside: avoid;
}
.ex-pp-count-choices { display: flex; gap: 6px; flex-shrink: 0; }
.ex-pp-num-circle {
    width: 30px; height: 30px; border-radius: 999px; border: 1.5px solid #475569;
    background: #fff; font-size: 14px; font-weight: 800; color: #0f172a;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.ex-pp-num-circle.is-picked { background: #2563eb; color: #fff; border-color: #2563eb; }

@media print {
    .ex-pp-palette { display: none !important; }
    .ex-pp-shape-btn svg path,
    .ex-pp-shape-btn svg circle,
    .ex-pp-shape-btn svg rect,
    .ex-pp-shape-btn svg polygon { fill: #ffffff !important; }
    .ex-pp-match-svg line { display: none !important; }
    .ex-pp-num-circle.is-picked { background: #ffffff !important; color: #0f172a !important; border-color: #475569 !important; }
}
