/* Original Cangjie references; shared learning tokens support both appearances. */
.cj-learning { min-width: 0; }
.cj-learning :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select):focus-visible { outline-offset: -2px; }
.cj-learning .zl-quiz-result[data-correct="true"] { color: var(--zl-success); background: transparent; font-weight: 600; }
.cj-first-parts { display: flex; justify-content: center; align-items: center; gap: 15px; margin: 20px 0; }
.cj-first-parts > span { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 86px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 46px; }
.cj-first-parts > b { color: var(--muted); font-size: 22px; font-weight: 400; }
.cj-first-word .zl-word-result small { display: block; }
.cj-path-art { font-size: 31px; letter-spacing: 0; }
.cj-chart-intro { max-width: 920px; margin-bottom: 24px !important; }
.cj-reference-group { margin-top: 28px; }
.cj-reference-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 11px; }
.cj-reference-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); text-align: left; transition: border-color .15s, background .15s; }
.cj-reference-card:hover { border-color: var(--zl-accent); background: var(--accent-soft); }
.cj-root-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.cj-root { font-family: Arial, sans-serif; font-size: 39px; font-weight: 400; line-height: 1.4; }
.cj-root-top kbd { margin-top: 5px; color: var(--zl-accent); }
.cj-name { min-height: 20px; color: var(--muted); font-size: 11px; }
.cj-example { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.cj-example > :first-child { font-size: 25px; }
.cj-code { color: var(--zl-accent); font-family: Arial, sans-serif; font-size: 15px; letter-spacing: 1px; }
.cj-gloss { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.cj-hide-keys :is(.cj-key, .cj-code) { visibility: hidden; }
.cj-detail-content { display: grid; grid-template-columns: 100px 1fr; align-items: start; gap: 25px; padding: 25px; }
.cj-detail-root { display: flex; flex-direction: column; align-items: center; padding-top: 10px; }
.cj-detail-root > span { color: var(--zl-accent); font-size: 66px; line-height: 1.4; }
.cj-detail-root kbd { font-size: 18px; min-width: 35px; }
.cj-detail-content h2 { font-size: 24px; }
.cj-detail-content p { margin-top: 10px; font-size: 14px; }
.cj-print-heading, .cj-print-note { display: none; }
.cj-no-js { margin-top: 22px !important; font-size: 13px; }
.cj-structure-demo { padding: 25px; border-radius: 18px; background: var(--canvas); text-align: center; }
.cj-demo-character { display: block; color: var(--ink); font-size: 95px; line-height: 1.3; }
.cj-structure-demo > div { display: flex; align-items: center; justify-content: center; gap: 25px; margin: 12px 0; }
.cj-structure-demo > div span { font-size: 43px; }
.cj-structure-demo small { display: block; color: var(--zl-accent); font-family: Arial, sans-serif; font-size: 19px; }
.cj-structure-demo > strong { display: block; margin: 18px 0 8px; font-family: Arial, sans-serif; font-size: 20px; }
.cj-structure-demo p { font-size: 12px; }
.cj-decomposition-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cj-decomposition-card { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cj-decomposition-top { display: flex; align-items: center; gap: 17px; }
.cj-decomposition-top > span { font-size: 57px; line-height: 1.4; }
.cj-decomposition-top .zl-kicker { margin: 0 0 6px; font-size: 9px; letter-spacing: .8px; }
.cj-decomposition-top h3 { font-family: Arial, sans-serif; font-size: 23px; letter-spacing: 2px; }
.cj-parts-diagram { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 18px 0; padding: 12px 4px; border-radius: 11px; background: var(--canvas); }
.cj-parts-diagram > span:not(.cj-diagram-result) { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 47px; }
.cj-parts-diagram b { color: var(--ink); font-size: 31px; font-weight: 400; }
.cj-parts-diagram .cj-diagram-result { color: var(--muted); font-size: 16px; }
.cj-diagram-result strong { color: var(--zl-accent); font-family: Arial, sans-serif; font-size: 17px; }
.cj-decomposition-card p { font-size: 12px; line-height: 1.75; }
.cj-key-flow { display: flex; align-items: center; gap: 10px; margin-top: 17px; }
.cj-key-flow kbd { min-width: 38px; min-height: 38px; font-size: 18px; }
.cj-key-flow strong { color: var(--zl-accent); font-size: 38px; font-weight: 400; }
.cj-greeting > span { font-size: 100px; }
.cj-quick-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 22px; border-radius: 18px; background: var(--canvas); text-align: center; }
.cj-quick-demo > span { grid-column: 1 / -1; font-size: 88px; line-height: 1.3; }
.cj-quick-demo > div { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cj-quick-demo small { display: block; color: var(--muted); font-size: 11px; }
.cj-quick-demo strong { font-family: Arial, sans-serif; font-size: 34px; letter-spacing: 3px; }
.cj-quick-demo em { color: var(--zl-accent); font-style: normal; }
.cj-quick-demo > p { grid-column: 1 / -1; font-size: 12px; }
.cj-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cj-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.cj-table th, .cj-table td { padding: 15px 22px; border-bottom: 1px solid var(--line); }
.cj-table thead th { color: var(--muted); background: var(--canvas); font-size: 12px; }
.cj-table tbody th { color: var(--ink); font-size: 29px; font-weight: 400; }
.cj-table td { color: var(--ink); font-family: Arial, sans-serif; font-size: 22px; letter-spacing: 1px; }
.cj-table td:last-child { color: var(--muted); font-family: var(--font-body); font-size: 13px; letter-spacing: 0; }
.cj-table tr:last-child > * { border-bottom: 0; }
@media (max-width: 1100px) { .cj-reference-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .cj-decomposition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cj-reference-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; } .cj-reference-card { padding: 12px; } .cj-detail-content { padding: 22px; gap: 16px; } .cj-table th, .cj-table td { padding: 13px 14px; } }
@media (max-width: 450px) {
 .cj-reference-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
 .cj-reference-card { padding: 11px 9px; border-radius: 10px; }
 .cj-root { font-size: 32px; } .cj-root-top { gap: 2px; } .cj-root-top kbd { min-width: 21px; padding-inline: 4px; font-size: 10px; }
 .cj-name { font-size: 10px; } .cj-example > :first-child { font-size: 22px; } .cj-code { font-size: 12px; letter-spacing: .5px; } .cj-gloss { font-size: 9px; }
 .cj-path-art { font-size: 27px; }
 .cj-detail-content { grid-template-columns: 1fr; padding: 18px 22px 24px; gap: 15px; }
 .cj-detail-root { flex-direction: row; justify-content: center; gap: 20px; padding-top: 0; }
 .cj-detail-root > span { font-size: 53px; } .cj-detail-content h2 { font-size: 21px; }
 .cj-decomposition-grid { grid-template-columns: 1fr; }
 .cj-decomposition-card { padding: 22px; }
 .cj-parts-diagram { justify-content: flex-start; padding-inline: 14px; gap: 16px; }
 .cj-table th, .cj-table td { padding: 11px 8px; } .cj-table thead th { font-size: 10px; } .cj-table td { font-size: 16px; letter-spacing: 0; } .cj-table tbody th { font-size: 26px; } .cj-table td:last-child { font-size: 11px; }
 .cj-table th:first-child { width: 22%; } .cj-table th:nth-child(2) { width: 26%; } .cj-table th:nth-child(3) { width: 21%; } .cj-table th:last-child { width: 31%; }
}
@media (prefers-reduced-motion: reduce) { .cj-reference-card { transition: none; } }
@media print {
 @page { size: A4; margin: 12mm; }
 html:has(.cj-chart-sheet) { background: #fff !important; }
 body:has(.cj-chart-sheet) { margin: 0; background: #fff !important; color: #111 !important; }
 body:has(.cj-chart-sheet) > :not(:has(.cj-chart-sheet)), body:has(.cj-chart-sheet) :is(#main, .resource-shell, #cj-learning) > :not(:has(.cj-chart-sheet)):not(.cj-chart-sheet) { display: none !important; }
 body:has(.cj-chart-sheet) :is(#main, .resource-shell, #cj-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; }
 .cj-chart-sheet { width: 100%; color: #111; }
 .cj-chart-sheet :is(:focus, :focus-visible) { outline: none !important; box-shadow: none !important; }
 .cj-print-heading { display: block; margin-bottom: 14px; } .cj-print-heading h2 { color: #111; font-size: 23px; } .cj-print-heading p { color: #444; font-size: 10px; }
 .cj-reference-group { margin-top: 16px; break-inside: avoid; } .cj-reference-group .zl-group-heading { margin-bottom: 7px; } .cj-reference-group .zl-group-heading h2 { color: #111; font-size: 14px; } .cj-reference-group .zl-group-heading > span { color: #444; font-size: 10px; }
 .cj-reference-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
 .cj-reference-card { padding: 6px 8px; border: 1px solid #bbb; border-radius: 5px; background: #fff !important; color: #111; break-inside: avoid; }
 .cj-root { color: #111; font-size: 26px; } .cj-root-top kbd { color: #111; border-color: #bbb; background: #fff; min-width: 18px; min-height: 21px; padding: 1px 3px; font-size: 10px; }
 .cj-name { color: #444; font-size: 8px; min-height: 0; } .cj-example { margin-top: 4px; padding-top: 3px; border-color: #ccc; } .cj-example > :first-child { color: #111; font-size: 17px; } .cj-code { color: #333; font-size: 10px; letter-spacing: .5px; } .cj-gloss { margin-top: 1px; color: #444; font-size: 8px; }
 .cj-print-note { display: block; margin-top: 15px !important; color: #333 !important; font-size: 9px; line-height: 1.5; }
}
