body{margin:0;font-family:system-ui,sans-serif;background:#f3f3f3}.app{max-width:1100px;margin:0 auto;padding:8px;box-sizing:border-box}.app h1{font-size:1.1rem;margin:4px 0 8px}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:8px}.toolbar button,.toolbar .btn{min-height:40px;padding:0 12px}.toolbar .btn{background:#222;color:#fff;border:0;border-radius:4px;cursor:pointer}.overlap-warning,.restore-notice,.export-panel .print-warning{background:#fff4d6;border:1px solid #e0b100;padding:8px;margin:0 0 8px;border-radius:4px}.toolbar-error{color:#b00020;margin:0}.hint{color:#666;margin:0 0 8px}.canvas-wrap{width:100%;background:#fff;box-shadow:0 1px 4px #0003;touch-action:none;line-height:0}.export-panel{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}.export-panel button,.export-panel input{min-height:40px}.export-panel .print-guide{margin:0;line-height:1.5}.export-result{flex-basis:100%;display:flex;flex-direction:column;gap:8px;align-items:flex-start}.export-result p{margin:0}.export-result .btn{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;background:#222;color:#fff;border-radius:4px;text-decoration:none}.preview-dialog{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:10}.preview-body{max-width:95vw;max-height:95vh;display:flex;flex-direction:column;gap:8px;align-items:center}.preview-body img{max-width:100%;max-height:85vh;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.chooser{background:#fff;padding:16px;border-radius:4px;box-shadow:0 1px 4px #0003}.chooser h2{font-size:1.05rem;margin:0 0 8px}.chooser p{line-height:1.5;margin:0 0 12px}.chooser-buttons{display:flex;flex-wrap:wrap;gap:12px}.chooser-buttons .btn{flex:1 1 200px;min-height:56px;font-size:1rem;background:#222;color:#fff;border:0;border-radius:4px;cursor:pointer}.surname-current{color:#444;font-size:.9rem}.example-dialog{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:10}.example-body{width:96vw;max-height:96vh;display:flex;flex-direction:column;gap:8px;align-items:stretch;background:#fff;padding:8px;border-radius:4px;box-sizing:border-box}.example-body .btn{align-self:flex-end;min-height:44px;padding:0 16px;background:#222;color:#fff;border:0;border-radius:4px;cursor:pointer}.example-scroll{overflow:auto;overscroll-behavior:contain;flex:1 1 auto;min-height:0;-webkit-overflow-scrolling:touch}.example-scroll img{display:block;width:100%;min-width:1400px;height:auto}.example-source{margin:0;font-size:.85rem;color:#555}.chooser-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:10;padding:16px;box-sizing:border-box}.chooser-overlay .chooser{max-width:560px;max-height:96vh;overflow:auto}.chooser h2:focus{outline:none}.chooser-buttons .btn{min-height:56px}.chooser-selected{margin-left:.25em;font-size:.85em}.chooser-cancel{min-height:44px;padding:0 16px;margin-top:12px;cursor:pointer}
