/* The object uses board units; controls and handles use screen units. */
.board-text{border:0;min-height:0}
.board-text>.board-text-content,.board-text-measure{font-weight:400;line-height:1.4;padding:var(--board-text-padding,4px);box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;tab-size:4;letter-spacing:normal}
.board-text>.board-text-content{width:100%;height:auto;min-height:1.4em;color:var(--board-text-color,#2e2b43);background:var(--board-text-background,transparent);overflow:visible}
.board-text>.board-text-content:empty::before{content:attr(data-placeholder);color:#a39bab;font-style:normal;pointer-events:none}
.board-text-measure{position:fixed;left:-30000px;top:0;visibility:hidden;pointer-events:none;height:auto;max-width:3000px;min-height:0;margin:0;border:0;font-family:system-ui;transform:none}
.board-text.is-text-editing{cursor:text;user-select:text}
.board-text .board-inline-editor{cursor:text;user-select:text;-webkit-user-select:text;pointer-events:auto;outline:0;touch-action:auto;caret-color:#6343c2;min-height:0}
.board-inline-editor::selection,.board-inline-editor *::selection{background:#b9d9ff;color:inherit}
.board-text-content span,.board-inline-editor span{font-family:inherit}
.board-text-content strong,.board-inline-editor strong{font-weight:700}
.board-text .board-text-width{position:absolute;top:50%;z-index:3;width:calc(7 * var(--board-selection-unit,1px));height:calc(20 * var(--board-selection-unit,1px));background:white;border:calc(1.5 * var(--board-selection-unit,1px)) solid #7959d8;border-radius:calc(3 * var(--board-selection-unit,1px));transform:translateY(-50%);cursor:ew-resize;box-sizing:border-box;touch-action:none}
.board-text .width-left{left:calc(-6 * var(--board-selection-unit,1px))}.board-text .width-right{right:calc(-6 * var(--board-selection-unit,1px))}
.board-text.is-text-editing>.board-resize,.board-text.is-text-editing>.board-text-width{display:none}
.board-text-toolbar{position:absolute;z-index:12;width:max-content;max-width:calc(100% - 16px);font-family:system-ui,sans-serif;font-size:13px;color:#393347;pointer-events:auto}
.board-text-main{display:flex;align-items:center;gap:3px;background:#fff;padding:7px;border:1px solid #e3ddec;border-radius:12px;box-shadow:0 5px 22px #2820361c;max-width:100%;box-sizing:border-box}
.board-text-toolbar button,.board-text-toolbar summary{display:grid;place-items:center;min-height:34px;height:34px;min-width:34px;width:auto;padding:5px 8px;margin:0;border:0;border-radius:6px;background:transparent;color:#40364f;font-family:inherit;font-size:15px;font-weight:500;cursor:pointer;box-sizing:border-box;line-height:1.2;box-shadow:none}
.board-text-toolbar button:hover,.board-text-toolbar summary:hover{background:#f1edf8}.board-text-toolbar button[aria-pressed=true]{background:#eae2fc;color:#6541bd}.board-text-toolbar button:focus-visible,.board-text-toolbar summary:focus-visible{outline:2px solid #7959d8;outline-offset:1px}
.board-text-toolbar select,.board-text-toolbar input[type=number]{height:34px;min-height:0;margin:0;padding:4px 6px;border:1px solid transparent;border-radius:5px;background:white;color:#393347;font:13px system-ui;box-shadow:none;box-sizing:border-box}
.board-text-toolbar select{width:130px;max-width:30vw}.board-text-toolbar input[type=number]{width:58px}.board-text-toolbar select:hover,.board-text-toolbar input[type=number]:hover{background:#f6f3fa;border-color:#e3ddec}
.board-text-divider{height:22px;width:1px;margin:0 4px;background:#e6e1ed;flex:none}
.board-text-color{display:flex!important;flex-direction:column;align-items:center;justify-content:center;margin:0!important;gap:0!important;padding:0 6px;cursor:pointer;height:34px;font-size:16px!important;font-weight:700}
.board-text-toolbar input[type=color]{width:28px;height:24px;min-height:0;padding:0;border:0;background:transparent;cursor:pointer;border-radius:4px;box-shadow:none}
.board-text-color input[type=color]{width:24px;height:10px}
.board-text-more{position:relative}.board-text-more summary{list-style:none;font-size:22px;letter-spacing:1px}.board-text-more summary::-webkit-details-marker{display:none}
.board-text-dropdown{position:absolute;right:0;top:43px;width:240px;max-height:min(65dvh,540px);overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;align-items:stretch;gap:5px;background:white;border:1px solid #e3ddec;border-radius:12px;padding:12px;box-shadow:0 8px 32px #28203624;box-sizing:border-box}
.open-up .board-text-dropdown{top:auto;bottom:43px}.board-text-dropdown>strong{font-size:13px;padding:2px 3px 8px}.board-text-dropdown>span{font-size:12px;color:#81758d;padding:7px 4px 0}.board-text-dropdown>button,.board-text-dropdown>.btn{text-align:left;display:block;font-size:12px;width:100%;min-height:32px;height:auto;border:0;background:white;box-shadow:none;font-weight:400}
.board-text-dropdown label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;margin:3px 0;padding:2px 4px}.board-text-options{display:flex;gap:4px}.board-text-options button{flex:1}.board-text-dropdown hr{width:100%;border:0;border-top:1px solid #ece7f2;margin:6px 0}
.board-text-dropdown .board-layer-actions{display:flex;flex-direction:column;border:0;padding:0;gap:3px}.board-text-dropdown .board-layer-actions .btn{font-size:12px}.board-text-dropdown [data-boardaction=remove]{color:#b6364c}
.board-text-more:not([open])>.board-text-dropdown{display:none}
.board-text-colors summary{font-size:17px;font-weight:700;letter-spacing:0;border-bottom:3px solid #7250cd}
.board-text-colors:has([data-text-highlight]) summary{border-color:#ffe47a;background:#fff5b8}
.board-text-swatches{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;padding:4px}
.board-text-swatches button{background:var(--swatch);border:1px solid #0003;width:36px;height:30px;min-height:30px;min-width:0;border-radius:5px;padding:0}
.board-text-swatches button:hover{background:var(--swatch);outline:2px solid #7250cd;outline-offset:2px}
.board-text-toolbar:has(.board-text-more[open]){z-index:15}
@media(max-width:600px){.board-text-main{flex-wrap:wrap;gap:1px;padding:5px}.board-text-toolbar{max-width:calc(100% - 16px)}.board-text-toolbar select{width:110px;max-width:32vw}.board-text-toolbar input[type=number]{width:52px}.board-text-toolbar button,.board-text-toolbar summary{min-width:31px;padding:4px 6px}.board-text-divider{margin:0 2px}.board-text-dropdown{max-width:calc(100vw - 24px)}}

.board-text-editor-overlay{position:absolute;z-index:5;box-sizing:border-box;overflow:visible;pointer-events:none;transform:none}
.board-text-editor-overlay>.board-text-content{width:100%;height:auto;min-height:1.4em;font-weight:400;line-height:1.4;padding:var(--board-text-padding,4px);box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;tab-size:4;letter-spacing:normal;overflow:visible}
.board-text-editor-overlay .board-inline-editor{pointer-events:auto;cursor:text;user-select:text;-webkit-user-select:text;touch-action:auto;outline:0;border:0;border-radius:0;box-shadow:none;caret-color:#473356}
.board-text-editor-overlay .board-inline-editor:empty::before{content:attr(data-placeholder);color:#a39bab;pointer-events:none}

/* Sticky formatting stays in one compact row; less-used settings live in menus. */
.board-sticky-main{gap:2px;padding:6px}
.board-sticky-main .board-text-divider{margin:0 2px;height:20px}
.board-sticky-main>.board-text-more>summary,.board-sticky-main>button{width:32px;min-width:32px;padding:5px;height:32px;min-height:32px}
.board-sticky-main .board-sticky-size>summary{width:70px;display:flex;gap:7px;font-size:13px;letter-spacing:0}
.board-sticky-size summary small{font-size:13px;color:#8b7e99}
.board-sticky-main .board-text-dropdown{width:224px}
.board-sticky-main .board-text-dropdown select{max-width:none;width:132px}
.board-text-toolbar button[aria-pressed=mixed]{background:#f4f0fa;color:#6541bd;box-shadow:inset 0 -2px #b9a8dc}
@media(max-width:600px){.board-sticky-main{flex-wrap:wrap;row-gap:4px}.board-sticky-main>.board-text-more>summary,.board-sticky-main>button{width:30px;min-width:30px}.board-sticky-main .board-sticky-size>summary{width:62px}}

.board-sticky-size .board-text-dropdown{width:208px}
.board-sticky-sizes{display:flex;flex-direction:column;gap:1px;max-height:224px;overflow:auto;overscroll-behavior:contain}
.board-sticky-sizes button{display:flex;justify-content:space-between;text-align:left;border:0;border-radius:4px;font-size:13px;padding:6px 12px;flex:none}
.board-sticky-sizes button[aria-pressed=true]::after{content:'✓'}
.board-sticky-size-stepper{display:flex;gap:4px;align-items:center;justify-content:space-between;padding:6px 0;border-block:1px solid #eee9f3}
.board-sticky-size-stepper input[type=number]{width:86px;text-align:center;border:1px solid #e8e2ef}
.board-sticky-size button:disabled{opacity:.35;cursor:default;background:transparent}
.board-sticky-size-help{display:block;font-size:11px;line-height:1.4;color:#887b95;padding:6px 2px 0}
.board-vocabulary-badge{position:absolute;left:min(6 * var(--board-selection-unit,1px),3%);bottom:min(6 * var(--board-selection-unit,1px),3%);width:min(20 * var(--board-selection-unit,1px),20%);aspect-ratio:1;color:#6841b0;background:#ffffffd9;border-radius:18%;padding:min(2 * var(--board-selection-unit,1px),1%);pointer-events:none;z-index:2;display:grid;place-items:center;box-sizing:border-box}
.board-vocabulary-badge svg{width:100%;height:100%;display:block}

/* Checklist controls retain text metrics at every board zoom. */
.board-text-content .board-text-check{display:inline;vertical-align:baseline;appearance:none;border:0;border-radius:2px;background:transparent;box-shadow:none;margin:0;padding:0;width:auto;height:auto;min-width:0;min-height:0;font:inherit;color:inherit;line-height:inherit;letter-spacing:inherit;cursor:pointer;text-decoration:inherit}
.board-text-content .board-text-check:disabled{opacity:1;cursor:default}
.board-text-content .board-text-check:focus-visible{outline:2px solid #7959d8;outline-offset:1px}
.board-text-layout .board-text-dropdown>button{font-size:14px;line-height:1.4;padding:8px;min-height:36px}
.board-text-layout .board-text-dropdown>button[aria-pressed=true]{background:#eae2fc;color:#6541bd}
.board-text-layout .board-text-dropdown>span{line-height:1.4;letter-spacing:normal}
.board-text-layout button[hidden]{display:none}
@media(max-width:850px){.board-text-main:not(.board-sticky-main){flex-wrap:wrap}}

/* One text size in measurement, on the board, and in the editing overlay. */
.board-text>.board-text-content,.board-text-measure,.board-text-editor-overlay>.board-text-content{text-size-adjust:none;-webkit-text-size-adjust:none}
.board-text>.board-text-content *,.board-text-measure *,.board-text-editor-overlay>.board-text-content *{font-size:inherit!important;font-family:inherit!important;line-height:inherit!important;letter-spacing:inherit}
.board-text-content .board-text-check{pointer-events:auto}
