.ct-tools .lt-field { margin-top:20px; }
.ct-tools .lt-field > p, .ct-result-note { font-size:12px; margin-top:8px; }
.ct-examples { margin:14px 0; }
.ct-examples > span { color:var(--muted); font-size:12px; }
.ct-output-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:20px; margin-bottom:22px; }
.ct-output-heading .lt-toolbar { margin:0; }
.ct-options { display:grid; grid-template-columns:minmax(180px,2fr) repeat(2,minmax(120px,1fr)); gap:16px; align-items:end; margin:0 0 22px; }
.ct-options .lt-field { margin:0; }
.ct-toggle { display:flex; gap:10px; align-items:center; font-size:13px; }
.ct-toggle input { accent-color:var(--accent); width:17px; height:17px; }
.ct-sheet { min-height:160px; padding:26px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.ct-sheet h3 { margin-bottom:12px; }
.ct-sheet .ct-sheet-meta { font-size:12px; margin-bottom:22px; }
.ct-reading { padding-inline:6px; font-family:Arial,"Microsoft JhengHei",sans-serif; font-size:30px; line-height:2.8; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--ink); }
.ct-reading ruby { ruby-align:center; margin-inline:6px; }
.ct-reading rt { font-family:var(--font-body); color:var(--muted); font-size:12px; line-height:1.5; }
.ct-sheet[data-size="24"] .ct-reading { font-size:24px; }
.ct-sheet[data-size="36"] .ct-reading { font-size:36px; }
.ct-sheet[data-readings="false"] rt { visibility:hidden; }
.ct-sheet[data-layout="lined"] .ct-reading { line-height:4; background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(4em - 1px),var(--line) calc(4em - 1px),var(--line) 4em); }
.ct-unread { text-decoration:underline dashed var(--muted); text-underline-offset:5px; }
.ct-tools .lt-status[data-error="true"] { color:var(--zl-error); }
.ct-alternatives { margin-top:22px; border-top:1px solid var(--line); padding-top:18px; }
.ct-alternatives summary,.ct-faq summary { cursor:pointer; font-weight:600; color:var(--ink); }
.ct-alternatives > p { font-size:13px; margin-top:12px; }
.ct-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:18px; }
.ct-choices label { display:flex; align-items:center; gap:12px; min-width:0; }
.ct-choices label > span { font-size:22px; flex-shrink:0; max-width:40%; overflow-wrap:anywhere; }
.ct-choices select { min-width:0; flex:1; font-size:13px; }
.ct-faq details { border-bottom:1px solid var(--line); padding:18px 0; }
.ct-faq h2 { margin-bottom:12px; }
.ct-faq details p { padding-top:12px; }
.ct-next-links { display:flex; flex-direction:column; gap:10px; }
.ct-tools :is(button,a,input,select,textarea,summary):focus-visible { outline-offset:-2px; }
@media(max-width:700px) { .ct-options { grid-template-columns:repeat(2,minmax(0,1fr)); }.ct-options .lt-field:first-child{grid-column:1/-1}.ct-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-sheet{padding:18px}.ct-reading{font-size:27px} }
@media(max-width:420px) { .ct-choices{grid-template-columns:1fr}.ct-sheet{padding:13px}.ct-output-heading .lt-toolbar{width:100%}.ct-output-heading .zl-button{flex:1}.ct-reading rt{font-size:11px} }
@media print {
    body:has(#cantonese-tools[data-mode="sheets"]) { background:#fff!important; color:#222!important; }
    body:has(#cantonese-tools[data-mode="sheets"]) :is(.site-header,.site-footer,.resource-breadcrumb,.resource-hero,.resource-topic-nav,.resource-learning-nav,.resource-tools-nav,.resource-next,.site-toast,.cookie-banner,dialog) { display:none!important; }
    body:has(#cantonese-tools[data-mode="sheets"]) .resource-shell { width:100%; max-width:none; margin:0; padding:0; }
    #cantonese-tools[data-mode="sheets"] > :not(.ct-results), #cantonese-tools[data-mode="sheets"] .ct-results > :not(.ct-sheet):not(.ct-result-note) { display:none!important; }
    #cantonese-tools[data-mode="sheets"] .ct-results,#cantonese-tools[data-mode="sheets"] .ct-sheet { border:0; box-shadow:none; padding:0; background:#fff!important; }
    #cantonese-tools[data-mode="sheets"] :is(.ct-reading,h3) { color:#222!important; }
    #cantonese-tools[data-mode="sheets"] :is(rt,.ct-sheet-meta,.ct-result-note) { color:#555!important; }
    #cantonese-tools[data-mode="sheets"] .ct-reading { --line:#ccc; }
    @page { margin:18mm; }
}
