/* Pinyin uses the same i2Bopomo learning system, with its own scoped reference. */
.pl-learning { min-width: 0; }
.pl-learning :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select):focus-visible { outline-offset: -2px; }
.pl-learning .zl-quiz-result[data-correct="true"] { color: var(--zl-success); background: transparent; font-weight: 600; }
.pl-reading-pair { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; margin: 20px 0 24px; }
.pl-reading-pair > span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 112px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.pl-reading-pair small { color: var(--muted); font-size: 11px; }
.pl-reading-pair strong { margin-top: 7px; color: var(--ink); font-family: Arial, sans-serif; font-size: clamp(29px, 3.1vw, 43px); font-weight: 400; line-height: 1.4; white-space: nowrap; }
.pl-first-word .zl-word-result > div { min-width: 0; }
.pl-first-word .zl-word-result small { display: block; }
.pl-path-art { letter-spacing: 0; font-size: 33px; }
.pl-chart-intro { max-width: 900px; margin-bottom: 24px !important; }
.pl-reference-group { margin-top: 28px; }
.pl-reference-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 11px; }
.pl-reference-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); text-align: left; transition: border-color .15s, background .15s; }
.pl-reference-card:hover { border-color: var(--zl-accent); background: var(--accent-soft); }
.pl-spelling { color: var(--ink); font-family: Arial, sans-serif; font-size: 33px; line-height: 1.4; font-weight: 500; }
.pl-example { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--line); }
.pl-example > :first-child { font-size: 22px; line-height: 1.4; }
.pl-pinyin { color: var(--zl-accent); font-size: 14px; }
.pl-zhuyin { min-height: 22px; margin-top: 4px; color: var(--muted); font-family: Arial, sans-serif; font-size: 12px; }
.pl-gloss { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.pl-hide-zhuyin .pl-zhuyin { visibility: hidden; }
.pl-detail-content { display: grid; grid-template-columns: minmax(70px, auto) 1fr; align-items: start; gap: 25px; padding: 23px 26px 27px; }
.pl-detail-spelling { padding-top: 16px; color: var(--zl-accent); font-family: Arial, sans-serif; font-size: 50px; line-height: 1.3; }
.pl-detail-content .zl-kicker { margin-bottom: 7px; }
.pl-detail-content h2 { font-size: 24px; letter-spacing: -.2px; }
.pl-detail-content p { margin-top: 9px; font-size: 14px; }
.pl-detail-content #pl-detail-zhuyin { color: var(--zl-accent); font-family: Arial, sans-serif; font-size: 19px; }
.pl-print-heading, .pl-print-note { display: none; }
.pl-no-js { margin-top: 22px !important; font-size: 13px; }
.pl-tone-card .zl-tone-example > :first-child { color: var(--zl-accent); font-family: Arial, sans-serif; }
.pl-neutral-example { flex: 0 0 85px; color: var(--zl-accent); font-family: Arial, sans-serif; font-size: 46px; text-align: center; }
.pl-key-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0; }
.pl-key-flow kbd { min-width: 35px; min-height: 37px; padding: 5px 10px; font-size: 16px; }
.pl-key-flow > span { color: var(--muted); }
.pl-key-flow > strong { color: var(--zl-accent); font-size: 32px; font-weight: 400; }
.pl-spelling-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; padding: 15px 10px; border-radius: 12px; background: var(--canvas); text-align: center; }
.pl-spelling-comparison > span { display: flex; flex-direction: column; }
.pl-spelling-comparison small { color: var(--muted); font-size: 10px; }
.pl-spelling-comparison strong { color: var(--ink); font-family: Arial, sans-serif; font-size: 29px; font-weight: 400; }
.pl-table-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.pl-table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
.pl-table th, .pl-table td { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.pl-table thead th { background: var(--canvas); color: var(--muted); font-size: 12px; font-weight: 600; }
.pl-table tbody th { color: var(--ink); font-size: 28px; font-weight: 400; }
.pl-table td { color: var(--ink); font-family: Arial, sans-serif; font-size: 22px; }
.pl-table td:last-child { color: var(--muted); font-family: var(--font-body); font-size: 13px; }
.pl-table tr:last-child > * { border-bottom: 0; }
.pl-source { margin-top: 35px !important; }
@media (max-width: 1000px) {
    .pl-reference-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .pl-reference-card { padding: 12px; }
}
@media (max-width: 760px) {
    .pl-reading-pair strong { font-size: 36px; }
    .pl-reference-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
    .pl-reference-card { padding: 12px; }
    .pl-detail-content { padding: 20px; gap: 20px; }
    .pl-table th, .pl-table td { padding: 13px 14px; }
    .pl-table td { font-size: 19px; }
    .pl-table td:last-child { font-size: 12px; }
}
@media (max-width: 450px) {
    .pl-reading-pair { gap: 9px; }
    .pl-reading-pair > span { min-height: 95px; padding: 12px 5px; }
    .pl-reading-pair strong { font-size: 29px; }
    .pl-first-word .zl-word-result { gap: 18px; }
    .pl-first-word .zl-word-result > span { font-size: 66px; }
    .pl-first-word .zl-word-result strong { font-size: 23px; }
    .pl-first-word .zl-word-result small { font-size: 11px; }
    .pl-path-art { font-size: 27px; }
    .pl-reference-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .pl-reference-card { padding: 10px 9px; border-radius: 10px; }
    .pl-spelling { font-size: 29px; }
    .pl-example { gap: 3px 7px; }
    .pl-example > :first-child { font-size: 20px; }
    .pl-pinyin { font-size: 12px; }
    .pl-zhuyin { font-size: 11px; }
    .pl-gloss { font-size: 10px; }
    .pl-detail-content { grid-template-columns: 1fr; gap: 12px; padding: 16px 20px 22px; }
    .pl-detail-spelling { padding: 0; font-size: 43px; }
    .pl-detail-content h2 { font-size: 21px; }
    .pl-detail-content p { font-size: 13px; }
    .pl-neutral-example { flex-basis: 42px; padding-top: 12px; font-size: 28px; }
    .pl-key-flow { gap: 6px; }
    .pl-key-flow kbd { min-width: 29px; min-height: 32px; padding: 3px 6px; font-size: 14px; }
    .pl-key-flow > strong { font-size: 27px; }
    .pl-table th, .pl-table td { padding: 11px 8px; }
    .pl-table thead th { font-size: 10px; }
    .pl-table tbody th { font-size: 24px; }
    .pl-table td { font-size: 16px; }
    .pl-table td[lang="zh-Bopo"] { font-size: 15px; white-space: nowrap; }
    .pl-table td:last-child { font-size: 10px; }
    .pl-table th:first-child { width: 18%; }
    .pl-table th:nth-child(2) { width: 23%; }
    .pl-table th:nth-child(3) { width: 31%; }
    .pl-table th:last-child { width: 28%; }
}
@media (prefers-reduced-motion: reduce) { .pl-reference-card { transition: none; } }
@media print {
    @page { size: A4; margin: 12mm; }
    body:has(.pl-chart-sheet) { margin: 0; background: #fff !important; color: #111 !important; }
    body:has(.pl-chart-sheet) > :not(:has(.pl-chart-sheet)),
    body:has(.pl-chart-sheet) :is(#main, .resource-shell, #pl-learning) > :not(:has(.pl-chart-sheet)):not(.pl-chart-sheet) { display: none !important; }
    body:has(.pl-chart-sheet) :is(#main, .resource-shell, #pl-learning) { display: block; position: static; width: 100%; max-width: none; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; overflow: visible; background: #fff; }
    .pl-chart-sheet { width: 100%; color: #111; }
    .pl-chart-sheet :is(:focus, :focus-visible) { outline: none !important; box-shadow: none !important; }
    .pl-print-heading { display: block; margin-bottom: 10px; }
    .pl-print-heading h2 { color: #111; font-size: 22px; }
    .pl-print-heading p { color: #333; font-size: 10px; }
    .pl-reference-group { margin-top: 12px; break-inside: avoid; }
    .pl-reference-group .zl-group-heading { margin-bottom: 6px; }
    .pl-reference-group .zl-group-heading h2 { color: #111; font-size: 13px; }
    .pl-reference-group .zl-group-heading > span { color: #444; font-size: 9px; }
    .pl-reference-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
    .pl-reference-card { padding: 3px 7px; line-height: 1.25; border: 1px solid #bbb; border-radius: 5px; background: #fff !important; color: #111; break-inside: avoid; }
    .pl-spelling { color: #111; font-size: 20px; line-height: 1.1; }
    .pl-example { margin-top: 3px; padding-top: 3px; border-color: #ccc; gap: 4px; }
    .pl-example > :first-child { color: #111; font-size: 12px; }
    .pl-pinyin { color: #333; font-size: 10px; }
    .pl-zhuyin { min-height: 0; margin-top: 0; color: #444; font-size: 9px; line-height: 1.4; }
    .pl-gloss { margin-top: 1px; color: #444; font-size: 8px; line-height: 1.3; }
    .pl-print-note { display: block; margin-top: 12px !important; color: #333 !important; font-size: 9px; line-height: 1.5; }
}