:root{--bg:#fafafa;--surface:#fff;--text:#111;--muted:#6b6b6b;--border:#e5e5e5;--strong:#cfcfcf}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans TC",Arial,sans-serif}button,input,textarea,select{font:inherit;color:inherit}button,select,summary{cursor:pointer}button{background:#fff;border:1px solid var(--strong);padding:10px 15px;min-height:44px;border-radius:0}button:hover:not(:disabled){background:#f2f2f2}button:disabled{opacity:.4;cursor:not-allowed}button.primary{color:white;background:#111;border-color:#111}button.primary:hover:not(:disabled){background:#333}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #111;outline-offset:3px}a{color:inherit}[hidden]{display:none!important}h1,h2,h3,p{margin:0}h1{font-size:1.6rem;line-height:1.12;letter-spacing:-.03em}h2{font-size:1.05rem;letter-spacing:-.01em}h3{font-size:1rem}.page{width:min(100%,1120px);margin:auto;padding:26px 24px}.topbar{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);padding-bottom:24px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:24px;font-weight:700;line-height:1.1}.brand-sub{display:block;font-size:10px;letter-spacing:.13em;font-weight:500;margin-top:5px}.header-note{font-size:14px;color:var(--muted)}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:32px 0 26px}.page-heading p{margin-top:9px;color:var(--muted);font-size:15px}.muted{color:var(--muted)}.small{font-size:14px}.tabs{display:flex;border-bottom:1px solid var(--strong);gap:4px;margin-bottom:30px}.tabs button{border:none;background:transparent;padding:12px 26px;border-bottom:3px solid transparent;margin-bottom:-1px;font-weight:600;display:flex;align-items:center;gap:12px}.tabs button.active{border-bottom-color:#111;background:#f0f0f0}.tab-symbol{font-family:Georgia,serif;font-size:23px;font-weight:400;min-width:24px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.section-heading p{font-size:14px;color:var(--muted);margin-top:5px}.search-row{display:flex;gap:10px}.search{display:flex;align-items:center;flex:1;background:white;border:1px solid var(--strong);padding-left:16px;gap:10px}.search span{font-size:26px}.search input{width:100%;min-width:0;background:transparent;border:0;padding:12px;outline-offset:0}.filters{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 24px}.filters button{font-size:14px;min-height:44px;padding:8px 13px}.filters button.selected{background:#111;color:white;border-color:#111}.symbol-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px}.symbol-card{position:relative;background:white;border:1px solid var(--border);min-width:0}.symbol-copy{border:0;width:100%;height:114px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:14px 4px 10px}.symbol-glyph{font:30px/1.2 Georgia,"Times New Roman",serif}.symbol-name{font-size:12px;color:#606060;line-height:1.25;text-align:center}.favorite{position:absolute;top:0;right:0;padding:0;width:44px;min-height:44px;border:0;background:transparent;font-size:19px;color:#767676}.favorite[aria-pressed="true"]{color:#111}.symbol-copy:hover{box-shadow:inset 0 0 0 1px #111}.bottom-note{display:flex;gap:12px;align-items:center;padding:20px 0;margin-top:20px;font-size:14px;color:var(--muted)}.bottom-note>span{font-size:11px;letter-spacing:.1em;font-weight:700;color:#111}.workspace{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}.editor-column,.preview-column{min-width:0}.card{background:white;border:1px solid var(--border);padding:22px}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}.eyebrow{font-size:11px;letter-spacing:.09em;color:var(--muted)}.structure-buttons{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:20px}.structure-buttons button{font-size:14px;padding:8px 11px}.structure-buttons button.selected{border-color:#111;background:#f2f2f2}.builder-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.builder-fields label{display:flex;flex-direction:column;font-size:14px;gap:6px}.builder-fields input,.builder-fields select{width:100%;min-width:0;padding:10px;border:1px solid var(--strong);border-radius:0;background:white}.builder-fields .wide{grid-column:1/-1}.builder-actions{display:flex;gap:12px;align-items:center;margin-top:18px}.input-card{margin-top:18px}.input-card label{font-weight:600}.text-button{border:0;padding:0 8px;min-height:30px;font-size:14px;text-decoration:underline}.input-card textarea{width:100%;resize:vertical;border:1px solid var(--strong);padding:12px;background:#fafafa;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:16px;line-height:1.6}.input-card p{margin:10px 0}.input-card details{font-size:14px;border-top:1px solid var(--border);padding-top:12px}.guide{margin-top:10px;line-height:1.8}.guide code{background:#f5f5f5;padding:2px 4px}.history-actions{display:flex;gap:7px}.history-actions button{font-size:14px}.preview{min-height:230px;display:flex;align-items:center;justify-content:center;padding:26px 12px;overflow:auto;border:1px solid var(--border);background-color:white;background-image:linear-gradient(45deg,#f3f3f3 25%,transparent 25%),linear-gradient(-45deg,#f3f3f3 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#f3f3f3 75%),linear-gradient(-45deg,transparent 75%,#f3f3f3 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}.preview.white{background-image:none}.preview mjx-container{flex-shrink:0;max-width:none}.preview:has(mjx-container){justify-content:safe center}.preview-settings{display:flex;flex-wrap:wrap;gap:18px;margin:18px 0}.preview-settings label{display:flex;align-items:center;gap:8px;font-size:14px}.preview-settings select{border:1px solid var(--strong);padding:8px;min-height:44px;background:white;border-radius:0}.export-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.export-buttons .primary{grid-column:1/-1}.export-buttons button{font-size:14px}.preview-card>p{margin-top:12px}.preview-meta{border-top:1px solid var(--border);margin-top:18px;padding-top:16px;display:flex;flex-direction:column;gap:12px;font-size:12px;color:var(--muted)}.preview-meta button{font-size:14px;color:#111}.template-section,.saved-section{margin-top:28px}.template-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.template{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:14px;padding:16px;min-height:114px;border-color:var(--border)}.template .sample{font:22px/1.4 Georgia,serif}.template .template-name{font-size:14px;color:var(--muted)}.saved-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}.saved-item{display:flex;min-width:0;border:1px solid var(--border);background:#fff}.saved-item>button:first-child{flex:1;text-align:left;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,monospace;font-size:14px}.saved-item>button:last-child{border:0;border-left:1px solid var(--border);font-size:14px}.empty{padding:36px 20px;text-align:center;border:1px dashed var(--strong);color:var(--muted);grid-column:1/-1}.error{color:#b42318;background:#fdeceb;padding:10px;border:1px solid #e7b8b4;font-size:14px;overflow-wrap:anywhere}footer{margin-top:42px;padding-top:22px;border-top:1px solid var(--border);font-size:12px;color:var(--muted);display:flex;gap:16px;flex-wrap:wrap;justify-content:space-between}.about{max-width:380px}.about p{margin:12px 0}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#111;color:#fff;padding:13px 22px;max-width:calc(100% - 32px);font-size:14px;z-index:10;box-shadow:0 3px 16px #0002}dialog{max-width:480px;width:calc(100% - 32px);border:1px solid #111;padding:24px}dialog::backdrop{background:#0006}dialog p{margin:12px 0}dialog textarea{width:100%;padding:10px;margin-bottom:16px}
@media(max-width:900px){.symbol-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.header-note{display:none}.workspace{grid-template-columns:1fr}.template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.preview{min-height:190px}.page-heading{align-items:flex-start}.page-heading>span{font-size:12px;max-width:100px}}
@media(max-width:560px){.page{padding:20px 14px}.page-heading{margin-top:26px}.page-heading>span{display:none}.tabs button{flex:1;justify-content:center;padding:10px 8px;font-size:14px;gap:7px}.tabs{gap:0}.symbol-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.symbol-copy{height:118px}.search-row>button{font-size:14px;padding:8px}.search input{font-size:14px;padding-left:0}.section-heading{align-items:flex-start}.section-heading>span{font-size:12px}.card{padding:18px}.eyebrow{font-size:10px}.builder-actions{flex-wrap:wrap}.builder-fields{grid-template-columns:1fr}.builder-fields .wide{grid-column:auto}.saved-list{grid-template-columns:1fr}.template{padding:14px}.preview-settings{gap:10px}.history-actions button{padding:8px}.bottom-note{align-items:flex-start}footer{gap:8px}.about{width:100%}}
@media(prefers-reduced-motion:no-preference){button{transition:background-color .12s}}
/* Keep the accessible MathML available to assistive technology without duplicating the SVG visually. */
mjx-assistive-mml{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
mjx-container[jax="SVG"]{direction:ltr;line-height:0;display:inline-block}mjx-container[jax="SVG"]>svg{overflow:visible;min-height:1px;min-width:1px}.symbol-name{font-size:14px}.symbol-copy{height:128px;padding-top:22px}
