:root{color:#1f2937;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--bg-page:#f8fafc;--text:#475569;--text-h:#0f172a;--bg:#fff;--border:#e2e8f0;--code-bg:#f8fafc;--accent:#4f46e5;--accent-bg:#4f46e51a;--accent-border:#4f46e559;--shadow:0 18px 40px #0f172a14;--mono:"SFMono-Regular", Consolas, "Liberation Mono", monospace;background:#f8fafc;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-weight:400;line-height:1.5}*{box-sizing:border-box}body{background:var(--bg-page);min-height:100vh;margin:0}#root{min-height:100vh}button,input,textarea{font:inherit}h1,h2,p{margin:0}.app{max-width:1200px;margin:0 auto;padding:1rem}.tabs{border-bottom:1px solid var(--border);gap:.25rem;margin-bottom:1rem;display:flex}.tab{cursor:pointer;color:var(--text);background:0 0;border:0;border-bottom:2px solid #0000;margin-bottom:-1px;padding:.6rem 1rem;font-weight:600}.tab.active{color:var(--accent);border-bottom-color:var(--accent)}.toolbar{flex-wrap:wrap;align-items:center;gap:.5rem;margin-bottom:.75rem;display:flex}.status{color:var(--text);margin-left:.25rem;font-size:.875rem}.btn{cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid var(--border);background:var(--bg);color:var(--text-h);border-radius:8px;padding:.45rem .9rem;font-weight:500;display:inline-block}.btn:hover:not(:disabled){border-color:var(--accent)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn:disabled{opacity:.45;cursor:not-allowed}textarea{resize:vertical;border:1px solid var(--border);width:100%;min-height:75vh;font:.9rem/1.55 var(--mono);background:var(--code-bg);color:var(--text-h);border-radius:8px;padding:.75rem}.split{grid-template-columns:1fr 1fr;gap:.75rem;display:grid}.preview{border:1px solid var(--border);background:#fff;border-radius:8px;min-height:75vh;max-height:75vh;padding:1.25rem;overflow:auto}@media (width<=800px){.split{grid-template-columns:1fr}textarea,.preview{min-height:45vh;max-height:none}}.dropping{outline:2px dashed var(--accent);outline-offset:6px;background:var(--accent-bg);border-radius:8px}.image-list{gap:.5rem;padding-left:2rem;display:grid}.image-item{border:1px solid var(--border);background:var(--bg);border-radius:8px;align-items:center;gap:.75rem;min-width:0;padding:.5rem;display:flex}.image-preview-button{background:var(--code-bg);cursor:zoom-in;border:0;border-radius:4px;flex:0 0 64px;width:64px;height:64px;padding:0;display:block}.image-preview-button img{object-fit:contain;border-radius:inherit;width:100%;height:100%}.image-item>span{overflow-wrap:anywhere;flex:1}.image-actions{gap:.35rem;display:flex}@media (width<=650px){.image-item{flex-wrap:wrap}.image-actions{width:100%}}.image-lightbox{z-index:10;background:#0f172ac7;place-items:center;padding:1rem;display:grid;position:fixed;inset:0}.image-lightbox-panel{background:var(--bg);border-radius:10px;flex-direction:column;width:min(100%,1000px);max-height:90vh;padding:.75rem;display:flex}.image-lightbox-header{justify-content:space-between;align-items:center;gap:1rem;padding-bottom:.75rem;display:flex}.image-lightbox-header span{overflow-wrap:anywhere}.image-lightbox-panel>img{object-fit:contain;width:100%;min-height:0;max-height:calc(90vh - 4rem)}.md-body{color:#111;overflow-wrap:break-word;font-family:Georgia,Times New Roman,serif;font-size:11pt;line-height:1.6}.md-body>:first-child{margin-top:0}.md-body h1,.md-body h2,.md-body h3,.md-body h4,.md-body h5,.md-body h6{break-after:avoid;margin:1.4em 0 .5em;font-family:system-ui,-apple-system,Segoe UI,Arial,sans-serif;line-height:1.25}.md-body h1{border-bottom:1px solid #ccc;padding-bottom:.2em;font-size:22pt}.md-body h2{border-bottom:1px solid #e5e5e5;padding-bottom:.15em;font-size:17pt}.md-body h3{font-size:14pt}.md-body h4,.md-body h5,.md-body h6{font-size:12pt}.md-body p,.md-body ul,.md-body ol,.md-body blockquote,.md-body pre,.md-body table{margin:0 0 .9em}.md-body ul,.md-body ol{padding-left:1.6em}.md-body li{margin:.15em 0}.md-body a{color:#1d4ed8;text-decoration:none}.md-body img{break-inside:avoid;max-width:100%}.md-body hr{border:0;border-top:1px solid #ccc;margin:1.5em 0}.md-body blockquote{color:#444;border-left:3px solid #bbb;padding:.1em 1em}.md-body code{background:#f3f4f6;border-radius:3px;padding:.1em .35em;font-family:Consolas,SFMono-Regular,Liberation Mono,monospace;font-size:.9em}.md-body pre{white-space:pre-wrap;break-inside:avoid;background:#f3f4f6;border-radius:4px;padding:.8em 1em}.md-body pre code{background:0 0;padding:0;font-size:9.5pt}.md-body table{border-collapse:collapse;width:100%;font-size:10pt}.md-body th,.md-body td{text-align:left;border:1px solid #ccc;padding:.35em .6em}.md-body th{background:#f3f4f6}.md-body tr{break-inside:avoid}.md-body .mermaid-block{text-align:center;break-inside:avoid;margin:0 0 1em}.md-body .mermaid-block svg{max-width:100%;height:auto}.md-body .mermaid-error{color:#b42318;background:#fef2f2;border:1px solid #fecaca;font-size:9.5pt}.btn.is-disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.pe-color input{cursor:pointer;border:1px solid var(--border);background:var(--bg);border-radius:8px;width:38px;height:34px;padding:2px}.pe-panel{border:1px solid var(--border);background:var(--bg);border-radius:8px;flex-wrap:wrap;align-items:center;gap:.6rem;min-height:46px;margin-bottom:.75rem;padding:.4rem .6rem;display:flex}.pe-field{color:var(--text);align-items:center;gap:.4rem;font-size:.85rem;display:inline-flex}.pe-text-input{resize:vertical;min-width:160px;height:2.3rem;min-height:0;font:.9rem/1.3 var(--mono);flex:200px;padding:.35rem .5rem}.pe-viewport{border:1px solid var(--border);background:#e2e8f0;border-radius:8px;flex-direction:column;align-items:center;gap:1.25rem;max-height:78vh;padding:1rem;display:flex;overflow:auto}.pe-page-block{flex:none}.pe-page-head{color:var(--text);justify-content:space-between;align-items:center;margin-bottom:.3rem;font-size:.8rem;display:flex}.pe-page-actions{gap:.2rem;display:inline-flex}.pe-page-actions button{cursor:pointer;border:1px solid var(--border);background:var(--bg);min-width:28px;height:26px;color:var(--text-h);border-radius:6px;line-height:1}.pe-page-actions button:hover:not(:disabled){border-color:var(--accent)}.pe-page-actions button:disabled{opacity:.35;cursor:not-allowed}.pe-page{box-shadow:var(--shadow);background:#fff;position:relative}.pe-page canvas{display:block}.pe-overlay{touch-action:pan-x pan-y;position:absolute;inset:0;overflow:hidden}.pe-overlay.tool-text{cursor:text;touch-action:none}.pe-overlay.tool-draw,.pe-overlay.tool-highlight,.pe-overlay.tool-cover{cursor:crosshair;touch-action:none}.pe-overlay.tool-check{cursor:crosshair}.ann{touch-action:none;-webkit-user-select:none;user-select:none;position:absolute}.ann-text{white-space:pre;cursor:move;font-family:Helvetica,Arial,sans-serif;line-height:1.2}.ann-image{cursor:move;height:auto;display:block}.ann-highlight,.ann-cover{cursor:move}.ann.sel{outline:1.5px dashed var(--accent);outline-offset:2px}.ann-svg{pointer-events:none;position:absolute;inset:0;overflow:visible}.pe-empty{border:1px dashed var(--border);color:var(--text);border-radius:8px;justify-items:center;gap:.6rem;padding:4rem 1rem;display:grid}.pe-footer{margin-top:.5rem}.pe-overlay.tool-edit{cursor:default;touch-action:pan-x pan-y}.pe-textbox{cursor:text;touch-action:manipulation;position:absolute}.pe-textbox:hover{outline:1px solid var(--accent);background:#4f46e524}.ann-retext{cursor:text}.ann-retext-text{white-space:pre;pointer-events:none;line-height:1.2;position:absolute}.pe-bi{min-width:34px;padding:.35rem .5rem}.pe-toggle{color:var(--text);cursor:pointer;align-items:center;gap:.35rem;margin-left:auto;font-size:.85rem;display:inline-flex}.pe-cell{cursor:text;touch-action:manipulation;border-radius:2px;position:absolute}.pe-cell.show.empty{outline-offset:-1px;background:#10b98112;outline:1px dashed #10b9818c}.pe-cell.show:not(.empty){outline-offset:-1px;outline:1px solid #4f46e51f}.pe-cell.empty:hover{background:#10b98133;outline:1.5px solid #10b981}.pe-cell:not(.empty):hover{background:#4f46e514}.pe-fit-room{pointer-events:none;background:#4f46e50a;border-left:1px dashed #4f46e58c;border-right:1px dashed #4f46e58c;position:absolute}.pe-fit-bbox{pointer-events:none;outline-offset:1px;border-radius:2px;outline:1.5px solid #10b981;position:absolute}.pe-fit-bbox.tone-shrunk,.pe-fit-bbox.tone-wrapped{outline-color:#f59e0b}.pe-fit-bbox.tone-overflow{background:#ef44441a;outline-color:#ef4444}.pe-fitbar{z-index:5;color:#78350f;touch-action:manipulation;background:#fffbeb;border:1px solid #f59e0b;border-radius:8px;flex-wrap:wrap;align-items:center;gap:.4rem;max-width:300px;padding:.3rem .5rem;font-size:.78rem;line-height:1.3;display:flex;position:absolute;box-shadow:0 4px 12px #00000026}.pe-fitbar.bad{color:#7f1d1d;background:#fef2f2;border-color:#ef4444}.pe-fitbar button{cursor:pointer;color:var(--text-h);border:1px solid var(--border);background:#fff;border-radius:6px;padding:.15rem .5rem;font-size:.78rem}.pe-fitbar button:hover{border-color:var(--accent)}.pe-fitrow{flex-wrap:wrap;flex:1 0 100%;align-items:center;gap:.5rem .9rem;display:flex}.pe-seg{color:var(--text);align-items:center;gap:.25rem;font-size:.8rem;display:inline-flex}.pe-seg-label{margin-right:.2rem}.pe-seg-btn{cursor:pointer;color:var(--text-h);border:1px solid var(--border);background:var(--bg);border-radius:6px;padding:.2rem .55rem;font-size:.8rem}.pe-seg-btn:hover{border-color:var(--accent)}.pe-seg-btn.on{color:#fff;border-color:var(--accent);background:var(--accent)}.pe-fitchip{border:1px solid #0000;border-radius:999px;padding:.2rem .55rem;font-size:.78rem;line-height:1.3}.pe-fitchip.tone-ok{color:#065f46;background:#ecfdf5;border-color:#a7f3d0}.pe-fitchip.tone-info{color:#92400e;background:#fffbeb;border-color:#fde68a}.pe-fitchip.tone-warn{color:#92400e;background:#fef3c7;border-color:#f59e0b}.pe-fitchip.tone-bad{color:#991b1b;background:#fef2f2;border-color:#fca5a5}.pe-font-select{min-width:150px;max-width:200px;color:var(--text-h);border:1px solid var(--border);background:var(--bg);border-radius:6px;padding:.3rem .4rem;font-size:.85rem}.pe-box{cursor:pointer;touch-action:manipulation;border-radius:2px;position:absolute}.pe-box.show{outline-offset:2px;outline:1.5px dashed #10b981cc}.pe-box:hover{outline-offset:2px;background:#10b98140;outline:2px solid #10b981}.pe-box.on.show{outline-style:solid}.ann-clip{pointer-events:none;position:absolute}
