.frame-board-panel{color:#173f73}.board-local{display:inline-block;font-size:11px;color:#a34864;background:#fae9ee;border-radius:8px;padding:6px 9px;margin-bottom:16px}.board-types,.board-actions{display:flex;gap:8px;margin-bottom:14px}.board-types button,.board-actions button{flex:1;min-height:44px;border:1px solid #d9d6cf;background:#fffdf8;border-radius:12px;padding:10px 8px;color:inherit}.board-types [aria-pressed=true]{background:#173f73;color:#fff;border-color:#173f73}.board-help{font-size:12px;line-height:1.8;color:#697a8e;margin:12px 0}.board-actions button,.board-upload{background:#f8e4eb!important;border-color:#edd4dd!important}.board-upload{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #d5cec5;border-radius:12px;min-height:48px;color:inherit;font-size:13px}.board-template-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.board-template-grid button{background:#fffdf8;border:1px solid #ded8ce;border-radius:14px;color:#a34962;padding:13px;min-height:110px}.board-template-grid button[aria-pressed=true]{border:2px solid #173f73;background:#fff4f6}.board-template-grid svg{display:block;width:100%;height:80px;margin-bottom:8px}.board-template-grid span{font-size:12px;color:#173f73}.board-gaps{display:grid;grid-template-columns:1fr 1fr;gap:6px}.board-gaps span{font-size:12px;background:#f6f0e5;border-radius:8px;padding:8px}.board-backing{border-top:1px solid #e6dcd2;margin-top:22px;padding-top:18px;font-size:13px}.board-backing p,.board-backing small{font-size:12px;line-height:1.8;color:#738095}#boardNotice{font-size:12px;line-height:1.8;color:#426653;margin:14px 0}#boardNotice.error{color:#a23e59}#boardMinSize,#boardCustom button{width:100%;min-height:44px;border:1px solid #d6d4ce;background:#fffdf8;border-radius:12px;color:#173f73}#boardCustom{padding:12px;border:1px dashed #b98091;border-radius:12px}#boardCustom svg{width:100%;height:95px;display:block;color:#a34962}#boardCustom strong{display:block;font-size:12px;margin:8px 0}.board-study{font-size:10px;color:#8c9296;margin-top:18px}#boardEditLayer{touch-action:none}.board-preview-dialog{border:1px solid #d8c9c2;border-radius:22px;background:#fffaf1;color:#173f73;width:min(850px,96vw);padding:20px}.board-preview-dialog::backdrop{background:#20344b88}.board-preview-dialog header{display:flex;justify-content:space-between;align-items:center}.board-preview-dialog h2{font-size:20px;margin:0}.board-preview-dialog button{min-height:44px;background:#173f73;color:white;border:0;border-radius:10px;padding:8px 16px}.board-preview-stage{height:60vh;max-height:600px;margin:12px 0;border-radius:16px;overflow:hidden}.board-preview-note{font-size:12px;line-height:1.7}.frame-board-panel [hidden]{display:none!important}

.board-style-controls{display:grid;gap:12px;padding:14px 0;color:#173f73}.board-style-controls label{display:flex;align-items:center;justify-content:space-between;gap:8px}.board-style-controls input{width:74px;min-height:40px;background:#fffdf6;border:1px solid #d8d4cc;border-radius:9px;padding:8px;color:inherit}.board-style-controls small{color:#7a8190;line-height:1.7}
.frame-group-tools{display:flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:8px;margin:8px 0;color:#173f73;font-size:12px}.frame-group-tools[hidden],.frame-group-tools [hidden]{display:none!important}.frame-group-tools button{min-height:36px;padding:7px 14px;border:1px solid #d4d8dd;border-radius:10px;background:#fffdf6;color:inherit;font:inherit}.frame-group-tools #selectAllMaterials{background:#f7e3e9}.frame-group-tools p{width:100%;margin:0;text-align:center;color:#768292;font-size:11px;min-height:0}.frame-group-tools p:empty{display:none}#groupEditLayer [data-group-handle=move]{cursor:move}#groupEditLayer [data-group-handle=rotate]{cursor:grab}#groupEditLayer [data-group-handle]:not([data-group-handle=move]):not([data-group-handle=rotate]){cursor:nwse-resize}

.board-style-controls label>span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.board-style-controls label input{width:76px!important;min-width:76px;flex:none}.frame-group-tools button{min-height:40px}@media(max-width:760px){.frame-group-tools button{min-height:44px}.frame-group-tools{margin:4px 0}.frame-group-tools p{font-size:10px}}

.board-art-options{display:flex;gap:6px;margin:10px 0}.board-art-options button{flex:1;min-height:44px;padding:8px 4px;border:1px solid #d8d4ce;border-radius:10px;background:#fffdf8;color:#173f73;font:inherit;font-size:12px}.board-art-options [aria-pressed=true]{background:#173f73;color:#fff;border-color:#173f73}.board-rotation{display:flex;align-items:center;gap:8px;margin:14px 0;font-size:13px}.board-rotation input{width:65px;min-height:44px;border:1px solid #d8d4ce;border-radius:10px;color:inherit;background:#fffdf8;padding:8px}.board-rotation button{min-height:44px;margin-left:auto;border:1px solid #d8d4ce;border-radius:10px;background:#fffdf8;color:inherit;padding:8px 12px}#boardArtwork strong{display:block;margin-top:16px;font-size:13px}

.board-rotation input{width:76px!important;min-width:76px;flex:0 0 76px}.board-rotation label,.board-rotation button{white-space:nowrap}

.board-hole-controls{border-top:1px solid #e6dcd2;padding:16px 0;margin-top:14px}.board-hole-controls>strong{display:block;font-size:14px;margin-bottom:12px}.board-hole-controls label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;margin:10px 0}.board-hole-controls input,.board-hole-controls select{min-height:44px;background:#fffdf8;border:1px solid #d8d4ce;border-radius:10px;color:#173f73;padding:8px}.board-hole-controls input{width:80px!important;min-width:80px}.board-hole-controls label span{white-space:nowrap}.board-hole-controls select{max-width:160px}.board-hole-controls #boardHoleDelete{min-height:44px;width:100%;border:1px solid #dfcbd2;border-radius:10px;background:#fffdf8;color:#a23e59}.board-hole-controls button:focus-visible,.board-hole-controls input:focus-visible,.board-hole-controls select:focus-visible{outline:2px solid #173f73;outline-offset:2px}

.board-contour-controls{margin:12px 0;border:1px solid #e0d8ce;border-radius:12px;padding:0 12px;font-size:13px}.board-contour-controls summary{cursor:pointer;min-height:44px;align-content:center;font-weight:600}.board-contour-controls label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0}.board-contour-controls select,.board-contour-controls input{min-height:44px;color:inherit;border:1px solid #d8d4ce;border-radius:10px;background:#fffdf8;padding:8px}.board-contour-controls input{width:76px!important;min-width:76px}.board-contour-controls select{max-width:160px}.board-contour-controls label span{white-space:nowrap}.board-contour-controls button{width:100%;min-height:44px;border:1px solid #d8d4ce;border-radius:10px;background:#fffdf8;color:inherit;margin-bottom:12px}.board-contour-controls :focus-visible{outline:2px solid #173f73;outline-offset:2px}
.board-contour-controls label{white-space:nowrap}.board-contour-controls select{width:148px!important;min-width:0;flex:0 1 148px}

/* Native modal keeps the pending calculation from editing the current work. */
body.zaoba-editor dialog.board-loading{color:#173f73;background:#fffaf1;border:1px solid #e4d8cc;border-radius:26px;padding:30px 28px 22px;width:min(360px,calc(100vw - 40px));text-align:center;box-shadow:0 18px 70px #18365526;overflow:visible}
body.zaoba-editor dialog.board-loading::backdrop{background:#fffaf166;backdrop-filter:blur(2px)}
.board-loading img{display:block;object-fit:contain;width:112px;height:112px;margin:0 auto 20px;transform-origin:50% 85%;animation:board-logo-rock 1.35s ease-in-out infinite;will-change:transform}
body.zaoba-editor dialog.board-loading h2{font:600 18px/1.6 var(--font);margin:0;text-wrap:balance}
.board-loading-step{font-size:13px;line-height:1.7;color:#6b7d90;min-height:22px;margin:9px 0 20px}
.board-loading button{font:inherit;font-size:14px;min-height:44px;border:1px solid #cdd3da;border-radius:12px;background:#fffdf8;color:#173f73;padding:9px 24px;cursor:pointer}
.board-loading button:focus-visible{outline:2px solid #173f73;outline-offset:3px}
@keyframes board-logo-rock{0%,100%{transform:rotate(-7deg) translateY(0)}50%{transform:rotate(7deg) translateY(-4px)}}
@media(prefers-reduced-motion:reduce){.board-loading img{animation:none;will-change:auto}}
.board-aperture-controls{margin:16px 0;padding:14px;border:1px solid #d8dfe3;border-radius:16px;background:#fffdf8}.board-aperture-controls .board-actions{margin-top:10px}.board-aperture-controls button{min-height:44px}.board-aperture-dialog{width:min(880px,94vw);max-height:92dvh;overflow:auto;box-sizing:border-box;padding:24px;border:1px solid #dad3c8;border-radius:24px;background:#fffaf0;color:#1c4774}.board-aperture-dialog::backdrop{background:#173f7366}.board-aperture-dialog header,.board-aperture-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.board-aperture-dialog h2{font-size:23px;margin:0}.board-aperture-dialog p{font-size:15px;line-height:1.6}.board-aperture-dialog button{font:inherit;min-height:44px;padding:10px 18px;border:1px solid #c4ced6;border-radius:14px;background:#fffdf8;color:#1c4774;cursor:pointer}.board-aperture-dialog button[data-confirm]{background:#1c4774;color:white}.board-aperture-dialog button:disabled{opacity:.45;cursor:default}.aperture-panes{display:grid;grid-template-columns:1fr 1fr;gap:20px}.aperture-panes section{min-width:0}.aperture-panes h3{font-size:16px}.aperture-panes canvas,.aperture-panes svg{display:block;width:100%;height:340px;object-fit:contain;background:white;border:1px solid #e0d9cc;border-radius:12px}.aperture-panes canvas{height:auto;max-height:none;aspect-ratio:auto;cursor:crosshair;border-radius:0;border:0}.aperture-panes small{display:block;line-height:1.6;margin-top:8px}.aperture-status{min-height:48px;background:#e9f2f7;border-radius:12px;padding:12px}.aperture-status.error{color:#a03b56;background:#fbe8eb}@media(max-width:600px){.board-aperture-dialog{padding:16px}.aperture-panes{grid-template-columns:1fr;gap:8px}.aperture-panes canvas{max-height:none}.aperture-panes svg{height:210px}.board-aperture-dialog footer{position:sticky;bottom:-16px;padding:12px 0;background:#fffaf0}.board-aperture-dialog footer button{flex:1}}

/* Photo and recognized aperture are independent editing targets. */
#boardApertureEditor{display:grid;gap:10px;margin-top:12px}#boardApertureEditor[hidden]{display:none}
.board-aperture-dimensions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.board-aperture-dimensions label{display:grid;gap:5px}.board-aperture-dimensions input{width:76px;max-width:100%;padding:8px;border:1px solid #c4cbd1;border-radius:9px;background:#fffdf8;color:#173f73;font:inherit}
.board-aperture-photo-size{display:grid;gap:6px}.board-aperture-photo-size select{width:100%;padding:10px;border:1px solid #c4cbd1;border-radius:10px;background:#fffdf8;color:#173f73;font:inherit}
#boardApertureEditor small{color:#617a92;line-height:1.5}#boardEditLayer [data-board-edit]:focus-visible{outline:none;stroke:#b04770;stroke-width:3px}

/* Failure stays in the same centered dialog, regardless of the active sidebar. */
body.zaoba-editor dialog.board-loading{box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto}
.board-loading [hidden]{display:none!important}
.board-error-art{height:112px;margin:0 auto 20px;display:flex;align-items:center;justify-content:center;color:#a66923}
.board-error-art .zb-ui-symbol{width:112px!important;height:112px!important;flex-basis:112px!important}
.board-loading-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.board-loading[data-state="error"] .board-loading-step{color:#355a85;font-size:14px;overflow-wrap:anywhere}
.board-loading[data-state="error"] .board-loading-actions button{padding:10px 14px;flex:1 1 120px}
.board-loading[data-state="error"] [data-board-replace]{background:#173f73;border-color:#173f73;color:#fffaf1}

.board-photo-controls{border-top:1px solid #ddd8c9;padding-top:16px;margin:16px 0;display:grid;gap:12px}.board-photo-controls[hidden]{display:none}.board-photo-controls label{display:grid;gap:6px}.board-photo-controls select,.board-photo-controls input{width:100%;min-width:0;padding:10px;border:1px solid #d5d1c6;border-radius:12px;background:#fffdf7;color:#173f73;font:inherit;box-sizing:border-box}.board-photo-dimensions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.board-photo-controls .board-actions{display:flex;gap:8px}.board-photo-controls button:disabled{opacity:.45}

/* Optional custom-frame structures; inherit the existing cream/pink controls. */
.board-accessory-controls {display:grid;gap:12px;padding:16px 0;border-top:1px solid #dfd5c6;}
.board-accessory-controls[hidden],.board-accessory-controls [hidden]{display:none!important;}
.board-accessory-controls>strong{font-size:16px;color:#173f73;}
.board-accessory-controls label{display:grid;gap:7px;color:#173f73;font-size:14px;}
.board-accessory-controls input:not([type=range]),.board-accessory-controls select{box-sizing:border-box;width:100%;min-height:42px;padding:8px 10px;border:1px solid #c9ced1;border-radius:10px;background:#fffdf8;color:#173f73;font:inherit;}
.board-accessory-controls button{min-height:42px;border:1px solid #c9ced1;border-radius:10px;background:#f9f2e6;color:#173f73;font:inherit;cursor:pointer;}
.board-accessory-controls input[type=range]{width:100%;accent-color:#ad5d7a;}
#boardRearDiagram{width:100%;height:180px;border:1px solid #e3dace;border-radius:12px;background:#fffdf8;}
#boardRearSize{font-size:13px;color:#6e787e;}
