/* 3.2 Visual Editor: present only after server verifies editor role. */
.bv-toggle{position:fixed;left:14px;bottom:14px;z-index:15000;border:1px solid #b477f5;background:#28143e;color:#fff;padding:11px 16px;border-radius:9px;font:700 12px 'Courier New',monospace;box-shadow:0 0 17px #230e43;cursor:pointer}
.bv-toggle[aria-pressed="true"]{background:#6b32aa}
.bv-tools{box-sizing:border-box;position:fixed;bottom:65px;left:12px;width:min(345px,calc(100vw - 24px));max-height:73vh;z-index:15001;overflow:auto;padding:14px;background:#110d1eee;color:#f0e5ff;border:1px solid #9a5dd8;border-radius:12px;box-shadow:0 12px 36px #000d;backdrop-filter:blur(10px);font:12px/1.45 'Courier New',monospace}
.bv-tools[hidden],.bv-outline[hidden]{display:none!important}
.bv-tools h3{font:700 16px/1.3 'Courier New';margin:0 0 9px;color:#cfa4ff}
.bv-tools p{color:#aeb9cf;margin:7px 0 12px}.bv-tools label{display:block;margin:8px 0;color:#ddcff3;font-size:11px}
.bv-tools input[type=number],.bv-tools input[type=text],.bv-tools textarea,.bv-tools select{box-sizing:border-box;width:100%;padding:6px;background:#0b0a14;color:#f2dcff;border:1px solid #593a87;border-radius:6px;font:12px monospace}
.bv-tools textarea{min-height:55px;resize:vertical}.bv-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 10px}
.bv-buttons{display:flex;gap:6px;flex-wrap:wrap;margin:9px 0}.bv-tools button{padding:7px 9px;border:1px solid #7956b6;border-radius:6px;background:#311b4a;color:#fff;cursor:pointer;font:700 11px monospace}.bv-tools button:disabled{opacity:.5;cursor:default}
.bv-message{min-height:28px;color:#92ffe5!important}.bv-outline{position:fixed;z-index:14990;pointer-events:none;border:2px dashed #4effdd;box-shadow:0 0 0 2px #000b,0 0 18px #25edcd99;box-sizing:border-box}
.bv-drag,.bv-resize{pointer-events:auto;touch-action:none;position:absolute;padding:5px 8px;color:#080515;background:#53ffe4;border:1px solid #fff;border-radius:6px;font:700 11px monospace;cursor:move;user-select:none}
.bv-drag{top:-28px;left:0;white-space:nowrap}.bv-resize{right:-8px;bottom:-8px;width:20px;height:20px;box-sizing:border-box;cursor:nwse-resize;padding:0;text-align:center;font-size:14px}
body.bv-active [data-bortcade-text]{outline:1px dotted #d3a0ff;outline-offset:4px;cursor:text}
body.bv-active [data-bortcade-text][contenteditable=true]{outline:2px solid #58f3e4;background:#1a0d2c66}
body.bv-active #ztvtg-glass{cursor:move!important}
body.bv-active .ztvtg-glass iframe{pointer-events:none!important}
.bv-target-glass{display:none;pointer-events:none!important;position:absolute;inset:0;z-index:60;cursor:crosshair;background:#20c9f010;pointer-events:auto}
@media(max-width:700px){.bv-tools{max-height:55vh}.bv-toggle{padding:7px 9px;font-size:10px}}

body.bv-active .bv-target-glass{display:block;pointer-events:auto!important}
/* 3.3: new layout blocks mimic the surrounding theme but never inject styles/scripts. */
.bv-custom{box-sizing:border-box;position:absolute;display:block;min-width:24px;max-width:100%;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:4px;line-height:1.3;pointer-events:auto;text-shadow:inherit}
.bv-custom img{display:block;width:100%;height:100%;object-position:center;pointer-events:none;border-radius:inherit}
.bv-custom.bv-kind-image{padding:0;border:0;background:none}
.bv-custom.bv-kind-heading{line-height:1.15}
.bv-custom:focus-visible{outline:2px solid #62fde2}
.bv-tools .bv-fields label:has(textarea){grid-column:1/-1}
.bv-tools #bv-module-select{box-sizing:border-box;width:100%;padding:7px;background:#0c0917;color:#f9edff;border:1px solid #7559a0}
.bv-tools .bv-buttons button{min-width:65px}
.bv-tools #bv-style-note{color:#b39dcf}
.bv-preview-toggle{display:block;margin:8px auto 18px;border:1px solid #6ed8e7;border-radius:8px;padding:8px 16px;background:#29133c;color:#a8eeff;font:700 12px 'Courier New',monospace}
.bv-editor-public-preview[hidden],.bortcade-staging[hidden]{display:none!important}
@media(max-width:700px){.bv-custom{position:static!important;display:block!important;transform:none!important;width:100%!important;height:auto!important;min-height:30px;max-width:100%!important;margin:8px 0}.bv-custom img{max-height:250px}}
/* 3.3: in-page elements inherit typography from their parent area by default. */
.bv-custom{box-sizing:border-box;position:absolute;display:block;min-width:24px;max-width:100%;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:4px;line-height:1.3;pointer-events:auto;text-shadow:inherit}
.bv-custom img{display:block;width:100%;height:100%;object-position:center;pointer-events:none;border-radius:inherit}
.bv-custom.bv-kind-image{padding:0;border:0;background:none}
.bv-custom.bv-kind-heading{line-height:1.15}
.bv-custom:focus-visible{outline:2px solid #62fde2}
.bv-tools .bv-fields label:has(textarea){grid-column:1/-1}
.bv-tools #bv-module-select{box-sizing:border-box;width:100%;padding:7px;background:#0c0917;color:#f9edff;border:1px solid #7559a0}
.bv-tools .bv-buttons button{min-width:65px}
.bv-tools #bv-style-note{color:#b39dcf}
.bv-preview-toggle{display:block;margin:8px auto 18px;border:1px solid #6ed8e7;border-radius:8px;padding:8px 16px;background:#29133c;color:#a8eeff;font:700 12px 'Courier New',monospace}
.bv-editor-public-preview[hidden],.bortcade-staging[hidden]{display:none!important}
@media(max-width:700px){.bv-custom{position:static!important;display:block!important;transform:none!important;width:100%!important;height:auto!important;min-height:30px;max-width:100%!important;margin:8px 0}.bv-custom img{max-height:250px}}
/* 3.3: in-page elements inherit typography from their parent area by default. */
.bv-custom{box-sizing:border-box;position:absolute;display:block;min-width:24px;max-width:100%;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:4px;line-height:1.3;pointer-events:auto;text-shadow:inherit}
.bv-custom img{display:block;width:100%;height:100%;object-position:center;pointer-events:none;border-radius:inherit}
.bv-custom.bv-kind-image{padding:0;border:0;background:none}
.bv-custom.bv-kind-heading{line-height:1.15}
.bv-custom:focus-visible{outline:2px solid #62fde2}
.bv-tools #bv-module-select{box-sizing:border-box;width:100%;padding:7px;background:#0c0917;color:#f9edff;border:1px solid #7559a0}
.bv-tools .bv-buttons button{min-width:65px}
.bv-tools #bv-style-note{color:#b39dcf}
.bv-preview-toggle{display:block;margin:8px auto 18px;border:1px solid #6ed8e7;border-radius:8px;padding:8px 16px;background:#29133c;color:#a8eeff;font:700 12px 'Courier New',monospace}
.bv-editor-public-preview[hidden],.bortcade-staging[hidden]{display:none!important}
@media(max-width:700px){.bv-custom{position:static!important;display:block!important;transform:none!important;width:100%!important;height:auto!important;min-height:30px;max-width:100%!important;margin:8px 0}.bv-custom img{max-height:250px}}
.bv-tools.bv-dock-right{left:auto;right:12px}
.bv-tools .bv-preview-command{width:100%;border-color:#44dddf;color:#b3faff}

/* v3.4: the inspector follows a selected nested node. */
.bv-custom a.bv-content-link,.bv-injected-link{color:inherit;font:inherit;text-decoration:inherit;display:contents}
.bv-custom.bv-kind-image a.bv-content-link{display:block;width:100%;height:100%}
.bv-tools #bv-selected{font-weight:bold;color:#88faef;border-bottom:1px solid #503a6e;padding-bottom:7px}
.bv-tools .bv-fields label[hidden]{display:none!important}
.bv-comparing .bv-outline{border-color:#ffc873;box-shadow:0 0 13px #ffd582bb}
.bv-comparing .bv-tools .bv-fields{opacity:.4;pointer-events:none}
@media(max-width:900px){.bv-tools{bottom:65px!important;top:auto!important;left:12px!important;right:auto!important;width:min(345px,calc(100vw - 24px))}}

/* Newlines remain visible for nested card text, page text, and profile copy. */
.bv-custom-text,[data-bortcade-text],[data-bortcade-game-field],.ztvs-copy,.bcv-desc{white-space:pre-wrap;overflow-wrap:anywhere}
.bv-text-dialog{position:fixed;inset:0;margin:auto;width:min(550px,94vw);max-width:94vw;background:#1c112d;border:1px solid #8e65d9;border-radius:13px;padding:20px;color:#e4d7ff;z-index:2147483600;box-shadow:0 14px 65px #000a}
.bv-text-dialog::backdrop{background:#0009}.bv-text-dialog textarea{box-sizing:border-box;width:100%;min-height:150px;background:#0c0920;color:#fff;border:1px solid #8861bb;padding:12px;border-radius:8px;resize:vertical;white-space:pre-wrap}
.bv-text-dialog h3{margin:0 0 10px}.bv-text-dialog p{color:#bcb1d1;font-size:12px}

/* v3.5.2 word-processor editing UI; separate from movable properties panel. */
.bv-rich-dialog{width:min(780px,calc(100vw - 24px));max-width:780px;max-height:90vh;overflow:auto;background:#160f24;color:#f2dcff;border:1px solid #955ac6;border-radius:14px;box-shadow:0 18px 65px #000b}
.bv-rich-toolbar{display:flex;flex-wrap:wrap;gap:4px;align-items:center;background:#241631;border-radius:7px;padding:8px;position:sticky;top:0;z-index:2}
.bv-rich-toolbar button,.bv-rich-toolbar select,.bv-rich-toolbar input{border:1px solid #624083;background:#29183a;color:#f6e4ff;border-radius:5px;padding:7px;min-height:33px;cursor:pointer}
.bv-rich-toolbar button:focus-visible{outline:2px solid #a5fcff}
.bv-rich-toolbar input[type=color]{width:39px;padding:2px}
.bv-rich-content{min-height:210px;max-height:52vh;overflow:auto;padding:18px;margin:10px 0;background:#120e19;color:inherit;font:inherit;white-space:pre-wrap;overflow-wrap:break-word;border:1px solid #7853a6;border-radius:8px;line-height:1.6}
.bv-rich-content:focus{outline:2px solid #b68cff}
.bv-rich-content p,.bv-rich-content h2,.bv-rich-content h3{margin:.2em 0 .7em}
.bv-rich-status{color:#f7c59d}
[data-bv-block], [data-bortcade-text], [data-bortcade-game-field]{overflow-wrap:break-word;min-width:0}
.bv-custom{box-sizing:border-box;max-width:100%;white-space:pre-wrap}
.bortcade-construction,.bortcade-staging,.bortcade-game-card{min-width:min(100%,320px);overflow-wrap:break-word}
@media(max-width:700px){.bv-rich-dialog{width:calc(100vw - 16px);margin:8px}.bv-rich-toolbar{position:static}.bv-rich-content{min-height:160px}}
