/* 汉字库：彩图与笔顺始终在同一个详情窗。 */
html body.hanzi-page #hz-dialog{width:min(1180px,calc(100% - 24px));max-height:94dvh}
html body.hanzi-page #hz-dialog .hz-head{margin-top:8px}
html body.hanzi-page #hz-dialog .hz-heading b{font-size:2.5rem}
html body.hanzi-page .hz-unified{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.18fr);gap:24px;align-items:start}
html body.hanzi-page .hz-unified>.hz-panel{min-width:0;margin-top:12px}
html body.hanzi-page .hz-unified .picture-stage{height:min(50vh,440px);aspect-ratio:auto;background:#fff;border:1px solid #e1e8df;border-radius:10px}
html body.hanzi-page .hz-unified .picture-audio{display:grid;grid-template-rows:minmax(0,1fr);place-items:center;width:100%;height:100%;padding:10px;border:0;background:#fff;cursor:pointer}
html body.hanzi-page .hz-unified #hz-step-img{display:block;width:100%;height:100%;min-height:0;min-width:0;object-fit:contain;background:#fff}
html body.hanzi-page .hz-unified .stroke-host{margin-top:0}
html body.hanzi-page .hz-unified .sp-body{gap:12px}
html body.hanzi-page .hz-unified .sp-rail{grid-template-columns:repeat(auto-fill,minmax(56px,1fr))}
html body.hanzi-page #hz-dialog .sp-bar{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:5px;width:100%;overflow-x:auto;padding:2px 0 6px;scrollbar-width:thin}
html body.hanzi-page #hz-dialog .sp-bar :is(.sp-modes,.sp-colors,.sp-tools){display:flex;align-items:center;flex:0 0 auto;flex-wrap:nowrap;gap:5px;margin:0!important}
html body.hanzi-page #hz-dialog .sp-bar .sp-colors{margin-left:auto!important}
html body.hanzi-page #hz-dialog .sp-bar button{flex:0 0 auto;min-height:34px!important;padding:5px 8px!important;font-size:13px!important;white-space:nowrap}
html body.hanzi-page .hz-example-picker{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 14px;font:600 15px/1.4 "Noto Sans SC",sans-serif}
html body.hanzi-page .hz-example-picker[hidden]{display:none}
html body.hanzi-page .hz-example-picker button{min-width:42px;padding:7px 10px;border:1px solid #ccdccd;background:#fff;color:#285339;border-radius:6px;font:600 19px/1.2 "Noto Sans SC",sans-serif}
html body.hanzi-page .hz-example-picker button[aria-pressed=true]{background:#2d5a3d;color:#fff;border-color:#2d5a3d}
html body.hanzi-page .hz-stroke-groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:16px}
html body.hanzi-page .hz-stroke-group{min-width:0}
html body.hanzi-page .hz-stroke-picture{display:grid;justify-items:center;gap:7px;width:100%;padding:10px;border:1px solid #dce7dc;border-radius:8px;background:#fff;color:#254b35;cursor:pointer;font:600 16px/1.3 "Noto Sans SC",sans-serif}
html body.hanzi-page .hz-stroke-picture:hover,html body.hanzi-page .hz-stroke-picture:focus-visible{border-color:#5a9468;box-shadow:0 0 0 2px #dcecdf}
html body.hanzi-page .hz-stroke-picture img{display:block;width:100%;height:220px;object-fit:contain}
html body.hanzi-page .hz-stroke-examples{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}
html body.hanzi-page .hz-stroke-examples .hz-mini{width:100%;min-width:0;padding:4px 0}
html body.hanzi-page .hz-stroke-examples .hz-mini b{font-size:24px}
html body.hanzi-page .hz-stroke-examples .hz-mini .py{font-size:10px}
html body.hanzi-page #hz-jj-books{justify-content:center!important;gap:6px!important;width:max-content;max-width:100%;margin-inline:auto}
html body.hanzi-page #hz-jj-books button{padding:7px 14px!important;font-size:15px!important}
html body.hanzi-page .hz-find-launch{margin-left:auto;padding:7px 13px;border:1px solid #9ebfa6;border-radius:7px;background:#fff;color:#28533a;font:600 14px/1.3 "Noto Sans SC",sans-serif;cursor:pointer}
html body.hanzi-page .hz-find-launch[aria-expanded=true]{background:#315b3c;color:#fff}
html body.hanzi-page .hz-finder-panel{margin-top:18px;padding:22px;border:1px solid #d7e4d6;border-radius:12px;background:#f8faf7}
html body.hanzi-page .hz-finder-panel[hidden]{display:none!important}
html body.hanzi-page .hz-finder-host{display:grid;justify-items:center;gap:18px}
html body.hanzi-page .hz-character-row .hz-stroke-open{display:grid;gap:5px;justify-items:center;color:#28533a;font:600 14px/1.3 "Noto Sans SC",sans-serif;cursor:pointer}
html body.hanzi-page .hz-character-row .hz-stroke-open:hover,html body.hanzi-page .hz-character-row .hz-stroke-open:focus-visible{outline:2px solid #7cab84;outline-offset:2px}
@media(max-width:850px){html body.hanzi-page .hz-unified{grid-template-columns:1fr}html body.hanzi-page .hz-unified .picture-stage{height:min(58vh,500px)}}
@media(max-width:600px){html body.hanzi-page .hz-stroke-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}html body.hanzi-page .hz-stroke-picture img{height:190px}html body.hanzi-page .hz-unified .sp-body{grid-template-columns:1fr}html body.hanzi-page #hz-jj-books{width:100%;justify-content:flex-start!important}}
