@layer legacy {
:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#253d36;background:#fafbf8;font-synthesis:none;--green:#20594a;--muted:#79847c;--line:#e4e7df;--paper:#fafbf8}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;color:inherit}button:disabled{opacity:.45;cursor:not-allowed}button,input,textarea,select{outline-offset:3px}button{border:0;background:none}a{color:inherit}input,textarea,select{border:1px solid #dce1d9;border-radius:7px;background:white;padding:10px;color:#253d36}textarea{resize:vertical;min-height:100px;line-height:1.5}label{display:grid;gap:7px;font-size:12px;font-weight:600}small{color:var(--muted);font-size:11px}h1,h2,h3,p{margin-top:0}.primary,.secondary,.danger{border-radius:7px;padding:10px 15px;font-size:12px;font-weight:600}.primary{background:var(--green);color:#fff}.secondary{border:1px solid #dce1d9;background:white}.danger{color:#a43d36;background:#fcecea}.text-button{font-size:11px;padding:4px 0;color:#64756b}.eyebrow{font-size:9px;letter-spacing:1.8px;font-weight:700;color:#748278}.brand{display:flex;align-items:center;gap:10px;font-size:24px;letter-spacing:-1px;font-weight:650;text-decoration:none}.brand-mark{background:var(--green);color:#faf7e9;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-size:27px;line-height:1;padding-bottom:4px}.auth-screen{min-height:100vh;display:grid;grid-template-columns:1.15fr 1fr}.auth-story{padding:45px 8%;background:#e9ede4;display:flex;flex-direction:column;justify-content:space-between;min-height:100vh;overflow:hidden}.auth-story h1{font-size:clamp(32px,4vw,61px);line-height:1.1;letter-spacing:-2px;margin:20px 0}.auth-story p{max-width:410px;line-height:1.7;color:#66786d;font-size:15px}.paper-stack{height:230px;position:relative;margin:40px 0}.paper{position:absolute;width:165px;height:165px;padding:22px;box-shadow:0 8px 12px #263d3610;font-size:23px;font-weight:500;line-height:1.25}.paper span{display:block;font-size:30px;margin-top:6px}.peach{background:#f2c4ac;transform:rotate(-10deg);top:20px}.yellow{background:#f7e8a5;left:135px;transform:rotate(8deg)}.green{background:#c5d7b2;left:280px;top:55px;transform:rotate(-4deg)}.auth-form{align-self:center;justify-self:center;width:min(370px,85%);padding:40px 0}.auth-form h2{margin:18px 0 12px;font-size:28px;letter-spacing:-1px}.auth-form p{color:#778179;font-size:13px;line-height:1.6}.auth-form form{display:grid;gap:20px;margin:30px 0 8px}.auth-form input{padding:13px}.auth-form .primary{padding:14px}.auth-form>small{display:block;margin-top:45px}.form-error{color:#a43d36!important;min-height:16px}.topbar{height:76px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 24px;gap:18px}.divider{height:25px;width:1px;background:var(--line);display:inline-block}.board-identity{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;flex:0 1 auto;
  align-items:stretch}/* The board name is drawn by #board-name-echo, not by the native select: a select keeps a slice of its own
   width back for the dropdown arrow whatever the padding, so "text fits" could never be verified and long
   names lost their last characters. The select keeps the layout, the click target and the option list; its
   own glyphs are made transparent only once the echo exists, so a script failure can never hide the name. */
.board-identity{position:relative}
#board-name-echo{position:absolute;left:0;top:0;right:18px;display:flex;align-items:center;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;pointer-events:none;font-weight:650;line-height:1.2;box-sizing:border-box}
.board-identity.name-echo #boards{color:transparent}
[dir=rtl] #board-name-echo{right:18px;left:0;justify-content:flex-end;text-align:right}
.board-identity select{border:0;padding:0 18px 0 0;font-size:14px;font-weight:650;max-width:100%;text-overflow:ellipsis;appearance:none;-webkit-appearance:none;-moz-appearance:none;background:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 8%27%3E%3Cpath d=%27M1 1.5 6 6.5 11 1.5%27 fill=%27none%27 stroke=%27%235E6860%27 stroke-width=%271.6%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E") no-repeat right 0 center/10px 7px}.board-identity span{font-size:10px;color:#8b938d}.icon-btn{font-size:22px;color:#7a887e}.top-spacer{flex:1}.avatar{background:#e8dccd;width:33px;height:33px;border-radius:50%;font-size:11px;font-weight:700;border:2px solid white}.avatars{display:flex}.avatars .avatar{margin-left:-8px;background:#cfdcd0}.live-tag{font-size:10px;color:#78887d;display:flex;gap:7px;align-items:center}.live-tag i{width:6px;height:6px;background:#538f62;border-radius:50%}.workspace{display:flex;height:calc(100vh - 76px)}.library{width:322px;min-width:322px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:2}.library-heading{padding:26px 22px 15px}.library-heading h1{font-size:23px;letter-spacing:-.8px;margin:12px 0 9px;display:flex;justify-content:space-between}.library-heading h1 span{font-size:26px;color:#8d9d76}.library-heading p{font-size:11px;color:#7c877e;margin-bottom:0}.search{margin:5px 22px 16px;display:flex;border:1px solid var(--line);border-radius:7px;padding:0 10px;align-items:center;gap:7px;height:37px;background:#fafbf9;color:#89948a}.search>span{font-size:25px}.search input{border:0;background:transparent;padding:0;font-size:11px;width:100%;outline:none}.search kbd{font-size:10px;border:1px solid #e0e5dc;border-radius:3px;padding:0 4px}.categories{display:flex;gap:6px;flex-wrap:wrap;padding:0 22px 18px;border-bottom:1px solid var(--line)}.category{padding:6px 9px;border:1px solid #e8ece5;border-radius:5px;font-size:10px;color:#788279}.category.active{background:#e8efe7;border-color:#dae5d8;color:#315940;font-weight:600}.library-count{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#859085;padding:17px 22px 10px}.template-list{overflow:auto;padding:0 22px 20px;flex:1}.template-card{width:100%;padding:0;text-align:left;margin:0 0 17px;border:1px solid #e2e6de;border-radius:9px;overflow:hidden;background:white;transition:border-color .15s,transform .15s}.template-card:hover{border-color:#8baf98;transform:translateY(-2px)}.mini-preview{height:116px;background:#f2f3ed;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;padding:13px}.mini-preview svg{width:100%;height:100%;filter:drop-shadow(0 2px 2px #314c3610)}.card-copy{padding:12px 13px}.card-title{display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:650}.card-copy p{font-size:10px;color:#859082;line-height:1.6;margin:6px 0}.card-meta{font-size:9px;color:#8b968a;display:flex;gap:8px;align-items:center}.card-meta span{width:4px;height:4px;background:#acb7a5;border-radius:50%}.library-footer{padding:17px 22px;border-top:1px solid var(--line);display:grid;gap:9px}.library-footer>span{font-size:10px;color:#90988d}.library-footer button{font-size:11px}.board-main{position:relative;flex:1;min-width:0;overflow:hidden;background:#f7f8f3}.canvas-top{position:absolute;top:0;left:0;right:0;height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 25px;z-index:2;pointer-events:none}.canvas-top>*{pointer-events:auto}.canvas-top>span{font-size:10px;color:#91998e}.canvas-top>button{font-size:10px;background:#f7f8f3;padding:6px 9px;border-radius:5px}#canvas{position:absolute;inset:0;overflow:hidden;background-image:radial-gradient(#e3e8e0 .8px,transparent .8px);background-size:44px 44px;touch-action:none}#world{position:absolute;transform-origin:0 0;inset:0;pointer-events:none}#objects{position:absolute;inset:0;pointer-events:none}.object{position:absolute;pointer-events:auto;user-select:none;overflow:visible;border:1px solid transparent;color:#30443b;touch-action:none}.object.frame{border:1.5px solid #c5cfc0;border-radius:10px;background:#fdfefbd9;box-shadow:0 3px 15px #223b2910}.object .obj-text{white-space:pre-wrap;overflow:hidden;height:100%;padding:14px;line-height:1.45;font-size:16px}.object.frame>.obj-text{font-size:21px;font-weight:600;height:49px;padding:14px 25px}.object.shape{border-radius:7px;border:1px solid #bbc7b322}.object.shape>.obj-text{font-weight:600;font-size:16px}.object.sticky{box-shadow:1px 3px 5px #293e301c;border-radius:2px}.object.action{background:#fff;border:1px solid #bed1c1;border-radius:6px;box-shadow:1px 3px 5px #293e3010}.object.action .obj-text{padding-bottom:48px}.action-meta{position:absolute;bottom:12px;left:12px;right:12px;display:flex;gap:6px;align-items:center;font-size:10px;color:#5b7560}.action-meta span{border-radius:4px;padding:3px 5px;background:#e7efe4}.example-label{position:absolute;bottom:6px;right:9px;font-size:9px;font-weight:700;letter-spacing:1px;color:#807646;opacity:.65}.object.selected{outline:2px solid #3d8064;outline-offset:3px}.resize-handle{position:absolute;bottom:-7px;right:-7px;width:13px;height:13px;background:white;border:2px solid #3d8064;border-radius:2px;cursor:nwse-resize;z-index:5}.vote-badge{position:absolute;top:-10px;right:-10px;border-radius:20px;background:#355f4b;color:white;font-size:11px;padding:4px 8px;border:2px solid white;z-index:3}.frame-assistants{position:absolute;top:-27px;left:0;font-size:11px;background:#e1eade;padding:4px 8px;border-radius:4px}#connections{position:absolute;left:0;top:0;width:100000px;height:100000px;overflow:visible;pointer-events:none}#connections path{pointer-events:stroke;cursor:pointer}#empty{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);text-align:center;width:90%;pointer-events:none}#empty h2{font-size:22px;letter-spacing:-.6px;font-weight:500;margin-bottom:12px}#empty p{font-size:12px;color:#889281;line-height:1.8}#empty>span{display:block;font-size:9px;color:#9ca491;margin-top:28px;letter-spacing:.4px}.empty-graphic{height:145px;position:relative;width:250px;margin:0 auto 28px}.empty-graphic div{position:absolute;left:25px;top:12px;width:111px;height:111px;background:#f4e7ad;transform:rotate(-9deg);padding:38px 5px;font-size:15px;box-shadow:2px 5px 7px #4e593014}.empty-graphic div+div{left:116px;top:32px;background:#d9e4cc;transform:rotate(9deg);font-size:13px}.empty-graphic span{position:absolute;left:211px;top:0;font-size:40px;color:#8d9a79;transform:rotate(10deg)}.canvas-toolbar{position:absolute;bottom:25px;left:50%;transform:translateX(-50%);padding:7px;display:flex;gap:2px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 18px #35462e0a;align-items:center;z-index:4}.tool{width:46px;height:45px;border-radius:6px;font-size:21px;display:grid;place-items:center;padding:4px;gap:1px}.tool small{font-size:8px;color:#85907f}.tool.active{background:#e9efe3;color:#3c624c}.tool:hover{background:#f0f3eb}.canvas-toolbar .divider{margin:0 5px}.zoom-controls{position:absolute;bottom:27px;right:20px;display:flex;align-items:center;background:#fff;border:1px solid var(--line);border-radius:7px;padding:6px;z-index:3}.zoom-controls button{font-size:12px;padding:5px}.zoom-controls .divider{height:16px;margin:0 5px}#placement{position:absolute;border:3px dashed #568168;background:#e8efe67a;border-radius:10px;pointer-events:none;display:flex;justify-content:center;align-items:center;font-size:25px;color:#355d46}#placement[hidden]{display:none}#placement-hint{position:absolute;left:50%;top:58px;transform:translateX(-50%);background:#2d5848;color:#fff;padding:10px 20px;border-radius:7px;font-size:12px;z-index:8}.inspector{position:absolute;right:17px;top:58px;width:272px;max-height:calc(100% - 160px);overflow:auto;background:white;border:1px solid var(--line);border-radius:10px;padding:17px;z-index:6;box-shadow:0 6px 25px #2c493516}.inspector header{display:flex;align-items:start;justify-content:space-between;gap:7px;margin-bottom:12px}.inspector h3{font-size:13px;margin:0}.inspector header button{font-size:20px;color:#9da498}.inspector label{margin:12px 0;font-size:10px}.inspector textarea{font-size:12px;min-height:90px}.inspector input,.inspector select{font-size:11px;padding:8px}.inspector .row{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}.inspector .row button{font-size:10px;padding:8px}.inspector .section{padding-top:13px;margin-top:15px;border-top:1px solid var(--line)}.inspector .section h4{font-size:11px;margin:0 0 10px}.inspector p{font-size:11px;color:#7f8b7c;line-height:1.5}.timer-readout{font-size:26px;font-variant-numeric:tabular-nums;color:#315940}.colors{display:flex;gap:7px}.color{width:22px;height:22px;border-radius:50%;border:1px solid #0001}.helper{font-size:10px;color:#879181;line-height:1.6}.attribution{font-size:9px;color:#929c8b;line-height:1.6;margin-top:12px}.badge{font-size:9px;padding:3px 6px;background:#eff3e9;border-radius:4px;color:#6b8061}.inspector .wide{width:100%;margin-top:8px}.vote-controls{display:flex;gap:5px;align-items:center}.vote-controls span{font-size:10px;color:#72806a}.suggestion{padding:10px;background:#f4f6f0;border-radius:6px;margin:10px 0}.suggestion pre{font-size:9px;max-height:130px;overflow:auto;white-space:pre-wrap}.suggestion p{color:#3c5140;margin:0 0 8px}dialog{border:1px solid var(--line);border-radius:14px;padding:30px;width:min(760px,94vw);max-height:90vh;overflow:auto;color:#30443b;box-shadow:0 25px 90px #152d3529}dialog::backdrop{background:#21372966;backdrop-filter:blur(3px)}.modal-close{position:absolute;top:12px;right:15px;font-size:25px;color:#8f998c}dialog h2{font-size:27px;letter-spacing:-.8px;margin:12px 0}dialog p{font-size:13px;line-height:1.7;color:#7d8977}.preview-large{height:260px;border-radius:9px;margin:20px 0;background:#f1f3eb}.preview-large svg{width:100%;height:100%}.modal-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:25px}.modal-grid h3{font-size:12px;margin:0 0 10px}.steps{padding-left:20px;font-size:12px;line-height:1.7;color:#697e66}.steps li{padding:3px 0 3px 5px}.insert-controls{display:grid;gap:12px}.insert-controls label{font-size:11px}.checkbox-label{display:flex!important;align-items:start;gap:9px!important;font-size:11px!important;line-height:1.6}.checkbox-label input{margin:2px 0 0}dialog .actions{display:flex;gap:9px;margin-top:20px;justify-content:flex-end}dialog .form-grid{display:grid;gap:15px}dialog .form-grid.two{grid-template-columns:1fr 1fr}dialog .form-grid .full{grid-column:1/-1}.review-objects{max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:7px;padding:10px;display:grid;gap:8px}.review-objects label{padding:7px;background:#f6f7f1;border-radius:4px;white-space:pre-wrap;font-weight:400}.review-objects label span{max-height:80px;overflow:auto}.members-list{display:grid;gap:10px;margin:20px 0}.member-row{display:flex;gap:10px;align-items:center;font-size:12px}.member-row strong{flex:1}.member-row select{font-size:10px}.invite-link{width:100%;font-size:12px}.activity-list{display:grid;gap:10px}.activity-list button{text-align:left;padding:15px;border:1px solid var(--line);border-radius:7px}#toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);z-index:30;background:#254e3f;color:white;padding:13px 20px;border-radius:8px;font-size:12px;max-width:90%;box-shadow:0 4px 20px #1a352833}#toast.error{background:#823b35}[hidden]{display:none!important}@media(max-width:1200px){.library{width:285px;min-width:285px}.zoom-controls{bottom:89px}.canvas-toolbar{bottom:20px}.tool{width:40px}.inspector{width:250px}}@media(max-width:800px){.topbar{padding:0 12px;gap:8px;height:64px}.workspace{height:calc(100vh - 64px)}.library{width:235px;min-width:235px}.library-heading,.categories,.library-footer{padding-left:14px;padding-right:14px}.library-heading h1{font-size:20px}.template-list{padding-left:14px;padding-right:14px}.search{margin-left:14px;margin-right:14px}.avatars,.live-tag,.canvas-top{display:none}.canvas-toolbar{left:12px;transform:none;flex-wrap:wrap;width:222px;bottom:15px}.tool{width:38px}.canvas-toolbar .divider{display:none}.inspector{width:225px;right:8px;top:10px;max-height:calc(100% - 160px)}.zoom-controls{bottom:119px;right:10px}.board-identity select{max-width:190px}.auth-screen{grid-template-columns:1fr}.auth-story{display:none}.auth-form{min-height:100vh;display:flex;flex-direction:column;justify-content:center}}@media(max-width:540px){.library{width:172px;min-width:172px}.library-heading h1{font-size:16px}.library-heading h1 span,.library-heading p,.library-footer>span,.library-scope{display:none}.library-count{padding:12px}.library-heading{padding:18px 12px 8px}.categories{padding:0 12px 10px;gap:4px}.category{font-size:8px;padding:5px}.mini-preview{height:85px;padding:7px}.card-copy{padding:9px}.card-title{font-size:10px}.card-copy p{font-size:9px}.canvas-toolbar{width:160px}.tool{width:32px}.tool small{font-size:7px}.board-identity select{max-width:140px}.topbar .secondary{font-size:10px;padding:8px}.topbar .divider,#new-board{display:none}.modal-grid,dialog .form-grid.two{grid-template-columns:1fr}.inspector{width:calc(100% - 16px)}#empty h2{font-size:16px}#empty p{font-size:10px}.empty-graphic{transform:scale(.65);width:230px;margin-left:-10px;margin-bottom:0}.zoom-controls{bottom:168px}.preview-large{height:170px}}
/* Each connector participates in the same stacking order as native objects. */
#connections{z-index:auto}
.invite-options{display:flex;gap:8px;flex-wrap:wrap}.invite-options label{display:flex;align-items:center;gap:7px;border:1px solid var(--line);padding:10px 12px;border-radius:7px;font-size:12px}.invite-options label:has(input:checked){background:#e8efe7;border-color:#a8bca8}.invite-options input{accent-color:var(--green);margin:0}.invitation-history{border-top:1px solid var(--line);margin-top:24px;padding-top:18px}.invitation-history h3,.share-members-title{font-size:13px;margin:0 0 10px}.invitation-entry{padding:12px 0;border-bottom:1px solid var(--line);display:flex;align-items:start;gap:10px;flex-wrap:wrap}.invitation-entry>div{flex:1;min-width:160px}.invitation-entry strong{font-size:12px;overflow-wrap:anywhere}.invitation-entry small{display:block;margin-top:5px}.invitation-entry p{flex-basis:100%;margin:0}.badge.failed{background:#fcecea;color:#a43d36}.share-members-title{margin-top:24px}.invite-success{color:var(--green)!important}
.canvas-toolbar{max-width:calc(100% - 30px);overflow-x:auto}.canvas-toolbar .tool{flex-shrink:0}.object.drawing{background:transparent!important;border:0;padding:0;box-shadow:none;transform-origin:center}.object.drawing svg{display:block}.object.drawing.selected{outline:2px solid var(--accent,#20594a)}.object.image img{width:100%;height:100%;object-fit:contain}.object.background{box-shadow:none;background-repeat:repeat}.object.sticky .obj-text{overflow:hidden;height:100%;white-space:pre-wrap;overflow-wrap:anywhere}.overflow-badge{position:absolute;bottom:0;left:0;background:#172b24;color:white;font-size:10px;padding:3px;border:0}.lock-badge{position:absolute;right:4px;top:4px;font-size:11px}#ink-previews{position:absolute;left:0;top:0;pointer-events:none;z-index:20}.ink-author{position:absolute;top:-20px;left:0;white-space:nowrap;background:white;color:#172b24;padding:2px 5px}.object .resize-handle{touch-action:none}#canvas{touch-action:none}pre{white-space:pre-wrap;overflow-wrap:anywhere}.topbar{gap:8px}.topbar>.secondary{font-size:11px;padding:8px}.object .obj-text{overflow-wrap:anywhere}
:root{--theme-surface:#ffffff;--theme-text:#172119;--theme-accent:#20594a;--theme-accent-text:#ffffff;--theme-selection:#20594a}.topbar,.library,.inspector,.canvas-toolbar,.zoom-controls,dialog{background:var(--theme-surface);color:var(--theme-text)}.library p,.inspector p,dialog p,.library h1,.inspector h3,dialog h2,.canvas-top{color:var(--theme-text)}.primary{background:var(--theme-accent);color:var(--theme-accent-text)}.object.selected{outline:2px solid var(--theme-selection)}.theme-cards{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:16px 0}.theme-card{padding:12px;border:2px solid;border-radius:8px;min-height:85px}.theme-card span{display:block;margin-top:10px;padding:5px;border-radius:4px}.emoji-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:20px}.emoji-grid button{font-size:24px;padding:10px;background:#f6f6f3;border:1px solid #ddd;border-radius:6px}.emoji-grid small{font-size:10px;display:block}#theme-invite{position:fixed;right:18px;top:80px;z-index:100;background:white;color:#172119;box-shadow:0 6px 30px #0003;border:1px solid #aaa;padding:16px;max-width:420px;border-radius:12px}.reaction-badges{position:absolute;bottom:-22px;left:0;white-space:nowrap;font-size:12px;background:transparent;color:#172119;border-radius:5px;padding:2px 5px}[data-density="compact"] .tool{padding:6px;min-width:45px}[data-density="compact"] .template-card{margin-bottom:6px}.object.gif .obj-text{width:100%;height:100%}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
#tool-status{position:absolute;left:18px;bottom:105px;background:var(--theme-surface);color:var(--theme-text);padding:5px 9px;border-radius:6px;font-size:11px;pointer-events:none}.tool,.icon-btn{color:var(--theme-text)}.tool.active{background:var(--theme-accent);color:var(--theme-accent-text)}.object{color:#172119}.object.background .obj-text{font-size:14px}.topbar{overflow-x:auto;white-space:nowrap}.topbar .board-identity{min-width:0;flex:0 1 auto}.topbar>.secondary{flex-shrink:0}
.topbar{overflow:visible}.board-tools{position:relative;font-size:12px;z-index:60}.board-tools summary{cursor:pointer;padding:9px 13px;border:1px solid #b6c1b5;border-radius:7px;list-style:none}.board-tools-menu{position:absolute;right:0;top:40px;display:grid;gap:8px;min-width:230px;padding:12px;background:var(--theme-surface);box-shadow:0 8px 25px #0003;border-radius:10px}.board-tools-menu button{text-align:left}.canvas-toolbar{flex-wrap:wrap;justify-content:center;width:max-content;max-width:min(810px,calc(100% - 30px))}.canvas-toolbar .tool{min-width:40px;padding:7px}#tool-status{bottom:135px}
/* Integrated learning surfaces retain the canvas and its personal viewport. */
#help-panel{position:fixed;right:0;top:76px;bottom:0;width:400px;min-width:290px;max-width:85vw;resize:horizontal;overflow:auto;z-index:65;background:var(--paper);color:inherit;border-left:1px solid var(--line);box-shadow:-5px 0 20px #0001;padding:16px;font-size:13px;line-height:1.65}#help-panel header,.chat-panel header,#tour-card header{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-bottom:12px}#help-panel h2{font-size:23px;line-height:1.25;margin-top:20px}#help-panel h3{font-size:16px;margin-top:25px}#help-panel .text-button{display:inline-block;margin-right:10px;text-align:left;font-size:12px}#help-panel .wide{display:block;text-align:left;margin:8px 0}#help-panel small{display:block}#help-panel dt{font-weight:bold}#help-panel dd{margin:0 0 10px}#help-panel footer{border-top:1px solid var(--line);margin-top:24px;padding-top:12px;font-size:10px}body.help-open .workspace{margin-right:400px}.help-search-label{position:sticky;top:0;background:var(--paper);padding:8px 0;z-index:2}.help-highlight{outline:3px solid #bc642b!important;outline-offset:4px!important}#tour-card{position:fixed;width:min(340px,calc(100vw - 24px));max-height:70vh;overflow:auto;z-index:1000;background:var(--paper);color:inherit;border:2px solid var(--green);border-radius:12px;padding:17px;box-shadow:0 8px 30px #0003;font-size:13px;line-height:1.5}#tour-card .actions{display:flex;gap:8px;flex-wrap:wrap}
/* two secondary links sat flush against each other ("Open / locate controlRead related help") */
#tour-card>.text-button{display:inline-block;margin:6px 14px 2px 0}#tour-card button:not(.text-button){border:1px solid var(--line);border-radius:5px;padding:7px}#accessible-tooltip{position:fixed;z-index:2000;max-width:280px;padding:9px 12px;background:#172e28;color:#fff;border:1px solid white;border-radius:6px;font-size:12px;pointer-events:none}#onboarding-banner{position:absolute;top:45px;left:20px;right:20px;padding:13px;background:var(--paper);border:1px solid var(--green);border-radius:9px;z-index:40;font-size:12px}#onboarding-banner button{margin-left:12px;text-decoration:underline}.chat-panel{position:fixed;top:95px;right:25px;width:440px;height:560px;min-width:300px;min-height:280px;max-width:90vw;max-height:85vh;resize:both;overflow:auto;z-index:55;border:1px solid var(--line);border-radius:10px;background:var(--paper);padding:14px;box-shadow:0 7px 30px #0002;display:flex;flex-direction:column;font-size:12px}.chat-panel[hidden],#help-panel[hidden],#tour-card[hidden]{display:none}.chat-panel header{cursor:move;flex-shrink:0}#chat-messages{flex:1;min-height:90px;overflow:auto;overflow-wrap:anywhere}.chat-panel textarea{min-height:60px}.chat-panel .row{flex-wrap:wrap}.chat-panel .row label{min-width:100px;flex:1}.chat-panel .row select{max-width:100%}.chat-panel.docked{left:auto!important;right:0!important;top:76px!important;bottom:0;width:360px;height:auto;max-height:none;border-radius:0;resize:horizontal}body.chat-docked .workspace{margin-right:360px}body.chat-docked.help-open .workspace{margin-right:760px}body.chat-docked.help-open .chat-panel.docked{right:400px!important}.chat-panel small{display:block}#help-button{white-space:nowrap}@media(max-width:1000px){body.help-open .workspace,body.chat-docked .workspace,body.chat-docked.help-open .workspace{margin-right:0}#help-panel{width:340px}#demo-button{display:none}body.chat-docked.help-open .chat-panel.docked{right:0!important}.topbar{gap:8px}}@media(prefers-reduced-motion:reduce){.help-highlight,#help-panel,#tour-card{transition:none;animation:none}}
body.help-open .workspace{margin-right:var(--help-width,400px)}body.chat-docked.help-open .workspace{margin-right:calc(var(--help-width,400px) + 360px)}body.chat-docked.help-open .chat-panel.docked{right:var(--help-width,400px)!important}.engagement-fields{border:1px solid var(--line);padding:16px;border-radius:8px;display:grid;gap:13px}.engagement-fields input[type=range]{width:100%}.engagement-fields output{font-size:14px;font-weight:700}@media(max-width:1000px){body.help-open .workspace,body.chat-docked.help-open .workspace{margin-right:0}body.chat-docked.help-open .chat-panel.docked{right:0!important}}
#help-panel,.chat-panel,#tour-card,#onboarding-banner,.help-search-label{background:var(--theme-surface);color:var(--theme-text)}#help-panel p,#help-panel small,.chat-panel p,.chat-panel small,#tour-card p,#help-panel .helper{color:var(--theme-text)}.secondary{background:var(--theme-surface);color:var(--theme-text)}.text-button{color:var(--theme-text)}#help-panel a{color:var(--theme-text);text-decoration:underline}

#participant-cursors{position:absolute;inset:0;pointer-events:none;z-index:10000}.participant-cursor{position:absolute;color:#174e43;white-space:nowrap}.participant-cursor small{background:#fff;color:#172a23;border:1px solid #174e43;border-radius:5px;padding:3px 6px;font-size:12px}.participant-cursor>span{font-size:22px}
#persona-dialog{width:min(1120px,94vw);max-height:90vh;overflow:auto;background:var(--surface,#fff);color:var(--text,#203e35);border:1px solid #819689;border-radius:16px;padding:24px}#persona-dialog::backdrop{background:#10241b88}.persona-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin:16px 0}.persona-card{text-align:left;white-space:normal}.persona-traits{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px}.persona-traits small{display:block}.persona-instructions{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.6 system-ui;max-height:340px;overflow:auto;padding:12px;background:#e8eee9;color:#172a23}#persona-dialog input:not([type=checkbox]):not([type=range]):not([type=color]),#persona-dialog select,#persona-dialog textarea{width:100%}#persona-dialog fieldset{border:1px solid #819689;border-radius:8px;padding:14px}

.history-visual{width:100%;height:360px;background:#f4f5f3;border:1px solid #88968f;border-radius:8px}.history-comparison{display:grid;grid-template-columns:1fr 1fr;gap:16px}.history-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto}#history-list{max-height:55vh;overflow:auto}#history-objects{width:100%}@media(max-width:700px){.history-comparison{grid-template-columns:1fr}}
/* Direct object editing and compact canvas controls. */
.object-controls{display:flex;position:absolute;right:0;top:-72px;gap:6px;padding:6px;background:var(--theme-surface,#fff);color:var(--theme-text,#172119);border:1px solid var(--line);border-radius:14px;box-shadow:0 6px 20px #0002;opacity:0;pointer-events:none;z-index:30;transform:scale(var(--ib-inv-zoom,1));transform-origin:bottom right}
.object-controls:after{content:'';position:absolute;top:100%;left:0;right:0;height:24px}.object:hover>.object-controls,.object:focus-within>.object-controls,.object.selected>.object-controls{opacity:1;pointer-events:auto}.object-controls button{width:56px;height:56px;font-size:32px;padding:6px;border-radius:8px}.object-controls button:hover{background:#879d8833}.object .obj-text[contenteditable=true]{cursor:text;user-select:text;touch-action:auto;outline:2px solid var(--theme-selection);overflow:auto;min-height:100%;background:inherit;position:relative;z-index:15;white-space:pre-wrap}.object.frame>.obj-text[contenteditable=true]{min-height:49px;height:auto;max-height:150px}.object:has([contenteditable=true]){z-index:25!important}
.canvas-toolbar{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:3px;width:max-content;max-width:calc(100% - 24px);overflow-x:auto;overflow-y:hidden;left:50%;transform:translateX(-50%);padding:7px;bottom:18px;scrollbar-width:thin}.canvas-toolbar .tool{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:0 0 48px;width:48px;min-width:48px;height:50px;padding:4px 2px;gap:3px;font-size:21px;line-height:1}.canvas-toolbar .tool small{display:block;max-width:100%;font-size:9px;line-height:12px;white-space:nowrap;color:inherit;letter-spacing:0}.canvas-toolbar .divider{flex:0 0 1px;margin:0 3px}.zoom-controls{bottom:82px}#tool-status{bottom:92px;max-width:calc(100% - 190px);font-size:11px;white-space:normal}.canvas-toolbar .tool:hover{background:#879d8833}
#ink-radial{position:absolute;bottom:86px;left:50%;transform:translateX(-50%);width:300px;max-width:calc(100% - 20px);max-height:calc(100% - 100px);overflow:auto;z-index:35;background:var(--theme-surface);color:var(--theme-text);border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:0 10px 35px #0002;font-size:12px}#ink-radial header,#agent-palette header{display:flex;justify-content:space-between;align-items:center;gap:10px}#ink-radial header button,#agent-palette header button{font-size:22px}.ink-wheel{position:relative;width:250px;height:244px;margin:4px auto}.ink-wheel>button{position:absolute;left:90px;top:88px;transform:rotate(var(--angle)) translateY(-82px) rotate(calc(-1 * var(--angle)));width:70px;height:66px;border-radius:50%;background:#879d8814;border:1px solid #879d8855;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.ink-wheel>button span{font-size:25px}.ink-wheel>button small{font-size:10px;color:inherit}.ink-wheel>button.active{background:var(--theme-accent);color:var(--theme-accent-text)}.ink-wheel-center{position:absolute;left:114px;top:110px;pointer-events:none}.ink-wheel+label{display:flex;align-items:center;justify-content:space-between}#ink-radial label{margin:8px 0}#radial-color{width:65px;height:34px;padding:2px}#radial-width{width:100%;padding:0}
#agent-palette{position:absolute;top:55px;left:15px;width:285px;max-width:calc(100% - 30px);max-height:calc(100% - 170px);overflow:auto;background:var(--theme-surface);color:var(--theme-text);z-index:36;border:1px solid var(--line);border-radius:12px;padding:15px;box-shadow:0 10px 35px #0002;font-size:12px}#agent-palette p{font-size:11px;line-height:1.6}#agent-palette-search{width:100%;font-size:12px}#agent-palette-results{display:grid;gap:8px;margin-top:12px}#agent-palette-results button{display:grid;grid-template-columns:25px 1fr;gap:5px;text-align:left;border:1px solid var(--line);border-radius:8px;padding:10px;cursor:grab;font-size:12px}#agent-palette-results button small{grid-column:1/-1;line-height:1.4}#agent-palette-results button>span:last-child{grid-column:2;font-size:10px}#agent-dock{position:absolute;bottom:145px;left:12px;right:12px;display:flex;gap:7px;overflow-x:auto;pointer-events:none;z-index:4}#agent-dock:empty{display:none}.agent-chip{pointer-events:auto;display:grid;grid-template-columns:22px 1fr;align-items:center;gap:3px 5px;flex:0 0 auto;max-width:210px;padding:7px 10px;border-radius:9px;border:1px solid var(--line);background:var(--theme-surface);color:var(--theme-text);font-size:11px;text-align:left}.agent-chip small{grid-column:2;font-size:9px;white-space:nowrap}.agent-chip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.agent-chip.unbound{border-style:dashed}.agent-chip.connected{border-color:var(--theme-accent)}
@media(max-width:800px){.canvas-toolbar{width:max-content;max-width:calc(100% - 16px);left:50%;bottom:12px}.canvas-toolbar .tool{flex-basis:46px;width:46px;min-width:46px;height:47px}.canvas-toolbar .tool small{font-size:8px}.zoom-controls{bottom:79px}#tool-status{bottom:113px;left:10px;max-width:calc(100% - 20px)}#agent-dock{bottom:149px}#ink-radial{bottom:80px}.object-controls{opacity:1;pointer-events:auto}#agent-palette{top:10px}}
@media(prefers-reduced-motion:reduce){.object-controls{transition:none}}

#agent-dock{bottom:88px;right:170px}#tool-status{bottom:142px}@media(max-width:800px){#agent-dock{bottom:87px;right:150px}#tool-status{bottom:145px}}
.connector-label{border:0;background:var(--theme-surface);box-shadow:none;min-height:24px}.connector-label>.obj-text{padding:4px 7px;height:auto;font-size:12px}.connector-label .object-controls{top:-70px}
#canvas.ink-mode .object-controls{opacity:0;pointer-events:none}
.connector-label>.obj-text:empty:not([contenteditable=true]):before{content:attr(data-placeholder);opacity:.65}
/* Ink Studio: illustrated tools and tactile radial controls. */
#ink-radial.stylus-studio{width:360px;padding:15px 16px 10px;border-radius:30px;border:1px solid #89938c40;background:var(--theme-surface,#fff);box-shadow:0 18px 65px #1b302a26,0 2px 8px #1b302a0c;max-height:calc(100% - 100px);scrollbar-width:thin;container-type:inline-size;isolation:isolate}
.stylus-header{height:38px;padding:0 2px;display:flex;align-items:center;justify-content:space-between}.stylus-header>div{display:grid;gap:3px}.stylus-eyebrow{font-size:8px;letter-spacing:1.9px;opacity:.58;font-weight:650}.stylus-header strong{font-size:17px;font-weight:600;letter-spacing:-.5px}#ink-radial.stylus-studio .stylus-header>button{width:32px;height:32px;border:1px solid #8a9a8c30;border-radius:50%;display:grid;place-items:center;padding:7px}.stylus-header svg{width:16px;height:16px}
.stylus-stage{position:relative;width:100%;aspect-ratio:360/320;margin:7px 0 2px;background:radial-gradient(ellipse at 50% 55%,#a5b9a319 0%,transparent 66%)}.stylus-illustration{display:block;overflow:visible;filter:drop-shadow(1px 3px 2px #1526211c)}.stylus-hero{position:absolute;left:50%;top:32%;transform:translateX(-50%);width:30%;text-align:center;pointer-events:none}.stylus-hero>.stylus-illustration{width:100%;height:39cqi;max-height:132px}.stylus-hero-caption{display:grid;gap:5px;margin-top:5px;white-space:nowrap;position:relative;left:50%;transform:translateX(-50%);width:max-content;max-width:200%}.stylus-hero-caption strong{font-size:16px;letter-spacing:-.3px;font-weight:600}.stylus-hero-caption span{font-size:9px;opacity:.65}.stylus-tool-choice{position:absolute;transform:translate(-50%,-5%) rotate(-5deg);width:16%;height:34%;border-radius:18px;padding:4px 5px 2px!important;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:3px;border:1px solid transparent;transition:transform .15s,background .15s;touch-action:manipulation}.stylus-tool-choice:nth-child(n+4){transform:translate(-50%,-5%) rotate(5deg)}.stylus-tool-choice>.stylus-illustration{width:100%;height:calc(100% - 17px)}.stylus-tool-choice small{font-size:9px;color:inherit;white-space:nowrap;line-height:12px}.stylus-tool-choice.is-selected{background:#789d8315;border-color:#789d8355}.stylus-tool-choice:hover{background:#789d8320;transform:translate(-50%,-10%)}.stylus-tool-choice:focus-visible,.stylus-swatch:focus-visible,.stylus-tabs button:focus-visible{outline:2px solid var(--theme-selection);outline-offset:3px}
.stylus-history{position:absolute;top:63%;width:38px;height:38px;display:grid;place-items:center;border-radius:50%;padding:9px;border:1px solid #87998a25;background:var(--theme-surface)}.stylus-undo{left:8%}.stylus-redo{right:8%}.stylus-history svg{width:20px;height:20px}.stylus-quick-color,.stylus-quick-size{position:absolute;top:82%;width:60px;min-height:46px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:6px;font-size:9px;border-radius:16px;background:#87998a0d}.stylus-quick-color{left:9%}.stylus-quick-size{right:9%}.stylus-quick-color i{width:24px;height:24px;border-radius:50%;box-shadow:0 0 0 3px var(--theme-surface),0 0 0 4px #89998d50}.stylus-quick-size i{display:block;border-radius:50%}.stylus-quick-color span,.stylus-quick-size span{opacity:.7}
.stylus-color-stage .stylus-hero,.stylus-size-stage .stylus-hero{top:24%}.stylus-color-stage .stylus-hero-caption,.stylus-size-stage .stylus-hero-caption{margin-top:0}.stylus-swatch{position:absolute;transform:translate(-50%,-50%);width:36px;height:36px;width:11cqi;height:11cqi;max-width:39px;max-height:39px;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 1px #0002,0 2px 4px #16282115;border:4px solid var(--theme-surface)}.stylus-swatch.is-selected{outline:1.5px solid var(--theme-text);outline-offset:3px;box-shadow:inset 0 0 0 1px #0002,0 0 0 2px var(--theme-surface)}.stylus-swatch:hover{transform:translate(-50%,-50%) scale(1.12)}#ink-radial .stylus-custom-color{display:flex;align-items:center;justify-content:center;gap:12px;margin:5px 0 12px;font-size:11px;font-weight:400}.stylus-custom-color #radial-color{width:34px;height:30px;padding:2px;border-radius:50%;overflow:hidden}.stylus-custom-color>span{font-size:10px;font-family:ui-monospace,monospace;opacity:.6}
#stylus-dial{position:absolute;inset:0;touch-action:none;border-radius:50%;cursor:crosshair}#stylus-dial svg{display:block;width:100%;height:100%;overflow:visible}.stylus-dial-track{fill:none;stroke:#83938a20;stroke-width:27;stroke-linecap:round}.stylus-dial-value{fill:none;stroke:var(--theme-text);stroke-width:27;stroke-linecap:round}.stylus-dial-thumb{fill:var(--theme-surface);stroke:var(--theme-text);stroke-width:4;filter:drop-shadow(0 2px 3px #0003)}.stylus-size-readout{position:absolute;left:4%;top:43%;display:flex;align-items:baseline;gap:3px;font-size:21px;font-variant-numeric:tabular-nums;pointer-events:none;background:var(--theme-surface);padding:5px;border-radius:12px}.stylus-size-readout small{font-size:9px;color:inherit;opacity:.6}.stylus-size-presets{display:flex;justify-content:center;gap:9px;margin:2px 0 10px}.stylus-size-presets button{width:38px;height:40px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;border-radius:10px;border:1px solid transparent}.stylus-size-presets i{display:block;border-radius:50%;height:24px}.stylus-size-presets small{font-size:9px;color:inherit}.stylus-size-presets [aria-pressed=true]{border-color:var(--theme-selection);background:#849c8315}
.stylus-tabs{display:flex;justify-content:center;gap:8px;padding:5px;border:1px solid #87998a25;border-radius:22px;background:#87998a0b;width:max-content;max-width:100%;margin:0 auto 10px}.stylus-tabs button{display:flex;align-items:center;gap:7px;border-radius:18px;padding:8px 13px;font-size:11px;line-height:16px}.stylus-tabs svg{width:18px;height:18px}.stylus-tabs .is-selected{background:var(--theme-surface);box-shadow:0 1px 5px #172d2717}.stylus-controls{padding:6px 8px 0;border-top:1px solid #87998a25}#ink-radial .stylus-range-label{display:flex;justify-content:space-between;margin:0 0 6px;font-size:10px;font-weight:400;opacity:.75}#ink-radial.stylus-studio #radial-width{height:16px;min-height:16px;width:100%;margin:0;accent-color:var(--theme-accent);background:transparent}.stylus-footer{display:flex;justify-content:space-between;align-items:center;margin-top:4px}#ink-radial .stylus-footer label{font-size:10px;margin:0;align-items:center;font-weight:400}.stylus-footer input{accent-color:var(--theme-accent)}.stylus-footer>button{display:grid;place-items:center;padding:6px;width:30px;height:30px;border-radius:50%}.stylus-footer svg{width:18px;height:18px}.stylus-footer>button:hover{background:#87998a20}.canvas-toolbar #draw-pen>.stylus-illustration{width:25px;height:29px;overflow:hidden;margin-top:-2px}
@media(max-width:540px){#ink-radial.stylus-studio{padding:10px 8px;border-radius:24px;max-width:calc(100% - 12px)}.stylus-header strong{font-size:14px}.stylus-eyebrow{font-size:7px}.stylus-tabs{gap:0;width:100%;padding:3px}.stylus-tabs button{padding:7px;gap:4px;font-size:10px}.stylus-tabs svg{width:14px}.stylus-hero-caption strong{font-size:12px}.stylus-hero-caption span{font-size:8px}.stylus-tool-choice small{font-size:7px}.stylus-history{width:29px;height:29px;padding:7px}.stylus-quick-color,.stylus-quick-size{width:40px;font-size:8px;min-height:34px}.stylus-quick-color i{width:17px;height:17px}.stylus-quick-color{left:4%}.stylus-quick-size{right:4%}.stylus-custom-color>span{display:none}.stylus-size-readout{font-size:15px}.stylus-size-presets{gap:3px}.stylus-size-presets button{width:28px}}
@media(prefers-reduced-motion:reduce){.stylus-tool-choice,.stylus-swatch{transition:none}}
@media(max-width:540px){#ink-radial.stylus-studio{position:fixed;left:50%;bottom:86px;width:360px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 115px);padding:14px 16px 10px}.stylus-tool-choice small{font-size:9px}.stylus-hero-caption strong{font-size:15px}.stylus-hero-caption span{font-size:9px}.stylus-header strong{font-size:17px}.stylus-tabs button{font-size:11px;padding:8px 10px;gap:6px}.stylus-tabs svg{width:18px}.stylus-history{width:36px;height:36px;padding:8px}.stylus-quick-color,.stylus-quick-size{width:52px;min-height:44px;font-size:9px}.stylus-quick-color i{width:23px;height:23px}.stylus-size-readout{font-size:20px}.stylus-size-presets{gap:7px}.stylus-size-presets button{width:36px}}
/* A quiet reveal handle opens the floating canvas dock. */
.canvas-dock{position:absolute;left:50%;bottom:5px;transform:translateX(-50%);width:calc(100% - 24px);max-width:1020px;height:34px;z-index:40;display:flex;justify-content:center;align-items:end}.dock-surface{position:absolute;bottom:34px;left:50%;width:max-content;max-width:100%;border-radius:25px;opacity:0;visibility:hidden;pointer-events:none;transform:translateX(-50%) translateY(20px) scale(.97);transition:opacity .2s ease,transform .3s cubic-bezier(.2,.8,.2,1),visibility .2s}.canvas-dock.is-open .dock-surface{opacity:1;visibility:visible;pointer-events:auto;transform:translateX(-50%) translateY(0) scale(1)}
.canvas-dock .canvas-toolbar{position:relative;left:auto;bottom:auto;transform:none;display:flex;flex-wrap:nowrap;justify-content:flex-start;width:max-content;max-width:100%;padding:9px 10px 8px;gap:4px;border:1px solid #a6b3ac65;border-top-color:#ffffffa6;border-radius:25px;background:var(--theme-surface);background:color-mix(in srgb,var(--theme-surface) 86%,transparent);backdrop-filter:blur(22px) saturate(135%);-webkit-backdrop-filter:blur(22px) saturate(135%);box-shadow:0 12px 32px #1a2f2722,0 2px 5px #1a2f2710,inset 0 1px 0 #ffffff60;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#89978b55 transparent}
.canvas-dock .canvas-toolbar .tool{position:relative;flex:0 0 46px;width:46px;min-width:46px;height:50px;border-radius:14px;gap:4px;transition:transform .16s ease,background .16s ease;transform-origin:center bottom;background:transparent;color:var(--theme-text)}.canvas-dock .canvas-toolbar .tool small{font-size:8px;line-height:11px;letter-spacing:.05px;opacity:.75}.canvas-dock .canvas-toolbar .tool.active{background:color-mix(in srgb,var(--theme-accent) 12%,transparent);color:var(--theme-text)}.canvas-dock .canvas-toolbar .tool.active:after{content:'';position:absolute;bottom:1px;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:var(--theme-accent)}.canvas-dock .canvas-toolbar .tool:focus-visible{outline:2px solid var(--theme-selection);outline-offset:-2px;background:#899c8d22}.canvas-dock .canvas-toolbar .divider{height:30px;flex:0 0 1px;margin:0 3px;background:#8f9d9140}
.dock-reveal{display:flex;align-items:center;justify-content:center;width:122px;height:32px;border-radius:18px;padding:0;background:transparent;touch-action:manipulation}.dock-reveal span{display:block;width:72px;height:5px;border-radius:9px;background:var(--theme-text);opacity:.32;box-shadow:0 1px 2px #ffffff80;transition:width .2s ease,opacity .2s ease,transform .2s ease}.dock-reveal:hover span,.dock-reveal:focus-visible span{width:86px;opacity:.7}.dock-reveal:focus-visible{outline:2px solid var(--theme-selection);outline-offset:-4px}.canvas-dock.is-open .dock-reveal span{opacity:.5;width:54px}
.board-main:not(.dock-open) #tool-status{bottom:48px}.board-main:not(.dock-open) .zoom-controls{bottom:44px}.board-main:not(.dock-open) #agent-dock{bottom:44px}.board-main.dock-open .zoom-controls{bottom:124px}.board-main.dock-open #agent-dock{bottom:124px}.board-main.dock-open #tool-status{bottom:177px}.board-main.dock-open #ink-radial{bottom:126px;max-height:calc(100% - 140px)}
@media(hover:hover) and (pointer:fine){.canvas-dock .canvas-toolbar .tool:hover:not(:disabled){transform:translateY(-3px) scale(1.06);background:#8298891c}.canvas-dock .canvas-toolbar .tool:active:not(:disabled){transform:translateY(-1px) scale(.97)}}
@media(max-width:800px){.canvas-dock{width:calc(100% - 12px);bottom:3px}.canvas-dock .canvas-toolbar{border-radius:21px;padding:8px;gap:3px}.canvas-dock .canvas-toolbar .tool{flex-basis:44px;min-width:44px;width:44px;height:48px}.board-main.dock-open #tool-status{bottom:169px}.board-main.dock-open .zoom-controls,.board-main.dock-open #agent-dock{bottom:117px}}
@media(max-width:540px){.board-main.dock-open #ink-radial.stylus-studio{bottom:120px;max-height:calc(100dvh - 145px)}}
@media(prefers-reduced-motion:reduce){.dock-surface,.dock-reveal span,.canvas-dock .canvas-toolbar .tool{transition:none}.canvas-dock .canvas-toolbar .tool:hover:not(:disabled){transform:none}}
.canvas-dock.is-arming .dock-reveal span{width:86px;opacity:.75;transition-duration:1.8s}.board-main.dock-open #ink-radial.stylus-studio .stylus-stage{width:calc(100% - 34px);margin-left:auto;margin-right:auto}@media(prefers-reduced-motion:reduce){.canvas-dock.is-arming .dock-reveal span{transition:none}}
#tool-status:empty{display:none}
.canvas-dock .tool>svg{display:block;width:22px;height:23px;flex-shrink:0}.canvas-dock .tool:disabled{opacity:.35}
/* Canvas-first workspace, inspired by quiet floating creative tools. */
.workspace-refined .topbar{height:64px;padding:10px 18px;border-bottom:1px solid var(--line);gap:10px}.workspace-refined .workspace{height:calc(100vh - 64px)}.workspace-refined .canvas-top{padding-left:22px;height:38px}.workspace-refined .canvas-top #board-caption{opacity:.65;font-size:11px}.workspace-refined.library-collapsed .library{display:none}.workspace-refined.library-collapsed .workspace{grid-template-columns:minmax(0,1fr)}.workspace-refined .library{box-shadow:5px 0 25px #00000008}.workspace-refined .template-card{border-radius:14px;overflow:hidden}.workspace-refined .mini-preview{border-radius:10px}.workspace-refined .board-main{min-width:0}.workspace-bar{position:absolute;top:48px;left:18px;display:flex;gap:3px;z-index:35;padding:5px;border:1px solid var(--line);border-radius:14px;background:var(--theme-surface);box-shadow:0 4px 18px #0001}.workspace-bar button{font-size:16px;padding:8px 10px;border-radius:9px;display:flex;align-items:center;gap:7px}.workspace-bar button span{font-size:11px}.workspace-bar button:hover,.workspace-bar [aria-expanded=true]{background:color-mix(in srgb,var(--theme-accent) 16%,transparent)}
#workspace-minimap{position:absolute;right:18px;bottom:160px;width:220px;border:1px solid var(--line);padding:12px;border-radius:16px;background:var(--theme-surface);color:var(--theme-text);z-index:34;box-shadow:0 8px 24px #0002}#workspace-minimap[hidden]{display:none}#workspace-minimap header{display:flex;align-items:center;gap:8px;font-size:11px;margin-bottom:12px}#workspace-minimap header strong{margin-right:auto}#workspace-minimap header button{font-size:10px}#workspace-minimap svg{display:block;width:100%;height:125px;margin-inline:auto;background:var(--theme-canvas);border-radius:7px;cursor:crosshair}.command-result{display:grid;width:100%;text-align:left;padding:12px 14px;border:1px solid transparent;border-radius:9px;gap:5px}.command-result b{font-size:13px;font-weight:500}.command-result small{color:inherit;opacity:.65}.command-result.is-current,.command-result:hover{border-color:var(--theme-selection);background:color-mix(in srgb,var(--theme-accent) 15%,transparent)}#command-results{max-height:45vh;overflow:auto;margin:15px 0}#task-summary{padding:16px;border:1px solid var(--line);border-radius:12px;margin-bottom:18px;font-size:13px}.task-row{display:grid;gap:7px;width:100%;text-align:left;padding:14px;border-bottom:1px solid var(--line)}.task-row span{font-size:11px;opacity:.7}#workspace-task-list{max-height:45vh;overflow:auto;margin:16px 0}.workspace-refined dialog{border-radius:20px;box-shadow:0 24px 90px #0005}.workspace-refined dialog::backdrop{background:#10172288;backdrop-filter:blur(3px)}
[data-workspace-tone=dark]{color-scheme:dark;--line:#425063;--muted:#b1bdce;--paper:var(--theme-surface);--green:var(--theme-accent)}[data-workspace-tone=dark] body{background:var(--theme-canvas);color:var(--theme-text)}[data-workspace-tone=dark] :is(input,textarea,select){background:#1c232d;color:#e4ebf5;border-color:#506077}[data-workspace-tone=dark] :is(.topbar,.library,.canvas-top,.inspector,dialog,.board-tools-menu){background:var(--theme-surface);color:var(--theme-text);border-color:var(--line)}[data-workspace-tone=dark] :is(.library-heading p,.helper,.card-copy p,.card-meta,.eyebrow,.library-footer,.library-count,.attribution){color:#b1bdce}[data-workspace-tone=dark] :is(.template-card,.search,.category,.secondary){background:var(--theme-surface);color:var(--theme-text);border-color:var(--line)}[data-workspace-tone=dark] .category.active{background:#344b69;color:#d9eaff}[data-workspace-tone=dark] .primary{color:#122238}[data-workspace-tone=dark] #empty{color:var(--theme-text)}[data-workspace-tone=dark] .canvas-dock .canvas-toolbar{border-color:#61718970;box-shadow:0 12px 32px #0005}[data-workspace-tone=dark] .live-tag{background:#304339;color:#bcdfcc}
@media(max-width:800px){.workspace-bar{left:8px;top:43px;max-width:calc(100% - 16px);overflow:auto}.workspace-bar button{padding:9px}.workspace-bar button span{display:none}#workspace-minimap{width:170px;right:8px;bottom:170px}.workspace-refined .topbar{padding:8px;gap:5px}.workspace-refined .library{position:absolute;left:0;top:64px;bottom:0;z-index:44;width:min(340px,90vw)}}
.workspace-refined #onboarding-banner{top:108px;left:18px;right:auto;max-width:calc(100% - 36px)}[data-workspace-tone=dark] .canvas-top button{background:var(--theme-surface);color:var(--theme-text)}[data-workspace-tone=dark] #empty p,[data-workspace-tone=dark] #empty>span{color:#b1bdce}[data-workspace-tone=dark] .empty-graphic>div{color:#263b32}.workspace-refined .workspace-bar button:focus-visible{outline:2px solid var(--theme-selection);outline-offset:2px}
/* Native disclosure controls keep a large library calm and keyboard accessible. */
.categories:has(.template-category-label){display:block}.template-category-label{font-size:10px;width:100%}.template-category-label select{width:100%;margin-top:4px}.template-group-actions{display:flex;justify-content:space-between;gap:8px;margin-top:10px}.template-group-actions button{font-size:10px;text-decoration:underline;padding:5px 0}.template-group{border:1px solid var(--line);border-radius:12px;margin-bottom:10px;background:var(--theme-surface)}.template-group>summary{display:flex;align-items:center;gap:8px;cursor:pointer;padding:13px 12px;font-size:12px;font-weight:650;list-style:none}.template-group>summary::-webkit-details-marker{display:none}.template-group>summary:before{content:'›';font-size:18px;transition:transform .15s}.template-group[open]>summary:before{transform:rotate(90deg)}.template-group>summary small{margin-left:auto;padding:3px 7px;border-radius:20px;background:color-mix(in srgb,var(--theme-accent) 12%,transparent);color:inherit;font-size:10px}.template-group>summary:focus-visible{outline:2px solid var(--theme-selection);outline-offset:2px;border-radius:10px}.template-group-content{padding:0 9px 3px}.template-group .template-card{width:100%;margin-bottom:9px}.template-group .mini-preview{height:130px}.template-group .card-copy{padding:12px}.template-group .card-title{font-size:12px}.template-group .card-copy p{font-size:11px}.template-group .card-meta{font-size:9px}
#tour-callout{position:fixed;inset:0;pointer-events:none;z-index:999}#tour-callout[hidden]{display:none}#tour-callout>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.tour-leader{fill:none;stroke:var(--theme-selection,#20594a);stroke-width:2.5;filter:drop-shadow(0 1px 2px #fff8)}.tour-target-ring{position:fixed;border:3px solid var(--theme-selection,#20594a);border-radius:9px;box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-surface,#fff) 85%,transparent);pointer-events:none}.tour-target-ring>span{position:absolute;top:-13px;left:5px;min-width:24px;height:24px;display:grid;place-items:center;background:var(--theme-selection,#20594a);color:var(--theme-accent-text,#fff);border:2px solid var(--theme-surface,#fff);border-radius:50%;font-size:11px;font-weight:700}#tour-card{border-color:var(--theme-selection);z-index:1000}
/* A discoverable edge handle reveals the AI team drawer. */
#agent-edge{position:absolute;right:0;top:42%;z-index:43;display:flex;align-items:center;gap:9px;padding:12px 7px;border:1px solid var(--line);border-right:0;border-radius:14px 0 0 14px;background:var(--theme-surface);color:var(--theme-text);box-shadow:-3px 3px 15px #0001;writing-mode:vertical-rl;font-size:11px}#agent-edge>span:first-child{font-size:19px}#agent-edge i{width:4px;height:28px;border-radius:4px;background:var(--theme-text);opacity:.35}#agent-edge[aria-expanded=true]{opacity:0;pointer-events:none}#agent-palette{position:absolute;inset:46px 12px 16px auto;width:350px;max-width:calc(100% - 24px);max-height:none;border-radius:22px;padding:18px;background:var(--theme-surface);color:var(--theme-text);border:1px solid var(--line);box-shadow:0 15px 65px #0003;z-index:44;display:flex;flex-direction:column;gap:10px;overflow:hidden;animation:agent-drawer-enter .2s ease-out}#agent-palette[hidden]{display:none}#agent-palette>header{display:flex;align-items:center;justify-content:space-between}#agent-palette>header>div{display:grid;gap:6px}#agent-palette>header small{font-size:8px;letter-spacing:1.8px;color:inherit;opacity:.6}#agent-palette>header strong{font-size:20px;font-weight:600;letter-spacing:-.4px}#agent-palette>header button{width:32px;height:32px;border-radius:50%;background:color-mix(in srgb,var(--theme-text) 7%,transparent)}#agent-palette p{margin:0;font-size:11px;line-height:1.5}#agent-palette .helper{font-size:9px;color:inherit;opacity:.7}#agent-palette-search{flex-shrink:0;width:100%;font-size:12px}#agent-palette-results{overflow:auto;min-height:0;flex:1;scrollbar-width:thin}#agent-palette-results .agent-persona-tile{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:12px 4px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:inherit;min-height:102px}#agent-palette-results .agent-persona-tile:hover{background:color-mix(in srgb,var(--theme-accent) 8%,transparent)}.agent-portrait{display:block;flex:0 0 52px;width:52px;height:52px;border-radius:50%;background-image:url('/agent-portraits.png');background-size:400% 300%;background-color:#bbc6ce;border:2px solid var(--theme-surface);box-shadow:0 0 0 1px var(--line);overflow:hidden}.agent-tile-copy{display:grid;gap:6px;min-width:0}.agent-tile-copy b{font-size:12px;line-height:1.35}.agent-tile-copy small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:10px;line-height:1.5;color:inherit;opacity:.65}.agent-tile-copy .badge{font-size:8px;width:max-content;padding:2px 5px}.agent-tile-add{margin-left:auto;font-size:22px;color:var(--theme-accent)}#agent-palette>footer{border-top:1px solid var(--line);padding-top:6px}.agent-join-heading{display:flex;gap:16px;align-items:center;margin:15px 0 24px}.agent-join-heading h2{margin:8px 0 0}.agent-join-heading .agent-portrait{width:68px;height:68px;flex-basis:68px}.agent-start-options{padding:14px;border:1px solid var(--line);border-radius:12px}.agent-start-options summary{cursor:pointer;font-size:12px}.agent-start-options label{margin-top:15px}.agent-start-options p{margin-top:12px}.agent-chip>.agent-portrait{width:26px;height:26px;flex-basis:26px;grid-row:span 2}.agent-chip small{grid-column:2}@keyframes agent-drawer-enter{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:translateX(0)}}@media(max-width:540px){#agent-palette{top:45px;bottom:80px;width:330px;padding:15px}#agent-edge{padding:10px 6px;font-size:10px}}@media(prefers-reduced-motion:reduce){#agent-palette{animation:none}}
body.gallery-open .workspace{display:none}
/* Board-scoped header cluster belongs to the board that was open; in the Boards view it must not
   linger above the gallery or stay clickable (Share/Board tools act on the previous board). */
body.gallery-open .board-identity,body.gallery-open .live-tag,body.gallery-open #avatars,body.gallery-open .board-tools,body.gallery-open #share{display:none}#board-gallery{height:calc(100dvh - 64px);overflow:auto;padding:46px max(24px,calc((100vw - 1200px)/2));background:var(--theme-canvas,#f5f7f3);color:var(--theme-text,#253d36)}#board-gallery[hidden]{display:none}.gallery-header{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:30px}.gallery-header h1{font-size:clamp(27px,3vw,40px);letter-spacing:-1px;font-weight:600;margin:12px 0}.gallery-header p,.gallery-discovery p{font-size:12px;opacity:.65;margin-bottom:0}.gallery-discovery{display:flex;align-items:center;gap:14px;border:1px solid var(--line);background:var(--theme-surface,#fff);border-radius:18px;padding:24px;margin-bottom:40px}.gallery-discovery>div{margin-right:auto}.gallery-discovery strong{font-size:16px;font-weight:600}.gallery-filter-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:20px}.gallery-filter-row h2{margin:0 auto 9px 0;font-size:20px}.gallery-filter-row h2 small{font-weight:400;margin-left:10px}.gallery-filter-row input{width:250px}.gallery-filter-row label{font-size:10px}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:22px}.gallery-card{display:block;text-align:left;border:1px solid var(--line);border-radius:16px;padding:0;overflow:hidden;background:var(--theme-surface,#fff);color:inherit;transition:transform .15s,box-shadow .15s}.gallery-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px #0002}.gallery-card:focus-visible{outline:3px solid var(--theme-selection);outline-offset:3px}.gallery-preview{height:175px;background:#e8eee8;padding:16px}.gallery-preview svg{width:100%;height:100%;display:block}.gallery-card-copy{padding:18px}.gallery-card h3{font-size:16px;margin:12px 0 8px;overflow-wrap:anywhere}.gallery-card p{font-size:11px;opacity:.65;margin-bottom:12px}.gallery-card small{font-size:10px;color:inherit;opacity:.6}.gallery-empty-preview{height:100%;display:grid;place-content:center;gap:8px;text-align:center;color:#687b70;font-size:32px}.gallery-empty-preview small{font-size:11px}.gallery-no-results{grid-column:1/-1;padding:50px;text-align:center;border:1px dashed var(--line);border-radius:15px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:800px){#board-gallery{padding:24px 16px}.gallery-header,.gallery-discovery{align-items:start;flex-wrap:wrap}.gallery-header .actions{flex-wrap:wrap}.gallery-filter-row input{width:100%}.gallery-discovery{padding:18px}.topbar{overflow-x:auto}.board-tools[open]{position:static}}
.object.image img,.object.gif img{-webkit-user-drag:none;user-select:none;pointer-events:none}.object.sticky{border-radius:2px;box-shadow:0 2px 3px #18271e12,0 7px 12px -9px #18271e70;background-image:linear-gradient(168deg,#ffffff18 0%,transparent 60%,#00000004 100%);isolation:isolate}.object.sticky:before{content:'';position:absolute;bottom:3px;width:45%;height:14%;z-index:-1;box-shadow:0 9px 9px #15251d26;pointer-events:none}.object.sticky:after{content:'';position:absolute;bottom:0;width:27px;height:20px;background:linear-gradient(145deg,transparent 35%,#00000008 62%,#ffffff45 85%);pointer-events:none}.object.sticky.curl-right{border-bottom-right-radius:19px 5px}.object.sticky.curl-right:before{right:7px;transform:rotate(4deg)}.object.sticky.curl-right:after{right:0;border-radius:0 0 17px 0;box-shadow:1px 3px 3px -2px #0003}.object.sticky.curl-left{border-bottom-left-radius:19px 5px}.object.sticky.curl-left:before{left:7px;transform:rotate(-4deg)}.object.sticky.curl-left:after{left:0;transform:scaleX(-1);border-radius:0 0 17px 0;box-shadow:1px 3px 3px -2px #0003}.object.sticky>.obj-text{position:relative;z-index:1}.participant-cursor{color:var(--cursor-color);transform-origin:0 0;display:block;filter:drop-shadow(0 2px 3px #0002)}.participant-cursor>svg{width:28px;height:32px;display:block;overflow:visible}.participant-cursor>svg path{fill:var(--cursor-color);stroke:white;stroke-width:1.8;stroke-linejoin:round}.participant-cursor>small{position:absolute;left:21px;top:24px;white-space:nowrap;background:var(--cursor-color);color:white;border:1px solid #fff8;border-radius:5px 10px 10px 10px;padding:5px 9px;font-size:11px;font-weight:550;letter-spacing:.1px}#dock-pin[aria-pressed=true]{background:color-mix(in srgb,var(--theme-accent) 17%,transparent)}#dock-pin>span{font-size:23px;transform:rotate(-30deg)}.canvas-dock.is-pinned .dock-reveal{opacity:.35;cursor:default}
.workspace-bar.is-collapsed>button:not(#workspace-collapse){display:none}.workspace-bar #workspace-collapse{font-size:20px;min-width:32px;justify-content:center}.object .edge-anchor{position:absolute;width:12px;height:12px;border-radius:50%;padding:0;transform:translate(-50%,-50%);border:2px solid var(--theme-surface);background:var(--theme-selection);z-index:32;pointer-events:auto}.object .edge-anchor:hover,.object .edge-anchor:focus-visible{outline:2px solid var(--theme-selection);outline-offset:2px;scale:1.25}.note-media{display:grid;gap:6px;padding:0 12px 12px;max-height:calc(100% - 55px);overflow:auto;scrollbar-width:thin}.note-media img{width:100%;height:auto;max-height:160px;object-fit:contain;display:block;-webkit-user-drag:none}.sticky:has(.note-media)>.obj-text{height:auto;min-height:38px;padding-bottom:8px}.sticky:has(.note-media)>.obj-text[contenteditable=true]{min-height:38px!important;max-height:60%;overflow:auto}
.object.voice .obj-text{padding:13px}.voice audio{display:block;width:100%;height:36px;margin:8px 0}.voice-caption{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.object.voice .text-button{font-size:10px}#voice-preview{width:100%}#voice-status{font-size:12px}
#personal-todo{position:absolute;width:340px;max-height:550px;z-index:31;border:1px solid #8e998c55;border-radius:17px;padding:18px;box-shadow:0 12px 32px #1a272128;pointer-events:auto;font-size:12px}#personal-todo[hidden]{display:none}#personal-todo[data-pattern=dots]{background-image:radial-gradient(#5b715633 1px,transparent 1px);background-size:16px 16px}#personal-todo[data-pattern=ruled]{background-image:repeating-linear-gradient(transparent,transparent 27px,#66856620 28px)}#personal-todo header{display:flex;align-items:center;justify-content:space-between;cursor:grab;touch-action:none;margin-bottom:16px}#personal-todo header>div{display:grid;gap:6px}#personal-todo header small{font-size:8px;letter-spacing:1.5px;color:inherit;opacity:.6}#personal-todo header strong{font-size:23px;letter-spacing:-.6px;font-weight:550}#personal-todo select{width:100%;font-size:11px;background:transparent;color:inherit;border-color:#71837466;padding:8px}.todo-items{max-height:360px;overflow:auto;margin-top:12px;scrollbar-width:thin}.todo-row{display:flex;align-items:start;gap:11px;padding:13px 0;border-bottom:1px solid #7a8e7726}.todo-row>input{margin-top:3px;width:17px;height:17px;flex:0 0 auto;accent-color:#36785d}.todo-row>button{display:grid;gap:7px;text-align:left;line-height:1.45;padding:0;font-size:12px;overflow-wrap:anywhere}.todo-row small{font-size:10px;color:inherit;opacity:.65}.todo-row.is-done>button>span{text-decoration:line-through;opacity:.5}#personal-todo footer{font-size:8px;opacity:.55;margin-top:14px}.task-view-tabs{justify-content:start!important}.task-view-tabs [aria-pressed=true]{border-color:var(--theme-selection);background:color-mix(in srgb,var(--theme-accent) 12%,transparent)}.task-list-view{max-height:45vh;overflow:auto;margin:15px 0}.task-kanban{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px;overflow:auto;max-height:50vh;margin:18px 0;padding-bottom:12px}.task-kanban>section{padding:12px;background:color-mix(in srgb,var(--theme-text) 4%,transparent);border:1px solid var(--line);border-radius:13px;min-height:200px}.task-kanban>section>header{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin-bottom:15px}.kanban-card{background:var(--theme-surface);border:1px solid var(--line);border-radius:9px;padding:12px;display:grid;gap:10px;margin-bottom:10px;box-shadow:0 3px 8px #00000008}.kanban-card>button{text-align:left;padding:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.kanban-card>small{font-size:9px;color:inherit;opacity:.65}.kanban-card label{font-size:9px}.kanban-card select{font-size:10px;padding:6px}.task-personal-style{border-top:1px solid var(--line);margin-top:18px;padding-top:16px}.task-personal-style summary{cursor:pointer;font-size:12px;margin-bottom:15px}
.account-sections{display:grid;gap:25px}.account-sections section{border:1px solid var(--line);border-radius:13px;padding:20px}.account-sections h3{font-size:16px}#private-recovery-codes{padding:15px;border:1px dashed var(--line);border-radius:8px;user-select:all;font-size:13px}#forgot-password{margin-bottom:16px}
.invitation-qr{display:grid;justify-items:center;gap:9px;margin:20px auto;padding:18px;border:1px solid var(--line);border-radius:14px;width:max-content;max-width:100%;background:var(--theme-surface)}.invitation-qr img{border-radius:8px;background:white}.invitation-qr figcaption{font-size:10px;color:var(--theme-text);opacity:.7}#joined-tour-banner{position:absolute;left:18px;right:18px;top:110px;z-index:42;display:flex;gap:16px;align-items:center;padding:18px;border:1px solid var(--theme-selection);border-radius:15px;background:var(--theme-surface);color:var(--theme-text);box-shadow:0 6px 22px #0002}#joined-tour-banner>div{margin-right:auto}#joined-tour-banner strong{font-size:15px}#joined-tour-banner p{font-size:11px;margin:7px 0 0;opacity:.7}@media(max-width:700px){#joined-tour-banner{flex-wrap:wrap}#joined-tour-banner>div{width:100%}}
.gallery-entry{position:relative}.gallery-entry .gallery-card{width:100%;height:100%}.gallery-rename{position:absolute;right:14px;bottom:14px;font-size:10px;text-decoration:underline;color:var(--theme-text);padding:4px;border-radius:5px}.gallery-entry .gallery-card-copy{padding-bottom:36px}
.object.file{border:1px solid #c8d2df;border-radius:14px;box-shadow:0 6px 16px #152b4b12}.file .obj-text{display:grid;grid-template-columns:52px 1fr;gap:8px 12px;align-items:center;padding:14px;font-size:14px;overflow:hidden}.file .obj-text strong{overflow-wrap:anywhere}.file .obj-text small{grid-column:2;color:#506078}.file-type-icon{grid-row:1/4;width:50px;height:65px;background:var(--file-color);color:white;display:grid;place-items:center;border-radius:6px 14px 6px 6px;font:bold 11px system-ui;box-shadow:inset -5px 0 #ffffff15}.file-document-preview{width:100%;height:65vh;border:1px solid #aab8cb;border-radius:10px;margin-top:14px;background:white}.file-text-preview{white-space:pre-wrap;max-height:65vh;overflow:auto;padding:18px;background:#f5f7fa;color:#182738;border-radius:10px}
.file-page-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px;font-size:13px}.file-page-image{display:block;width:100%;height:auto;min-height:260px;background:white;border:1px solid #cbd3df;border-radius:8px}
/* Keep account switching and recovery as distinct, comfortably spaced actions. */
#auth-toggle,#forgot-password{display:block;width:fit-content;max-width:100%;min-height:40px;padding:8px 0;text-align:left;white-space:normal}
#auth-toggle{margin-top:8px}
#forgot-password{margin:10px 0 0}
/* The Art flyout keeps drawing actions together without widening the dock. */
.art-menu{position:absolute;bottom:112px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:332px;max-width:calc(100vw - 24px);padding:10px;border:1px solid color-mix(in srgb,var(--theme-text) 18%,transparent);border-radius:21px;background:var(--theme-surface);box-shadow:0 12px 32px #172c2926;z-index:2}
.art-menu[hidden]{display:none}.art-menu .tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;width:100%;height:72px;min-width:0;padding:8px 4px;border-radius:13px;color:var(--theme-text);background:transparent;touch-action:manipulation}.art-menu .tool>svg{height:30px;width:28px}.art-menu .tool small{font-size:11px;line-height:14px}.art-menu .tool:hover,.art-menu .tool.active{background:color-mix(in srgb,var(--theme-accent) 15%,transparent)}.art-menu .tool:focus-visible{outline:2px solid var(--theme-selection);outline-offset:-2px}#art-tools[aria-expanded=true]{background:color-mix(in srgb,var(--theme-accent) 15%,transparent)}
.object-controls [data-object-delete]>svg{display:block;width:32px;height:32px}.object-controls [data-object-delete]:not(:disabled){color:#b33c40}.object-controls [data-object-delete]:hover:not(:disabled){background:#b33c4014}.delete-object-preview{max-height:230px;overflow:auto;padding-left:22px;line-height:1.6;font-size:13px}.delete-object-preview li{margin:5px 0;overflow-wrap:anywhere}

/* Shared board identity: the server assigns the same color to pointer and avatar. */
.avatar.participant-avatar{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border:3px solid var(--participant-color,#64748b);background:var(--theme-surface,#fffef9);color:var(--theme-text,#25342e);overflow:hidden;font-size:11px;font-weight:700;line-height:1;vertical-align:middle}
.participant-avatar img{width:100%;height:100%;object-fit:cover;display:block}
#account{padding:0;background:transparent;border:0;width:36px;height:36px}
#account .participant-avatar{width:36px;height:36px;margin:0}
#account-photo-preview .participant-avatar{width:72px;height:72px;font-size:22px;margin:8px 0}
.participant-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.participant-cursor>small{color:#fff}

.persona-card{display:flex;flex-direction:column;text-align:left;padding:18px;min-width:0}
.persona-card-heading{display:flex;gap:12px;align-items:center}.persona-card-heading h3{margin:7px 0 0}.persona-card-heading .agent-portrait{flex-shrink:0}
.persona-card-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:auto;padding-top:12px}.persona-card-actions .primary{font-size:12px;padding:10px 14px}
.persona-editor-heading{display:flex;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:2;padding:10px 0;background:var(--theme-surface,#fffef9)}

.connection-picker{padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--theme-surface)}.connection-custom{display:grid;gap:12px;margin-top:14px}.connection-custom[hidden]{display:none}.connection-picker select,.connection-picker input{width:100%}.connection-picker .helper{line-height:1.6}

#ai-participant-cursors{position:absolute;inset:0;pointer-events:none;z-index:10001}.ai-participant-cursor{pointer-events:none}.ai-participant-cursor[hidden]{display:none}.ai-cursor-badge{font-style:normal;font-size:9px;line-height:1;font-weight:700;letter-spacing:.06em;background:#111c17;color:#fff;border-radius:3px;padding:2px 3px;margin-right:5px;vertical-align:1px}.agent-chip>.agent-portrait{border-color:var(--agent-presence-color,var(--line))}

.object-reaction-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.object-reaction-picker button{display:grid;gap:8px;justify-items:center;padding:15px 8px;border:1px solid var(--line);border-radius:14px;background:var(--theme-surface);color:var(--theme-text)}.object-reaction-picker button>span{font-size:30px}.object-reaction-picker button[aria-pressed=true],.object-reaction-badge[aria-pressed=true]{outline:2px solid var(--theme-accent)}.reaction-badges{display:flex;gap:5px;flex-wrap:wrap}.object-reaction-badge{font-size:14px;border:1px solid var(--line);border-radius:20px;padding:4px 8px;background:var(--theme-surface);color:var(--theme-text);pointer-events:auto}@media(max-width:550px){.object-reaction-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}
.settings-tabbook{width:100%;min-width:0}.settings-tablist{display:flex;gap:5px;flex-wrap:wrap;padding:8px 0 12px;margin-bottom:18px;border-bottom:1px solid var(--line)}.settings-tablist button{border:1px solid transparent;border-radius:9px;padding:10px 13px;background:transparent;color:var(--theme-text);font-size:12px;white-space:nowrap}.settings-tablist button[aria-selected=true]{background:var(--theme-accent);color:var(--theme-surface);box-shadow:0 2px 8px #0001}.settings-tablist button:focus-visible{outline:2px solid var(--theme-accent);outline-offset:2px}.settings-tab-panel{display:grid;gap:16px;align-content:start;min-height:190px}.settings-tab-panel[hidden]{display:none!important}.settings-tab-panel>label{display:grid;gap:7px}.settings-tab-panel>label.checkbox-label{display:flex}.account-sections>.settings-tabbook{grid-column:1/-1}.settings-tab-panel .section{margin-top:0}#persona-builder .settings-tab-panel{grid-template-columns:repeat(2,minmax(0,1fr))}#persona-builder .settings-tab-panel>*{min-width:0}#persona-builder .settings-tab-panel>section,#persona-builder .settings-tab-panel>.actions{grid-column:1/-1}@media(max-width:650px){#persona-builder .settings-tab-panel{grid-template-columns:1fr}.settings-tablist button{padding:9px;font-size:11px}}
.connector-reaction-badges{position:absolute;bottom:auto;right:auto;z-index:40;transform:translate(-50%,6px)}

/* Shared human/AI participant roster. Details escape the scroll strip for small screens. */
#avatars.avatars{display:block;width:var(--roster-width,110px);max-width:min(30vw,420px);min-width:110px;flex:0 0 auto;padding:0 2px}
.roster-strip{display:flex;align-items:center;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding:6px 3px;isolation:isolate}
.roster-person{position:relative;flex:0 0 38px;width:38px;height:38px;padding:2px;border-radius:50%;border:2px solid var(--roster-color);background:var(--theme-surface,#fff);margin-left:-10px;transition:transform .14s,box-shadow .14s;box-shadow:0 2px 6px #0002}
.roster-person:first-child{margin-left:0}.roster-person:hover,.roster-person:focus-visible{z-index:3;transform:translateY(-2px);box-shadow:0 3px 10px #0003;outline:2px solid var(--theme-accent,#20594a);outline-offset:2px}
#avatars .roster-person .participant-avatar,#avatars .roster-person .agent-portrait,#avatars .roster-person>.avatar{width:30px;height:30px;min-width:30px;flex-basis:30px;margin:0;border:0;box-shadow:none;border-radius:50%;font-size:10px}
.roster-person.is-offline>.participant-avatar{opacity:.6}.roster-kind-dot{position:absolute;bottom:-3px;right:-2px;display:grid;place-items:center;width:13px;height:13px;background:var(--roster-color);border:2px solid var(--theme-surface,#fff);border-radius:50%;font-size:8px;color:white;line-height:1}
#participant-roster-card{position:fixed;z-index:19000;width:260px;max-width:calc(100vw - 16px);padding:17px;border:1px solid var(--line);border-radius:15px;background:var(--theme-surface,#fffef9);color:var(--theme-text,#25342e);box-shadow:0 10px 35px #0003;white-space:normal}
#participant-roster-card[hidden]{display:none}.roster-name{display:block;padding-right:20px;overflow-wrap:anywhere}.roster-kind{display:block;font-size:12px;opacity:.75;margin-top:5px}.roster-status{font-size:12px;line-height:1.5;margin:12px 0}.roster-close{position:absolute;right:8px;top:5px;padding:4px 8px;font-size:22px}.roster-go{width:100%}
@media(max-width:700px){#avatars.avatars{max-width:24vw}.roster-person{flex-basis:34px;width:34px;height:34px}#avatars .roster-person .participant-avatar,#avatars .roster-person .agent-portrait,#avatars .roster-person>.avatar{width:26px;height:26px;min-width:26px}}
@media(prefers-reduced-motion:reduce){.roster-person{transition:none}}

.roster-follow{width:100%;margin-top:8px}
#participant-follow{position:absolute;left:50%;top:68px;transform:translateX(-50%);z-index:10502;display:flex;align-items:center;gap:12px;max-width:calc(100% - 32px);padding:7px 8px 7px 15px;border:1px solid var(--line);border-radius:24px;background:var(--theme-surface,#fffef9);color:var(--theme-text,#25342e);box-shadow:0 3px 15px #0002;font-size:12px}#participant-follow[hidden]{display:none}#participant-follow span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#participant-follow button{flex-shrink:0;border-radius:18px;padding:6px 10px}

/* Layer and connector label controls. */
.connector-label{cursor:grab;touch-action:none;border-radius:7px;box-shadow:0 1px 4px #0001;min-height:24px}
.connector-label>.obj-text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;max-height:56px;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere}
.connector-label>.obj-text[contenteditable=true]{display:block;max-height:none;min-height:28px;cursor:text;overflow:visible;outline:2px solid var(--theme-accent,#20594a);background:var(--theme-surface,#fff)}
.connector-label.is-label-hidden{background:transparent;box-shadow:none;min-height:0;outline:0}.connector-label.is-label-hidden>.obj-text:not([contenteditable=true]){display:none}
#connections .connection-layer{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}#connections .connection-definitions{position:absolute;width:0;height:0;overflow:visible;pointer-events:none}#participant-cursors{z-index:1000000}#ai-participant-cursors{z-index:1000001}.layer-row{display:flex;gap:6px;margin:5px 0}.layer-row>[data-layer]{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recovery-question-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:16px;padding-bottom:8px}.recovery-question-tabs>[role=tab]{border-radius:8px;padding:9px 12px;border:1px solid var(--line);font-size:12px}.recovery-question-tabs>[aria-selected=true]{background:var(--theme-accent,#20594a);color:var(--theme-accent-text,#fff)}.recovery-question-panels>[role=tabpanel]{display:grid;gap:14px}.recovery-question-panels>[role=tabpanel][hidden]{display:none}.recovery-question-panels{margin-bottom:14px}

.stack-actions,.canvas-layer-list{display:flex;flex-wrap:wrap;gap:10px}.canvas-layer-list{flex-direction:column}.canvas-layer-list>button{text-align:left}

/* Connector labels have a predictable collision box and direct manipulation handles. */
.object.connector-label{box-sizing:border-box;min-height:24px;cursor:grab}
.object.connector-label>.obj-text{display:block;box-sizing:border-box;width:100%;height:100%;max-height:none;padding:4px 22px 4px 26px;font-size:12px;line-height:16px;overflow:hidden;-webkit-line-clamp:unset}
.connector-label>.label-drag-handle{position:absolute;left:0;top:0;width:22px;height:100%;padding:0;color:var(--theme-text,#30443b);opacity:.45;cursor:grab;touch-action:none;font-size:16px}
.connector-label>.label-resize-handle{position:absolute;right:0;bottom:0;width:18px;height:18px;padding:0;cursor:nwse-resize;touch-action:none;background:linear-gradient(135deg,transparent 48%,var(--theme-accent,#20594a) 49%,var(--theme-accent,#20594a) 57%,transparent 58%);opacity:.65}
.connector-label.label-manipulating{cursor:grabbing}.connector-label.label-manipulating>.object-controls{opacity:0;pointer-events:none}
.connector-label>.object-controls{opacity:0;pointer-events:none}.connector-label:hover>.object-controls,.connector-label:focus-within>.object-controls,.connector-label.selected>.object-controls{opacity:1;pointer-events:auto}
.connector-label.is-label-hidden{height:0!important;min-height:0}.connector-label.is-label-hidden>.label-drag-handle,.connector-label.is-label-hidden>.label-resize-handle{display:none}

/* Stable video players sit inside native, movable and resizable canvas cards. */
#canvas-videos{position:absolute;inset:0;pointer-events:none}.canvas-video-player{position:absolute;pointer-events:auto;display:flex;flex-direction:column;background:#101923;color:#edf3f8;border-radius:0 0 10px 10px;overflow:hidden;box-sizing:border-box}.canvas-video-player[hidden]{display:none}.video-stage{position:relative;flex:1;min-height:0;overflow:hidden;background:linear-gradient(135deg,#273d51,#111b25)}.video-stage iframe,.video-stage video{display:block;width:100%;height:100%;border:0;object-fit:contain;background:#070b11}.video-poster{position:absolute;inset:0;width:100%;height:100%;display:grid;place-items:center;color:white;padding:0;overflow:hidden}.video-poster img{position:absolute;width:100%;height:100%;object-fit:cover;opacity:.8}.video-play-label{position:relative;padding:12px 20px;border-radius:32px;background:#101923d9;color:white;font-size:17px;box-shadow:0 5px 20px #0005}.video-footer{display:flex;align-items:center;justify-content:space-between;min-height:27px;padding:3px 9px;font-size:11px;background:#172635;color:#e7edf5}.video-footer a{color:inherit}.video-footer button{font-size:11px;color:inherit;padding:2px 8px}.video-message{padding:16px;font-size:13px;color:#e7edf5}.object.video-card{border-radius:10px;background:#172635!important;border:1px solid #627387;box-shadow:0 5px 14px #10203020}.object.video-card>.obj-text{height:32px;padding:7px 12px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px;color:#edf3f8;cursor:grab}.object.video-card>.resize-handle{z-index:5}.object.video-card>.object-controls{z-index:6}

/* Compact pin stays at the dock's upper-right corner, outside the scrolling tools. */
.dock-surface>.dock-pin{position:absolute;right:10px;top:-28px;z-index:50;width:28px;height:28px;display:grid;place-items:center;padding:5px;border:1px solid color-mix(in srgb,var(--theme-text) 20%,transparent);border-radius:50%;background:var(--theme-surface);color:var(--theme-text);box-shadow:0 2px 7px #162b2426;touch-action:manipulation}
.dock-surface>.dock-pin svg{display:block;width:16px;height:16px}.dock-surface>.dock-pin small{display:none}.dock-surface>.dock-pin:hover{background:color-mix(in srgb,var(--theme-accent) 12%,var(--theme-surface))}.dock-surface>#dock-pin[aria-pressed=true]{background:var(--theme-accent);color:var(--theme-accent-text,#fff);border-color:var(--theme-accent)}.dock-surface>.dock-pin:focus-visible{outline:2px solid var(--theme-selection);outline-offset:3px}

.media-menu{grid-template-columns:repeat(3,minmax(0,1fr));width:264px}#media-tools[aria-expanded=true]{background:color-mix(in srgb,var(--theme-accent) 15%,transparent)}

.object-controls [data-object-ai]:disabled{opacity:.32;filter:grayscale(1);cursor:default}.request-agent-options{border:1px solid var(--theme-border,#dce2dc);border-radius:14px;padding:16px;display:grid;gap:10px}.request-agent-options legend{padding:0 6px;font-weight:600}

/* Compact category tabs keep large persona catalogs navigable. */
.persona-browser{display:grid;grid-template-columns:155px minmax(0,1fr);gap:18px;align-items:start}.persona-browser-results{min-width:0}.persona-group-tabs{display:flex;flex-direction:column;gap:5px;min-width:0;overflow:auto;scrollbar-width:thin;padding:3px}.persona-group-tabs [role=tab]{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;text-align:left;padding:10px 9px;min-height:38px;border:1px solid transparent;border-radius:10px;color:var(--theme-text);background:transparent;font-size:11px;line-height:1.3}.persona-group-tabs [role=tab] span{overflow-wrap:anywhere}.persona-group-tabs [role=tab] small{font-size:9px;opacity:.65}.persona-group-tabs [role=tab]:hover{background:color-mix(in srgb,var(--theme-accent) 8%,transparent)}.persona-group-tabs [role=tab][aria-selected=true]{background:color-mix(in srgb,var(--theme-accent) 14%,var(--theme-surface));border-color:color-mix(in srgb,var(--theme-accent) 25%,transparent);font-weight:650}.persona-group-tabs [role=tab]:focus-visible{outline:2px solid var(--theme-selection);outline-offset:-2px}#persona-group-tabs{position:sticky;top:0;max-height:65vh}.persona-browser .persona-cards{margin-top:0;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}#agent-palette{width:475px}.agent-palette-browser{display:grid;grid-template-columns:125px minmax(0,1fr);gap:10px;flex:1;min-height:0;overflow:hidden}.agent-palette-list{display:flex;flex-direction:column;min-height:0;min-width:0}.agent-palette-list #agent-palette-results{margin-top:4px}.agent-palette-browser .persona-group-tabs{border-right:1px solid var(--line);padding-right:8px}.agent-palette-browser .persona-group-tabs [role=tab]{font-size:10px;padding:9px 6px}.agent-palette-list .agent-portrait{flex-basis:38px;width:38px;height:38px}#agent-palette-results .agent-persona-tile{gap:8px}.agent-palette-list #agent-palette-results .agent-tile-add{font-size:18px}.persona-browser #persona-result-count{margin:4px 0 12px}@media(max-width:600px){#agent-palette{width:calc(100% - 24px);padding:12px}.agent-palette-browser{grid-template-columns:104px minmax(0,1fr);gap:8px}.persona-browser{grid-template-columns:112px minmax(0,1fr);gap:10px}.persona-browser .persona-cards{grid-template-columns:minmax(0,1fr)}.persona-group-tabs [role=tab]{font-size:10px;padding:9px 6px}#persona-dialog{padding:16px}.agent-palette-list .agent-portrait{flex-basis:30px;width:30px;height:30px}}

.connector-menu{width:280px;grid-template-columns:repeat(3,minmax(0,1fr))}.connector-menu [aria-checked=true]{background:color-mix(in srgb,var(--theme-accent) 15%,transparent)}#connect[aria-expanded=true]{background:color-mix(in srgb,var(--theme-accent) 15%,transparent)}#connector-preview{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none;z-index:100010}#connector-preview[hidden]{display:none}

#board-timeline{position:absolute;left:7px;top:150px;bottom:155px;width:34px;z-index:26;display:flex;align-items:center;flex-direction:column;gap:10px;pointer-events:auto}#timeline-toggle{flex-shrink:0;display:grid;place-items:center;width:28px;height:28px;padding:6px;border-radius:50%;color:var(--theme-text);background:color-mix(in srgb,var(--theme-surface) 85%,transparent);border:1px solid color-mix(in srgb,var(--theme-text) 12%,transparent);box-shadow:0 2px 8px #10282009}#timeline-toggle svg{width:16px;height:16px}#timeline-markers{display:flex;flex-direction:column;align-items:center;gap:0;width:34px;min-height:0;overflow:auto;scrollbar-width:none;padding:3px 0}#timeline-markers[hidden]{display:none}#timeline-markers::-webkit-scrollbar{display:none}.timeline-tick{display:flex;align-items:center;justify-content:flex-start;flex:0 0 10px;min-height:10px;width:30px;padding:3px 2px;border:0;background:transparent;border-radius:4px}.timeline-tick span{display:block;width:var(--timeline-width,7px);height:2px;border-radius:2px;background:var(--theme-text);opacity:.22;transition:width .12s,opacity .12s}.timeline-tick:focus-visible{outline:2px solid var(--theme-selection);outline-offset:1px}.timeline-tooltip{position:fixed;width:min(310px,calc(100vw - 60px));z-index:70;border:1px solid var(--line);border-radius:17px;padding:16px 18px;background:var(--theme-surface);color:var(--theme-text);box-shadow:0 12px 38px #14281d26;pointer-events:auto;overflow-wrap:anywhere}.timeline-tooltip[hidden]{display:none}.timeline-tooltip strong{display:block;font-size:13px;line-height:1.4}.timeline-tooltip p{font-size:12px;line-height:1.6;margin:8px 0}.timeline-tooltip small{display:block;font-size:10px;opacity:.65;line-height:1.5}.timeline-tooltip>span{display:block;margin-top:10px;font-size:9px;opacity:.55}.timeline-empty{opacity:.35}.gallery-open #board-timeline{display:none}@media(max-width:600px){#board-timeline{left:3px;top:170px;bottom:150px;width:29px}.timeline-tooltip{font-size:11px}}@media(prefers-reduced-motion:reduce){.timeline-tick span{transition:none}}

.agent-portrait{background-image:url('/agent-portraits-v2.png');background-size:1200% 1200%}.agent-portrait.portrait-initials{background-image:none;display:grid;place-items:center;font-weight:650;font-size:12px;color:var(--theme-text)}

.object-controls [data-object-ai]{width:auto;min-width:98px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:24px;font-weight:700;white-space:nowrap}.object-controls [data-object-ai]>span:first-child{font-size:32px}

.timeline-tooltip{width:min(390px,calc(100vw - 60px));max-height:70vh;overflow:auto}.history-content-pair{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}.history-content-card{min-width:0;padding:10px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--theme-surface) 95%,var(--theme-accent))}.history-content-card pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12px;max-height:180px;overflow:auto;margin:8px 0}.history-content-card img{display:block;max-width:100%;max-height:200px;object-fit:contain;margin:8px auto}.history-content-card .history-visual{height:130px}.history-event-change{margin:14px 0}.history-area-controls{border:1px solid var(--line);border-radius:14px;padding:16px;margin:18px 0}.history-area-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.history-area-fields input{min-width:0;width:100%}.history-visual.is-area-selecting{cursor:crosshair;touch-action:none;outline:2px solid var(--theme-selection)}.history-area-overlay{fill:#2563eb26;stroke:#2563eb;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}@media(max-width:600px){.history-area-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

.object-controls .video-link-action{width:auto;min-width:108px;font-size:24px;font-weight:650;white-space:nowrap}#video-source-details input[readonly]{cursor:text}#video-source-details .actions{flex-wrap:wrap}

#timeline-markers .timeline-tick span{width:var(--timeline-width,7px);height:2px;opacity:var(--timeline-opacity,.14);background:var(--theme-text);transition:width .12s ease-out,opacity .12s ease-out}#timeline-markers .timeline-tick.is-previewing span{background:var(--theme-accent)}@media(prefers-reduced-motion:reduce){#timeline-markers .timeline-tick span{transition:none}}
.sticky.sticky-booklet{box-shadow:3px 3px 0 0 color-mix(in srgb,var(--booklet-paper) 75%,white),6px 6px 0 0 color-mix(in srgb,var(--booklet-paper) 60%,white),8px 11px 18px #1a281b26}.booklet-count{position:absolute;right:8px;bottom:7px;font-size:11px;opacity:.6;pointer-events:none}.booklet-navigation{position:absolute;left:0;right:0;margin:0 auto;width:max-content;bottom:-39px;transform:scale(var(--ib-inv-zoom,1));transform-origin:top center;display:flex;align-items:center;gap:2px;padding:3px;background:var(--theme-surface);color:var(--theme-text);border:1px solid var(--line);border-radius:9px;box-shadow:0 4px 15px #13281b20;z-index:36;white-space:nowrap}.booklet-navigation button{min-width:26px;height:26px;padding:2px 5px;font-size:14px}.booklet-navigation [data-booklet-picker]{font-size:11px}.booklet-navigation button:disabled{opacity:.3}.booklet-page-list{display:grid;gap:7px;max-height:330px;overflow:auto;margin:15px 0}.booklet-page-list button{text-align:left;white-space:normal;overflow-wrap:anywhere}.booklet-page-list [aria-current=page]{outline:2px solid var(--theme-selection)}.booklet-page-preview{max-height:220px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.booklet-turn-sheet{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:5;backface-visibility:hidden;transform-style:preserve-3d;box-shadow:2px 0 8px #20282030}.booklet-turn-sheet.turn-forward{transform-origin:left center;animation:booklet-forward .28s ease-in-out both}.booklet-turn-sheet.turn-back{transform-origin:right center;animation:booklet-back .28s ease-in-out both}@keyframes booklet-forward{0%{transform:perspective(650px) rotateY(0);opacity:1}100%{transform:perspective(650px) rotateY(-110deg);opacity:0}}@keyframes booklet-back{0%{transform:perspective(650px) rotateY(0);opacity:1}100%{transform:perspective(650px) rotateY(110deg);opacity:0}}@media(prefers-reduced-motion:reduce){.booklet-turn-sheet{animation:none!important;display:none}}
.sticky-booklet>.example-label{right:38px}
/* Detail cogwheel: functional status stays visible, metadata opens on click or a 2s hover */
.detail-wrap{position:relative;display:inline-flex;align-items:center;vertical-align:middle}
.detail-toggle{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-left:3px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted,#5a6b62);opacity:.55;cursor:pointer;transition:opacity .15s,background .15s}
.detail-toggle:hover,.detail-toggle:focus-visible,.detail-toggle[aria-expanded="true"]{opacity:1;background:rgba(0,0,0,.06);outline:none}
.detail-toggle:focus-visible{box-shadow:0 0 0 2px var(--accent,#2f6d4f)}
.detail-pop{position:absolute;z-index:10050;top:calc(100% + 6px);right:0;min-width:190px;max-width:320px;padding:8px 10px;border:1px solid rgba(0,0,0,.14);border-radius:9px;background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.14);font-size:11.5px;line-height:1.35;text-align:left;white-space:normal}
.detail-pop[hidden]{display:none}
.detail-pop dl{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;margin:0}
.detail-pop dt{color:var(--muted,#5a6b62);font-weight:600}
.detail-pop dd{margin:0;word-break:break-word}

/* Typed confirmation before deleting work someone else placed. */
.delete-gate{margin:14px 0;padding:14px 16px;border:1px solid #e2b7ae;border-radius:10px;background:#fdf5f3}
.delete-gate .helper{margin:0 0 10px}
.delete-gate label{display:block;font-weight:600;font-size:13px;color:#7a2b21}
.delete-gate input{width:100%;margin-top:6px;padding:10px 12px;font:inherit;border:1px solid #d8b7b0;border-radius:8px;background:#fff;color:#203e35}
.delete-gate input:focus{outline:2px solid #b5203a;outline-offset:1px}
.delete-gate input[aria-invalid="true"]{border-color:#b5203a}
/* Participant UX refresh: fixed-size selection actions, deliberate sheets, progressive disclosure. */
.object-controls,.object:hover>.object-controls,.object:focus-within>.object-controls,.object.selected>.object-controls{opacity:0;pointer-events:none;visibility:hidden}
#selection-toolbar{position:absolute;z-index:12;pointer-events:none;max-width:calc(100% - 16px)}
#selection-toolbar>.object-controls{position:relative;inset:auto;transform:none;visibility:visible;opacity:1;pointer-events:auto;display:flex;gap:2px;padding:4px;border-radius:12px;max-width:100%;box-shadow:0 4px 18px #172b2520}
#selection-toolbar .object-controls:after{display:none}#selection-toolbar .object-controls>button{width:40px;height:40px;min-width:40px;padding:7px;font-size:21px;border-radius:8px}#selection-toolbar button svg{width:22px;height:22px}#selection-toolbar [data-object-ai]{font-size:13px!important;display:flex;gap:3px;align-items:center}#selection-toolbar [data-object-ai]>span:first-child{font-size:20px}
.object-more{position:relative}.object-more>summary{list-style:none;cursor:pointer;padding:10px;min-width:40px;min-height:40px}.object-more>div{position:absolute;right:0;top:46px;min-width:220px;background:var(--theme-surface,#fffdf8);border:1px solid var(--line);padding:6px;border-radius:10px;box-shadow:0 8px 24px #172b2525}.object-more button{display:flex;align-items:center;gap:12px;width:100%;height:auto;min-height:40px;font-size:16px;text-align:left}.object-more button span{font-size:12px}.object-more:not([open])>div{display:none}
.object[contenteditable=true]{user-select:text}.object .obj-text[contenteditable=true]{font-size:max(16px,var(--object-font-size,16px))}
.inspector>header{position:sticky;top:-18px;background:var(--theme-surface,#fffdf8);padding:10px 0;z-index:2;flex-wrap:wrap}.inspector>header>.text-button{font-size:10px;margin:0}.inspector .settings-tablist{gap:0;overflow:auto;flex-wrap:nowrap}.inspector .settings-tablist button{font-size:11px;padding:9px 7px}.inspector .settings-tab-panel{padding:0}.inspector .settings-tab-panel>.primary{position:sticky;bottom:0;z-index:2}.inspector{right:44px;width:300px;max-height:calc(100% - 150px)}
#header-more{position:relative;margin-left:auto;flex-shrink:0}#header-more>summary{list-style:none;cursor:pointer;padding:10px 14px;border:1px solid var(--line);border-radius:10px;font-size:18px}#header-more>div{position:absolute;right:0;top:48px;z-index:40;display:grid;gap:6px;min-width:240px;max-height:75vh;overflow:auto;padding:12px;border:1px solid var(--line);background:var(--theme-surface,#fffdf8);border-radius:12px;box-shadow:0 8px 28px #172b2525}#header-more:not([open])>div{display:none}#header-more .avatar{width:100%;text-align:left}#header-more .avatar:after{content:'Account settings';font-size:13px;margin-left:12px}#header-more #account .avatar{width:34px}#header-more button{text-align:left;min-height:40px;white-space:normal}#header-more #account{display:flex;align-items:center;height:42px;background:none}
.topbar{overflow:visible!important;gap:12px}.topbar>.top-spacer{min-width:0}.topbar>.board-tools{flex-shrink:0}.topbar .board-identity{min-width:0;flex:0 1 auto}.board-identity #board-access{font-size:10px;color:var(--theme-text,#3d5d4e)}.topbar .avatars{flex-shrink:0;max-width:180px}#close-library{display:none}.outline-results{display:grid;gap:8px;max-height:60vh;overflow:auto}.outline-results button{display:flex;justify-content:space-between;gap:18px;text-align:left}.outline-results small{flex-shrink:0}
.extra-tools{position:relative}.extra-tools>summary{list-style:none;cursor:pointer;display:grid;place-items:center;font-size:23px;width:48px;height:48px}.extra-tools>summary small{font-size:9px}.extra-tools-menu{position:absolute;display:grid;grid-template-columns:repeat(4,52px);gap:6px;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--theme-surface,#fffdf8);box-shadow:0 8px 28px #172b2525;z-index:60}.extra-tools-menu[hidden]{display:none!important}.canvas-dock .extra-tools .tool{width:52px;min-width:52px;height:54px}.canvas-dock .canvas-toolbar{max-width:100%;flex-wrap:nowrap;gap:3px}.canvas-dock .canvas-toolbar>.tool{width:48px;min-width:44px;height:52px}.canvas-dock .canvas-toolbar>.divider{display:none}.canvas-dock .canvas-toolbar .tool svg{width:26px;height:26px}.canvas-dock .canvas-toolbar .tool small{font-size:9px}.canvas-dock .dock-surface{overflow:visible}.view-only .canvas-toolbar .tool:not(#tool-select):not(#tool-pan),.view-only #extra-tools,.view-only .extra-tools-menu,.view-only #agent-edge{display:none}.view-only .canvas-top{display:flex}
button:focus-visible,summary:focus-visible,.object:focus-visible{outline:3px solid #346bdf;outline-offset:3px}.ux-sheet-open #selection-toolbar,.ux-sheet-open #agent-edge,.ux-sheet-open #agent-dock,.ux-sheet-open #canvas-dock,.ux-sheet-open #workspace-controls{display:none!important}
@media(max-width:700px){.topbar{height:64px;padding:0 8px;gap:7px}.topbar>.brand,.topbar>.divider,.topbar>#new-board,.topbar>.board-tools,.topbar>.live-tag,.topbar>#demo-button{display:none}
.topbar>#pricing-link{display:none}   /* a phone reaches Pricing from the ••• menu instead */.topbar .board-identity{flex:0 1 auto}.board-identity select{max-width:135px;font-size:12px}[dir=rtl] .board-identity select{background-position:left 0 center;padding:0 0 0 18px}.topbar .avatars{display:flex!important;max-width:74px;overflow:hidden}.topbar>#board-gallery-button{padding:8px;font-size:11px}.topbar #header-more{margin:0}.library{position:absolute;left:0;top:64px;bottom:0;width:100%!important;min-width:0!important;z-index:25}.library-heading{padding:16px!important}.library-heading h1{font-size:22px!important}.library-heading p{display:block}.library .mini-preview{height:140px}.library .card-copy p{font-size:12px}.library .card-title{font-size:14px}#close-library{display:block;float:right;width:40px;height:40px;border-radius:8px;font-size:24px}.inspector{position:absolute;inset:8px 8px 88px;width:auto!important;max-height:none;z-index:24}.inspector~#agent-edge{display:none}.canvas-dock{max-width:calc(100% - 12px)}.canvas-dock .canvas-toolbar>.tool{min-width:38px;width:38px;height:48px;padding:4px}.canvas-dock .canvas-toolbar>.tool small{font-size:8px}.canvas-dock .canvas-toolbar>.tool svg{width:23px;height:23px}.extra-tools>summary{width:34px;height:46px}.zoom-controls{bottom:88px!important}.board-tools-menu{position:fixed!important;left:8px!important;right:8px!important;top:65px!important;max-height:75vh;overflow:auto}.workspace .board-main{width:100%}.gallery-filter-row{flex-wrap:wrap}#selection-toolbar .object-controls>button{width:44px;height:44px;min-width:44px}.object-more>summary{min-width:44px;min-height:44px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
#header-more .board-tools-menu{position:static!important;box-shadow:none;width:100%;min-width:0;border:0;background:transparent;padding:4px}#header-more .board-tools-menu>div{position:static!important;box-shadow:none;width:100%;min-width:0}#header-more .board-tools-menu button{width:100%}.gallery-entry{position:relative}.gallery-favorite{position:absolute;top:12px;right:12px;background:var(--theme-surface,#fffdf8);border-radius:50%;width:36px;height:36px;font-size:24px;box-shadow:0 1px 6px #0002}.ux-sheet-open .workspace-bar{display:none!important}
.request-scope-preview{padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--theme-surface,#f8faf6)}.request-scope-preview p{margin:8px 0 0;max-height:110px;overflow:auto}.request-agent-options small{display:block;margin-top:4px}.ai-request-progress{position:absolute;bottom:100px;left:20px;z-index:20;max-width:340px;padding:16px;background:var(--theme-surface,#fffdf8);border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 20px #0002}.ai-request-progress p{font-size:12px}
.template-goals{padding:0 18px 12px}.template-goals .helper{margin:8px 0 0}.template-goals select{width:100%}#header-more .board-tools-menu>summary{display:block;cursor:pointer;padding:10px;border:1px solid var(--line);border-radius:8px}
#header-more .avatar:after{content:none}#header-more #account:after{content:'Account settings';font-size:13px;margin-left:12px}#header-more .board-tools-menu summary{white-space:normal}#header-more .board-tools-menu{display:block}
.reading-popout{font-size:18px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:65vh;overflow:auto}.view-only .object-controls [data-object-edit]{opacity:.4}
.board-reference{display:inline;padding:.03em .22em;border-radius:.4em;background:#dceee7;color:#154f40;font:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}.board-reference.activity{background:#e9e3f3;color:#59447a;cursor:pointer}.tag-preview{display:flex;gap:5px;flex-wrap:wrap;flex-basis:100%;font-size:12px}.chat-composer{flex-wrap:wrap}.chat-composer textarea{flex-basis:calc(100% - 110px)}.tag-preview[hidden]{display:none}.mention-item{padding:16px 0;border-bottom:1px solid var(--line)}.mention-item.unread{border-left:3px solid var(--green);padding-left:12px}.mention-item p{white-space:pre-wrap;overflow-wrap:anywhere}.mention-item time{font-size:12px;color:var(--muted)}.mention-focus{outline:3px solid var(--green);outline-offset:3px}#mention-notifications{white-space:nowrap;font-size:12px;padding:8px}@media(max-width:600px){#mention-notifications{font-size:0;padding:7px}#mention-notifications::before{content:'@';font-size:18px}}
#header-more>div{width:280px;max-width:calc(100vw - 20px);box-sizing:border-box;min-width:0}#header-more .board-tools{width:100%;min-width:0}#header-more .board-tools-menu{box-sizing:border-box;max-width:100%}#header-more .board-tools-menu button{display:block;max-width:100%;min-width:0}#header-more #account{width:100%;min-width:0}#header-more #account .avatar{width:34px;min-width:34px;flex:0 0 34px}
/* Canvas z-order is local: even the frontmost video must remain below dialogs and chat. */
#canvas{isolation:isolate}

/* Interface language: CJK typography and the language selector */
html[lang="zh-Hant"],html[lang="zh-Hans"]{font-family:"Noto Sans CJK TC","Noto Sans CJK SC","PingFang TC","PingFang SC","Hiragino Sans GB","Microsoft JhengHei","Microsoft YaHei",Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
html[lang="zh-Hant"] .eyebrow,html[lang="zh-Hans"] .eyebrow{letter-spacing:.8px}
.language-select{border:1px solid var(--line);border-radius:7px;background:#fff;font-size:11px;padding:6px 8px;color:#4f6156;max-width:118px}
.auth-language{display:flex;justify-content:flex-end;margin-bottom:16px}
.auth-language .language-select{font-size:12px;padding:8px 10px}
@media(max-width:800px){.language-select{max-width:92px;font-size:10px;padding:5px 4px}}

/* Interface modes: Standard (default) and Pro */
.mode-select{border:1px solid var(--line);border-radius:7px;background:#fff;font-size:11px;padding:6px 8px;color:#4f6156;max-width:108px}
html[data-mode="standard"] [data-pro-detail]{display:none!important}
html[data-mode="standard"] #empty>span{display:none}
@media(max-width:800px){.mode-select{max-width:86px;font-size:10px;padding:5px 4px}}

#header-more #menu-sign-out{margin-top:4px;color:#a43d36}
@media(max-width:430px){.canvas-dock .canvas-toolbar{gap:2px;padding:6px}.canvas-dock .canvas-toolbar>.tool{flex:0 0 34px;width:34px;min-width:34px;height:44px;padding:2px}.canvas-dock .canvas-toolbar>.tool small{font-size:7px}.canvas-dock .canvas-toolbar .tool svg{width:20px;height:20px}.canvas-dock .extra-tools>summary{flex:0 0 34px;width:34px;min-width:34px;height:44px}.canvas-dock .extra-tools>summary small{font-size:7px}.extra-tools-menu{grid-template-columns:repeat(3,48px)}.extra-tools-menu .tool{width:48px;min-width:48px;height:50px}}

/* Interface mode: a graphical switch that always names the mode you would move TO, while the
   brand mark carries the mode you are IN (b. STD / b. PRO). */
.brand-mark{position:relative}
.brand-mode{position:absolute;right:-8px;bottom:-6px;font-style:normal;font-size:7.5px;line-height:1;font-weight:800;letter-spacing:.7px;padding:2px 4px;border-radius:5px;background:#fff;color:#40694f;border:1px solid #cfdcc7;box-shadow:0 1px 4px #162b2429;transition:background .18s ease,color .18s ease,border-color .18s ease}
html[data-mode="pro"] .brand-mark{background:linear-gradient(150deg,#2b4a3c,#13291f);color:#f7e8a5;box-shadow:0 4px 14px #14281d3d}
html[data-mode="pro"] .brand-mode{background:linear-gradient(180deg,#f8edc2,#edd894);color:#4a3d10;border-color:#e3cd83}
.mode-switch{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 9px 0 11px;border-radius:16px;border:1px solid #d8e0d3;background:linear-gradient(180deg,#fff,#f4f7f0);font-size:11px;font-weight:650;color:#38513f;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .2s ease,color .2s ease}
.mode-switch:hover{transform:translateY(-1px);border-color:#a3bfa5;box-shadow:0 4px 14px #20594a24}
.mode-switch:active{transform:translateY(0)}
.mode-switch:focus-visible{outline:2px solid var(--theme-selection,#20594a);outline-offset:2px}
.mode-switch-name{letter-spacing:-.2px;white-space:nowrap;font-weight:600;opacity:.9}
.mode-switch-chip{display:inline-flex;align-items:center;font-size:10px;font-weight:800;letter-spacing:.2px;padding:3px 7px;border-radius:9px;border:1px solid #e6cf82;background:linear-gradient(180deg,#fdf3cf,#f1dc97);color:#5b4910;box-shadow:inset 0 1px 0 #fff9;transition:background .18s ease,color .18s ease,border-color .18s ease}
.mode-switch::after{content:'⇄';font-size:13px;line-height:1;color:#7d9a83;margin-left:1px;transition:transform .25s ease,color .18s ease}
.mode-switch:hover::after{transform:rotate(180deg)}
html[data-mode="pro"] .mode-switch{background:linear-gradient(180deg,#22392e,#16281f);border-color:#31513f;color:#eaf2e7}
html[data-mode="pro"] .mode-switch:hover{border-color:#4e7a5f;box-shadow:0 4px 16px #12211b4d}
html[data-mode="pro"] .mode-switch::after{color:#9dbca6}
html[data-mode="pro"] .mode-switch-chip{border-color:#c2d6bf;background:linear-gradient(180deg,#eef4ea,#dde8d7);color:#31543c;box-shadow:inset 0 1px 0 #fff8}
@media(max-width:560px){.mode-switch-name{display:none}}

@media(max-width:700px){.mode-switch{height:30px;font-size:10px;padding:0 8px}.mode-switch::after{font-size:12px}}
@media(prefers-reduced-motion:reduce){.mode-switch,.mode-switch::after,.brand-mode,.mode-switch-chip{transition:none}.mode-switch:hover::after{transform:none}}

/* Interface language picker: flag chip in the bar, flag rows in the listbox. */
.lang-switch{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 9px;border-radius:16px;border:1px solid #d8e0d3;background:linear-gradient(180deg,#fff,#f4f7f0);font-size:11px;font-weight:600;color:#38513f;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.lang-switch:hover{transform:translateY(-1px);border-color:#a3bfa5;box-shadow:0 4px 14px #20594a24}
.lang-switch:active{transform:translateY(0)}
.lang-switch:focus-visible{outline:2px solid var(--theme-selection,#20594a);outline-offset:2px}
.lang-switch .lang-caret{font-size:9px;opacity:.55;margin-left:-2px}
.lang-switch .lang-name{white-space:nowrap}
.lang-flag{display:inline-block;flex:0 0 auto;width:20px;height:15px;border-radius:2px;background-size:cover;background-position:center;box-shadow:0 0 0 1px #162b241f,0 1px 2px #162b241a}
/* Interface-language flags (compact hand-drawn renditions for the 20x15 px selector chip). */
.lang-flag[data-flag="gb"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%2718%27 fill=%27%23012169%27/%3E%3Cpath d=%27M0 0 24 18M24 0 0 18%27 stroke=%27%23fff%27 stroke-width=%273.6%27/%3E%3Cpath d=%27M0 0 24 18M24 0 0 18%27 stroke=%27%23C8102E%27 stroke-width=%271.6%27/%3E%3Cpath d=%27M12 0v18M0 9h24%27 stroke=%27%23fff%27 stroke-width=%276%27/%3E%3Cpath d=%27M12 0v18M0 9h24%27 stroke=%27%23C8102E%27 stroke-width=%273.2%27/%3E%3C/svg%3E")}
.lang-flag[data-flag="hk"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%2718%27 fill=%27%23DE2910%27/%3E%3Cg fill=%27%23fff%27 transform=%27translate(12 9)%27%3E%3Cellipse cy=%27-3.5%27 rx=%271.8%27 ry=%273%27/%3E%3Cellipse cy=%27-3.5%27 rx=%271.8%27 ry=%273%27 transform=%27rotate(72)%27/%3E%3Cellipse cy=%27-3.5%27 rx=%271.8%27 ry=%273%27 transform=%27rotate(144)%27/%3E%3Cellipse cy=%27-3.5%27 rx=%271.8%27 ry=%273%27 transform=%27rotate(216)%27/%3E%3Cellipse cy=%27-3.5%27 rx=%271.8%27 ry=%273%27 transform=%27rotate(288)%27/%3E%3C/g%3E%3C/svg%3E")}
.lang-flag[data-flag="cn"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%2718%27 fill=%27%23DE2910%27/%3E%3Cg fill=%27%23FFDE00%27%3E%3Cpath d=%27M5 4l.9 2.6H8.6L6.5 8.2l.8 2.6L5 9.2 2.7 10.8l.8-2.6L1.4 6.6h2.7z%27/%3E%3Cpath d=%27M9.4 2.6l.4 1.1h1.1l-.9.7.3 1.1-1-.6-1 .6.3-1.1-.9-.7h1.2z%27/%3E%3Cpath d=%27M11 4.9l.4 1.1h1.1l-.9.7.3 1.1-1-.6-1 .6.3-1.1-.9-.7h1.2z%27/%3E%3Cpath d=%27M11 7.6l.4 1.1h1.1l-.9.7.3 1.1-1-.6-1 .6.3-1.1-.9-.7h1.2z%27/%3E%3Cpath d=%27M9.4 10l.4 1.1h1.1l-.9.7.3 1.1-1-.6-1 .6.3-1.1-.9-.7h1.2z%27/%3E%3C/g%3E%3C/svg%3E")}
.lang-flag[data-flag="es"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%2718%27 fill=%27%23AA151B%27/%3E%3Crect y=%274.5%27 width=%2724%27 height=%279%27 fill=%27%23F1BF00%27/%3E%3Crect x=%275.2%27 y=%276.6%27 width=%272.6%27 height=%274%27 rx=%27.5%27 fill=%27%23AA151B%27/%3E%3Crect x=%275.9%27 y=%277.4%27 width=%271.2%27 height=%272.4%27 rx=%27.3%27 fill=%27%23F1BF00%27/%3E%3C/svg%3E")}
.lang-flag[data-flag="fr"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%278%27 height=%2718%27 fill=%27%230055A4%27/%3E%3Crect x=%278%27 width=%278%27 height=%2718%27 fill=%27%23fff%27/%3E%3Crect x=%2716%27 width=%278%27 height=%2718%27 fill=%27%23EF4135%27/%3E%3C/svg%3E")}
.lang-flag[data-flag="jp"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%2718%27 fill=%27%23fff%27/%3E%3Ccircle cx=%2712%27 cy=%279%27 r=%274.6%27 fill=%27%23BC002D%27/%3E%3C/svg%3E")}
.lang-flag[data-flag="in"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%276%27 fill=%27%23FF9933%27/%3E%3Crect y=%276%27 width=%2724%27 height=%276%27 fill=%27%23fff%27/%3E%3Crect y=%2712%27 width=%2724%27 height=%276%27 fill=%27%23138808%27/%3E%3Ccircle cx=%2712%27 cy=%279%27 r=%272.4%27 fill=%27none%27 stroke=%27%23000080%27 stroke-width=%27.6%27/%3E%3Cpath d=%27M12 6.6v4.8M9.6 9h4.8%27 stroke=%27%23000080%27 stroke-width=%27.5%27/%3E%3C/svg%3E")}
.lang-flag[data-flag="pk"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%2718%27 fill=%27%2301411C%27/%3E%3Crect width=%275.5%27 height=%2718%27 fill=%27%23fff%27/%3E%3Ccircle cx=%2713.4%27 cy=%279%27 r=%273.8%27 fill=%27%23fff%27/%3E%3Ccircle cx=%2714.9%27 cy=%278.4%27 r=%273.4%27 fill=%27%2301411C%27/%3E%3Cpath d=%27M16.6 5.2l.4 1.1h1.2l-1 .7.4 1.1-1-.7-1 .7.4-1.1-1-.7h1.2z%27 fill=%27%23fff%27/%3E%3C/svg%3E")}
.lang-flag[data-flag="ke"]{background-image:url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2018%27%3E%3Crect%20width=%2724%27%20height=%2718%27%20fill=%27%23000%27/%3E%3Crect%20y=%275%27%20width=%2724%27%20height=%271.4%27%20fill=%27%23fff%27/%3E%3Crect%20y=%276.4%27%20width=%2724%27%20height=%275.2%27%20fill=%27%23BB0000%27/%3E%3Crect%20y=%2711.6%27%20width=%2724%27%20height=%271.4%27%20fill=%27%23fff%27/%3E%3Crect%20y=%2713%27%20width=%2724%27%20height=%275%27%20fill=%27%23006600%27/%3E%3Cg%20stroke=%27%23fff%27%20stroke-width=%271.3%27%20stroke-linecap=%27round%27%3E%3Cpath%20d=%27M3.6%203.4%2020.4%2014.6M20.4%203.4%203.6%2014.6%27/%3E%3C/g%3E%3Cellipse%20cx=%2712%27%20cy=%279%27%20rx=%273.3%27%20ry=%275.6%27%20fill=%27%23BB0000%27%20stroke=%27%23fff%27%20stroke-width=%271%27/%3E%3Cpath%20d=%27M12%203.6v10.8%27%20stroke=%27%23fff%27%20stroke-width=%27.9%27/%3E%3Cpath%20d=%27M8.9%209h6.2%27%20stroke=%27%23fff%27%20stroke-width=%27.7%27/%3E%3C/svg%3E")}
.lang-flag[data-flag="sa"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%2718%27 fill=%27%23006C35%27/%3E%3Cg fill=%27%23fff%27%3E%3Cpath d=%27M4.6 4.2h7l1.5 1.3H6z%27/%3E%3Cpath d=%27M6.2 6.2h8.2l1.3 1.2H7.6z%27/%3E%3Cpath d=%27M4.9 8.2h9.4l1.4 1.2H6.3z%27/%3E%3Cpath d=%27M3.2 11.5h13l2.3-1.6v2l-2.3 1.5H6.7l-.8 1.5H4z%27/%3E%3C/g%3E%3C/svg%3E")}
.lang-flag[data-flag="ru"]{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 18%27%3E%3Crect width=%2724%27 height=%276%27 fill=%27%23fff%27/%3E%3Crect y=%276%27 width=%2724%27 height=%276%27 fill=%27%230039A6%27/%3E%3Crect y=%2712%27 width=%2724%27 height=%276%27 fill=%27%23D52B1E%27/%3E%3C/svg%3E")}
.lang-menu{position:fixed;z-index:200;display:grid;gap:2px;min-width:206px;max-height:min(62vh,430px);overflow:auto;padding:6px;border:1px solid var(--line);border-radius:13px;background:var(--theme-surface,#fffdf8);box-shadow:0 18px 50px #14281d33,0 2px 8px #14281d1a}
.lang-menu[hidden]{display:none!important}
.lang-option{display:flex;align-items:center;gap:9px;width:100%;padding:8px 10px;border-radius:8px;font-size:12px;font-weight:600;color:#2f4739;text-align:start;background:none}
.lang-option:hover,.lang-option:focus-visible{background:color-mix(in srgb,var(--theme-accent,#20594a) 10%,transparent);outline:none}
.lang-option[aria-selected="true"]{background:color-mix(in srgb,var(--theme-accent,#20594a) 14%,transparent);font-weight:700}
.lang-option-label{flex:1;white-space:nowrap}
.lang-tick{color:var(--theme-accent,#20594a);font-weight:800;opacity:0}
.lang-option[aria-selected="true"] .lang-tick{opacity:1}
@media(max-width:560px){.lang-switch{height:30px;font-size:10px;padding:0 7px;gap:5px}.lang-switch .lang-name{display:none}}
/* Right-to-left languages: mirror the panels the flex row already moved, keep the canvas untouched. */
html[dir="rtl"] .library{border-right:0;border-left:1px solid var(--line)}
html[dir="rtl"] .inspector{right:auto;left:17px}
html[dir="rtl"] .zoom-controls{right:auto;left:20px}
html[dir="rtl"] .lang-switch .lang-caret{margin-left:0;margin-right:-2px}
html[dir="rtl"] .mode-switch::after{margin-left:0;margin-right:1px}
/* Interactive Web objects: the app frame is drawn in its own layer above the object layer, so
   polling, selection and drag previews never restart a running application. */
#canvas-webs{position:absolute;inset:0;pointer-events:none}
.canvas-web-app{position:absolute;pointer-events:auto;display:flex;flex-direction:column;background:#fff;border-radius:0 0 10px 10px;overflow:hidden;box-sizing:border-box;box-shadow:0 6px 18px #10203018}
.canvas-web-app[hidden]{display:none}
.canvas-web-app.selected{outline:2px solid var(--theme-selection,#3d8064);outline-offset:2px}
.web-app-stage{position:relative;flex:1;min-height:0;background:#fff}
.web-app-stage iframe{width:100%;height:100%;border:0;display:block;background:#fff;color-scheme:light}
.web-app-tools{position:absolute;right:4px;top:4px;display:flex;gap:3px;opacity:0;transition:opacity .12s;z-index:2}
.canvas-web-app:hover .web-app-tools,.canvas-web-app.selected .web-app-tools{opacity:1}
.web-app-tool{font:13px/1 system-ui,sans-serif;width:24px;height:24px;padding:0;border:1px solid #cdd8cf;border-radius:6px;background:#fffdf8db;color:#26463c;cursor:pointer;backdrop-filter:blur(2px)}
.web-app-tool:hover{background:#174e43;color:#fff;border-color:#174e43}
.object.web-card{border-radius:10px;background:#fffdf8!important;border:1px solid #cdd8cf;box-shadow:0 5px 14px #10203014}
.object.web-card>.obj-text{height:30px;padding:6px 12px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px;font-weight:600;color:#26463c;cursor:grab;letter-spacing:.01em}
.object.web-card>.obj-text::before{content:"◫ ";color:#5b8a76}
.object.web-card>.resize-handle{z-index:5}
.object.web-card>.object-controls{z-index:6}
.web-code-action{font:12px/1 system-ui,sans-serif;min-width:58px;padding:0 8px;height:100%;border:0;background:transparent;color:inherit;cursor:pointer}

/* Editor */
#modal.web-wide{width:min(1240px,96vw);max-width:min(1240px,96vw)}
.web-editor{display:grid;gap:14px;min-width:0}
.web-editor-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.web-editor-head h2{margin:2px 0 4px;font-size:20px}
.web-editor-head .helper{margin:0;max-width:62ch}
.web-editor-count{font:12px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5b6b64;white-space:nowrap}
.web-editor-count.over strong,.web-editor-count.over{color:#b3261e}
.web-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;min-width:0}
.web-pane{display:flex;flex-direction:column;min-width:0;border:1px solid #cdd8cf;border-radius:10px;overflow:hidden;background:#fffdf8}
.web-pane-bar{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#f2f4ee;border-bottom:1px solid #e2e7dd;font-size:12px;color:#3f544b}
.web-pane-bar>span:first-child{font-weight:600;flex:1}
.web-pane-bar select,.web-pane-bar .web-import{font:12px system-ui,sans-serif;padding:2px 4px;border:1px solid #cdd8cf;border-radius:6px;background:#fff;color:#26463c;cursor:pointer}
.web-code{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);height:min(48vh,420px);background:#fbfbf7;overflow:hidden}
.web-gutter{margin:0;padding:10px 8px;text-align:right;overflow:hidden;user-select:none;background:#f1f3ec;border-right:1px solid #e2e7dd;color:#93a09a;font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.web-code-body{position:relative;min-width:0;overflow:hidden}
.web-highlight,.web-source{margin:0;position:absolute;inset:0;border:0;padding:10px 12px;overflow:auto;white-space:pre;tab-size:2;font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:0}
.web-highlight{overflow:hidden;pointer-events:none;color:#22303a;background:transparent}
.web-source{color:transparent;background:transparent;caret-color:#12222b;resize:none;outline:none}
.web-source::selection{background:#174e4333;color:transparent}
.web-hint{margin:0;padding:5px 10px;font-size:11px;color:#5b6b64;background:#f7f8f2;border-top:1px solid #eef1e8}
.hl-com{color:#7b8a7f;font-style:italic}
.hl-tag{color:#1f6f4f}
.hl-attr{color:#8a5a12}
.hl-str{color:#a03530}
.hl-kw{color:#7a3ea8}
.hl-num{color:#1c6a86}
.hl-fn{color:#2b5f9e}
.hl-sel{color:#8a5a12}
.hl-dec{color:#a03530}
.web-preview{position:relative;flex:1;min-height:min(48vh,420px);background:#fff}
.web-preview iframe{width:100%;height:100%;border:0;display:block;background:#fff;color-scheme:light;min-height:min(48vh,420px)}
.web-preview-full{height:70vh;border:1px solid #cdd8cf;border-radius:10px;overflow:hidden}
.web-editor-fields{display:grid;grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,.7fr)) minmax(0,1.6fr);gap:10px;align-items:end}
.web-editor-fields label{font-size:12px;color:#3f544b}
.web-editor-fields input{width:100%}
@media (max-width:900px){
 .web-editor-grid{grid-template-columns:minmax(0,1fr)}
 .web-editor-fields{grid-template-columns:1fr 1fr}
 .web-code{height:38vh}
}

#marquee-overlay{position:absolute;z-index:99998;pointer-events:none;border:calc(2px*var(--ib-inv-zoom,1)) dashed var(--theme-selection,#20594a);border-radius:4px;background:color-mix(in srgb,var(--theme-selection,#20594a) 8%,transparent);box-shadow:0 0 calc(10px*var(--ib-inv-zoom,1)) color-mix(in srgb,var(--theme-selection,#20594a) 20%,transparent)}
#marquee-overlay[hidden]{display:none}
#lasso-overlay polyline{stroke:var(--theme-selection,#20594a)!important;fill:color-mix(in srgb,var(--theme-selection,#20594a) 12%,transparent)!important}
.object.selected{outline:2px solid var(--theme-selection,#20594a);outline-offset:3px;box-shadow:0 0 0 6px color-mix(in srgb,var(--theme-selection,#20594a) 18%,transparent)}
.object.frame.selected{box-shadow:0 0 0 6px color-mix(in srgb,var(--theme-selection,#20594a) 18%,transparent),0 3px 15px #223b2910}
.object.action.selected{box-shadow:0 0 0 6px color-mix(in srgb,var(--theme-selection,#20594a) 18%,transparent),1px 3px 5px #293e3010}
.object.sticky.selected{box-shadow:0 0 0 6px color-mix(in srgb,var(--theme-selection,#20594a) 18%,transparent),1px 3px 5px #293e301c}

.inspector textarea[readonly]{background:color-mix(in srgb,var(--theme-text,#172119) 5%,var(--theme-surface,#fff));color:color-mix(in srgb,var(--theme-text,#172119) 72%,transparent);cursor:default;border-style:dashed}
.group-readonly-hint{display:block;margin-top:4px;font-size:10px;opacity:.62;font-weight:500}
.inspector [aria-disabled=true]{opacity:.5;cursor:not-allowed}

#inline-text-palette{position:fixed;z-index:100002;display:flex;align-items:center;gap:2px;padding:4px 6px;border-radius:10px;background:var(--theme-surface,#fff);border:1px solid var(--line,#d5ddd8);box-shadow:0 8px 24px rgba(16,32,26,.18);font:inherit;font-size:12px;color:inherit;max-width:calc(100vw - 16px);overflow-x:auto}
#inline-text-palette[hidden]{display:none}
#inline-text-palette .il-btn{min-width:28px;height:28px;border:1px solid transparent;border-radius:7px;background:transparent;color:inherit;font:inherit;font-size:12px;line-height:1;cursor:pointer;padding:0 6px}
#inline-text-palette .il-btn:hover{background:color-mix(in srgb,var(--theme-selection,#20594a) 12%,transparent)}
#inline-text-palette .il-btn[aria-pressed=true]{background:var(--theme-selection,#20594a);border-color:var(--theme-selection,#20594a);color:#fff}
#inline-text-palette .il-sep{width:1px;height:18px;background:var(--line,#d5ddd8);margin:0 3px;flex:0 0 auto}
#inline-text-palette .il-size{min-width:20px;text-align:center;font-size:11px;opacity:.7}
#inline-text-palette .il-colour{display:inline-flex;align-items:center;gap:3px;height:28px;padding:0 4px;border-radius:7px;border:1px solid var(--line,#d5ddd8);cursor:pointer;flex:0 0 auto}
#inline-text-palette .il-colour span{font-size:11px;font-weight:700;border-bottom:3px solid currentColor;line-height:.9}
#inline-text-palette .il-colour input{width:18px;height:18px;padding:0;border:0;background:none;cursor:pointer}
#inline-text-palette .il-family{height:28px;border:1px solid var(--line,#d5ddd8);border-radius:7px;background:var(--theme-surface,#fff);color:inherit;font:inherit;font-size:11px;padding:0 4px;max-width:86px;flex:0 0 auto}
#inline-text-palette .il-done{font-weight:700}
@media (max-width:520px){#inline-text-palette{padding:3px 4px;gap:1px}#inline-text-palette .il-family{display:none}}

/* Performance: each object is an isolated layout/style box, so moving or restyling one object cannot
   invalidate the rest of the board. Paint containment is deliberately left off for sticky notes and
   cards because their curl and shadow pseudo-elements sit outside the border box; drawings, which
   have neither, get full strict containment and skip off-screen paint. */
#objects .object{contain:layout style}
#objects .object.drawing{contain:strict}
.canvas-video-player{contain:layout style}
@supports (content-visibility:auto){
  #objects .object.drawing{content-visibility:auto;contain-intrinsic-size:auto 220px}
}
/* Promote the canvas layer only while a pan gesture is in flight. */
#world.panning{will-change:transform}

/* Board description + advisory alignment watchdog */
#alignment-chip{display:flex;align-items:center;flex-shrink:0}
.alignment-chip-button{display:flex;align-items:center;gap:5px;padding:7px 10px;border:1px solid var(--line,#dce1d9);border-radius:999px;background:var(--theme-surface,#fff);color:var(--theme-text,#30443b);font-size:12px;line-height:1}
.alignment-chip-button b{font-size:12px;font-variant-numeric:tabular-nums}
#alignment-chip[data-state=warn] .alignment-chip-button{border-color:#c98b3f;background:#fdf3e3;color:#8a5a15}
[data-workspace-tone=dark] #alignment-chip[data-state=warn] .alignment-chip-button{background:#4a3a1f;border-color:#c98b3f;color:#f3d3a1}
body.gallery-open #alignment-chip{display:none}
.gallery-card p.gallery-description{font-size:11px;line-height:1.55;margin:0 0 10px;opacity:.8;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.gallery-rename.gallery-describe{right:86px}
.alignment-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
.alignment-stat{border:1px solid var(--line,#e4e7df);border-radius:10px;padding:14px;display:grid;gap:4px;background:var(--theme-surface,#fff)}
.alignment-stat b{font-size:24px;letter-spacing:-.5px}
.alignment-stat small{font-size:10px;line-height:1.45;opacity:.75}
.alignment-stat[data-tone=warn]{border-color:#c98b3f;background:#fdf3e3}
.alignment-stat[data-tone=warn] b{color:#8a5a15}
.alignment-kinds{margin:0 0 18px;padding-left:18px;font-size:12px;line-height:1.65;opacity:.85}
.alignment-description{border:1px solid var(--line,#e4e7df);border-radius:10px;padding:16px;margin:0 0 16px}
.alignment-description header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}
.alignment-description h3,.alignment-toolbar h3{font-size:12px;text-transform:uppercase;letter-spacing:1.2px;margin:0;opacity:.7}
.alignment-description-body{white-space:pre-wrap;font-size:13px;line-height:1.65;color:var(--theme-text,#30443b);margin:0}
.alignment-toggle{margin:0 0 16px}
.alignment-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:20px 0 10px}
.alignment-checks{display:grid;gap:10px;max-height:46vh;overflow:auto;padding-right:4px}
.alignment-check{border:1px solid var(--line,#e4e7df);border-left:3px solid #7fa88c;border-radius:8px;padding:12px;background:var(--theme-surface,#fff)}
.alignment-check[data-tone=warn]{border-left-color:#c98b3f}
.alignment-check header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.alignment-verdict{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#3f7355}
.alignment-verdict[data-tone=warn]{color:#8a5a15}
.alignment-check header small{margin-left:auto}
.alignment-subject{font-size:12px;line-height:1.5;margin:0 0 6px;opacity:.85;overflow-wrap:anywhere}
.alignment-reasons{margin:0 0 6px;padding-left:16px;font-size:11px;line-height:1.55;opacity:.8}
[data-workspace-tone=dark] .alignment-stat,[data-workspace-tone=dark] .alignment-check,[data-workspace-tone=dark] .alignment-description{background:var(--theme-surface);border-color:var(--line)}
@media(max-width:700px){.alignment-summary{grid-template-columns:1fr}#alignment-chip{order:5}}

/* Platform Administrator Console and silent board observation */
body.admin-open .workspace,body.admin-open .board-identity,body.admin-open #avatars,body.admin-open .live-tag,body.admin-open .board-tools,body.admin-open #share,body.admin-open #alignment-chip{display:none}
#admin-console{height:calc(100dvh - 64px);overflow:auto;padding:38px max(22px,calc((100vw - 1100px)/2));background:var(--theme-canvas,#f5f7f3);color:var(--theme-text,#253d36)}
#admin-console[hidden]{display:none}
.admin-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;flex-wrap:wrap;margin-bottom:22px}
.admin-header h1{font-size:clamp(24px,2.6vw,34px);letter-spacing:-.6px;margin:10px 0}
.admin-header p{font-size:12px;opacity:.7;max-width:70ch;margin:0}
.admin-nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:26px;border-bottom:1px solid var(--line);padding-bottom:12px}
.admin-nav button{border:1px solid var(--line);background:var(--theme-surface,#fff);color:inherit;border-radius:999px;padding:6px 14px;font-size:11px;cursor:pointer}
.admin-nav button:hover{border-color:var(--theme-selection)}
.admin-panel{border:1px solid var(--line);border-radius:16px;background:var(--theme-surface,#fff);padding:20px 22px;margin-bottom:20px}
.admin-panel h2{font-size:15px;margin:0 0 10px}
.admin-panel .helper{font-size:11px;opacity:.7}
.admin-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:14px}
.admin-metric{border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.admin-metric strong{display:block;font-size:24px;line-height:1.2}
.admin-metric span{font-size:10px;opacity:.65;text-transform:uppercase;letter-spacing:.06em}
.admin-owner-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px}
.admin-owner-list li{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:6px;font-size:12px}
.gallery-admin{margin-top:46px;border-top:1px solid var(--line);padding-top:26px}
.admin-owner{border:1px solid var(--line);border-radius:12px;background:var(--theme-surface,#fff);padding:10px 14px;margin-bottom:10px}
.admin-owner summary{cursor:pointer;display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.admin-owner summary small{margin-left:auto;opacity:.6;font-size:11px}
.admin-owner-boards{margin-top:4px}
.admin-board-row{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;border-top:1px solid var(--line);padding:9px 0;font-size:12px}
.admin-board-actions{display:flex;gap:8px;flex-wrap:wrap}
#observe-banner{position:fixed;left:50%;transform:translateX(-50%);bottom:18px;z-index:95;display:flex;gap:14px;align-items:center;max-width:min(720px,calc(100vw - 24px));padding:10px 16px;border-radius:999px;background:#20302a;color:#fff;font-size:12px;box-shadow:0 10px 30px #0005}
#observe-banner b{font-weight:600}
#observe-banner button{background:#fff;color:#20302a;border:0;white-space:nowrap}
@media(max-width:700px){#admin-console{padding:22px 14px}.admin-panel{padding:16px}}

/* Sticker palette (canvas Sticker tool) */
.sticker-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0 6px}
.sticker-tabs button{border:1px solid var(--line,#e4e7df);border-radius:999px;padding:6px 12px;font-size:11px;background:#fff;color:inherit}
.sticker-tabs button[aria-selected="true"]{background:var(--theme-accent,#20594a);border-color:transparent;color:#fff;font-weight:600}
.sticker-tabs small{margin-left:3px;font-size:9px;opacity:.7}
.sticker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px;max-height:44vh;overflow:auto;padding:10px;border:1px solid var(--line,#e4e7df);border-radius:10px;background:#fafbf9}
.sticker-card{display:grid;place-items:center;gap:3px;padding:9px 4px;border:1px solid transparent;border-radius:9px;background:transparent}
.sticker-card:hover,.sticker-card:focus-visible{background:#fff;border-color:var(--line,#e4e7df)}
.sticker-glyph{font-size:30px;line-height:1}
.sticker-card small{display:block;max-width:100%;font-size:9px;color:#7d8977;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sticker-empty{grid-column:1/-1;padding:26px;text-align:center;font-size:12px;color:#879181}
.sticker-footer{display:flex;gap:18px;align-items:flex-start;justify-content:space-between;margin-top:14px;flex-wrap:wrap}
.sticker-footer label{font-size:11px}
.sticker-footer .helper{margin:0;max-width:46ch}
@media(max-width:600px){.sticker-grid{grid-template-columns:repeat(auto-fill,minmax(64px,1fr));max-height:38vh}.sticker-glyph{font-size:26px}}

.sticker-collections{display:inline-flex;gap:4px;padding:4px;margin:2px 0 12px;border:1px solid var(--line,#e4e7df);border-radius:999px;background:#f5f7f3}
.sticker-collections button{border:0;background:transparent;border-radius:999px;padding:6px 14px;font-size:11px;color:inherit}
.sticker-collections button[aria-selected="true"]{background:#fff;box-shadow:0 1px 3px #0002;font-weight:600}
.sticker-collections small{margin-left:3px;font-size:9px;opacity:.65}
.sticker-card img{width:52px;height:52px;object-fit:contain;display:block}
#sticker-credit a{color:inherit;text-decoration:underline}

/* Reseller console */
body.reseller-open .workspace,body.reseller-open .board-identity,body.reseller-open #avatars,body.reseller-open .live-tag,body.reseller-open .board-tools,body.reseller-open #share,body.reseller-open #alignment-chip{display:none}
#reseller-console{height:calc(100dvh - 64px);overflow:auto;padding:38px max(22px,calc((100vw - 1150px)/2));background:var(--theme-canvas,#f5f7f3);color:var(--theme-text,#253d36)}
#reseller-console[hidden]{display:none}
#reseller-console .admin-header h1{font-size:clamp(24px,2.6vw,34px)}
.reseller-table-wrap{overflow-x:auto;border:1px solid var(--line,#e4e7df);border-radius:12px}
.reseller-table{width:100%;border-collapse:collapse;font-size:12px;min-width:820px}
.reseller-table th{text-align:left;padding:9px 10px;background:#f7f8f4;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#6f7d72;white-space:nowrap}
.reseller-table td{padding:9px 10px;border-top:1px solid var(--line,#e4e7df);vertical-align:top}
.reseller-table tr:hover td{background:#fbfcf9}
.tier-badge{display:inline-block;padding:3px 8px;border-radius:999px;font-size:10px;font-weight:600;white-space:nowrap;background:#eef1ec;color:#4a5b4e}
.tier-bronze{background:#f3e6d8;color:#8a5a2b}
.tier-silver{background:#e8ecef;color:#4f5f6b}
.tier-gold{background:#f7eed0;color:#8a6a13}
.tier-platinum{background:#e6e9f7;color:#474c8f}
.tier-none{background:#f1f1f1;color:#7a7a7a}
#reseller-console .admin-panel h2 small{font-weight:400;font-size:11px;opacity:.6;margin-left:6px}

/* Reseller administration (administrator oversight) */
body.reseller-admin-open .workspace,body.reseller-admin-open .board-identity,body.reseller-admin-open #avatars,body.reseller-admin-open .live-tag,body.reseller-admin-open .board-tools,body.reseller-admin-open #share,body.reseller-admin-open #alignment-chip{display:none}
#reseller-admin{height:calc(100dvh - 64px);overflow:auto;padding:30px max(18px,calc((100vw - 1250px)/2));background:var(--theme-canvas,#f5f7f3);color:var(--theme-text,#253d36)}
#reseller-admin[hidden]{display:none}
#reseller-admin .admin-header h1{font-size:clamp(24px,2.6vw,34px)}
.resadmin-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;align-items:start}
.resadmin-list{position:sticky;top:12px;border:1px solid var(--line,#e4e7df);border-radius:12px;background:#fff;max-height:calc(100dvh - 150px);overflow:auto}
.resadmin-list-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line,#e4e7df);position:sticky;top:0;background:#fff}
.resadmin-list-head small{font-size:10px;opacity:.6}
.resadmin-item{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #f1f3ee;background:transparent;padding:10px 12px;cursor:pointer;font:inherit;color:inherit}
.resadmin-item:hover{background:#f7f8f4}
.resadmin-item.is-active{background:#eef3ec;box-shadow:inset 3px 0 0 var(--theme-accent,#174e43)}
.resadmin-item strong{display:block;font-size:13px}
.resadmin-item .helper{display:block;font-size:11px;margin:2px 0}
.resadmin-item-stats{display:block;font-size:11px;color:#6f7d72;margin-top:3px}
.resadmin-detail{min-width:0}
.resadmin-profile h2{margin:0 0 4px;font-size:22px}
.resadmin-org{margin-bottom:16px}
.resadmin-org-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.resadmin-org-head h3{margin:0;font-size:17px}
.resadmin-org-head h3 small{font-weight:400;font-size:12px;opacity:.65;margin-left:6px}
.resadmin-org h4{margin:14px 0 6px;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:#6f7d72}
.resadmin-billing{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px 16px;margin:10px 0 4px}
.resadmin-billing dt{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#7b8a7f}
.resadmin-billing dd{margin:2px 0 0;font-size:12px}
@media (max-width:900px){.resadmin-layout{grid-template-columns:1fr}.resadmin-list{position:static;max-height:none}}

/* Template library: previews read as small documents, cards lift on hover. */
.mini-preview{background:linear-gradient(150deg,#f6f7f0 0%,#eef1e8 55%,#e9ede2 100%)}
.mini-preview svg{filter:drop-shadow(0 6px 10px #314c3618)}
.template-card{transition:border-color .16s,transform .16s,box-shadow .16s}
.template-card:hover{transform:translateY(-2px);box-shadow:0 12px 26px #2d4a3720}
.template-card:focus-visible{outline:2px solid var(--theme-selection,#3d8064);outline-offset:2px}
.template-card .card-title span{color:#8aa07f;font-size:12px}
.template-group>summary{background:linear-gradient(180deg,#fbfcf8,#f6f7f1)}
.template-card .card-copy p{line-height:1.55}
@media(prefers-reduced-motion:reduce){.template-card,.template-card:hover{transform:none}}

/* Toolbox placement: bottom rail (default), left rail, floating widget. */
#canvas-dock[data-placement="left"]{left:8px;top:calc(50% + 10px);bottom:auto;transform:translateY(-50%);width:auto;max-width:none;max-height:calc(100% - 96px);height:auto;display:flex;flex-direction:column;align-items:center;gap:6px}
#canvas-dock[data-placement="left"] .dock-surface{position:static;left:auto;bottom:auto;transform:none;width:auto;max-width:calc(100vw - 24px);max-height:calc(100vh - 190px);overflow-y:auto;overscroll-behavior:contain}
#canvas-dock[data-placement="left"].is-open .dock-surface{transform:none}
#canvas-dock[data-placement="left"] .canvas-toolbar{flex-direction:column;flex-wrap:nowrap;padding:8px 6px;max-height:calc(100vh - 320px);overflow-x:hidden;overflow-y:auto}
#canvas-dock[data-placement="left"] .canvas-toolbar .tool{flex:0 0 auto;width:46px;min-width:46px;height:44px}
#canvas-dock[data-placement="left"] .canvas-toolbar .tool small{font-size:7px;line-height:9px}
#canvas-dock[data-placement="left"] .canvas-toolbar .divider{width:28px;height:1px;flex:0 0 1px;margin:3px auto;background:#8f9d9140}
#canvas-dock[data-placement="left"] .dock-reveal{width:30px;height:34px;border-radius:11px}
#canvas-dock[data-placement="left"] .dock-reveal span{width:5px;height:18px;border-radius:6px}
#canvas-dock[data-placement="left"] .dock-reveal:hover span,#canvas-dock[data-placement="left"] .dock-reveal:focus-visible span{width:5px;height:24px;opacity:.7}
#canvas-dock[data-placement="left"] .art-menu,#canvas-dock[data-placement="left"] .media-menu,#canvas-dock[data-placement="left"] .connector-menu{left:calc(100% + 10px);bottom:auto;top:50%;transform:translateY(-50%)}
#canvas-dock[data-placement="left"] .dock-placement{flex-direction:column;margin:6px 0 0;padding:6px 0 0;border-left:0;border-top:1px solid #8f9d9140;width:auto}
.board-main.dock-left #ink-radial{left:var(--dock-left-pad,88px);transform:none;width:auto;max-width:calc(100% - 96px)}
.board-main.dock-left #tool-status{left:76px}
.board-main.dock-left .zoom-controls{left:var(--dock-left-pad,88px);right:auto}
/* Docked left, the zoom control and the tool hint both start at the rail's edge; when the toolbox is
   minimised the zoom drops to the bottom row and used to sit on top of the hint. Stack them instead. */
.board-main.dock-left #tool-status{left:var(--dock-left-pad,88px);bottom:96px;max-width:calc(100% - var(--dock-left-pad,88px) - 20px)}
.board-main.dock-left.dock-open #tool-status{bottom:176px}
@media(max-width:800px){
  .board-main.dock-left #tool-status{left:var(--dock-left-pad,88px);bottom:140px;max-width:calc(100% - var(--dock-left-pad,88px) - 12px)}
  .board-main.dock-left.dock-open #tool-status{bottom:167px}
}
@media(max-width:700px){
  .board-main.dock-left #tool-status{bottom:140px}
  .board-main.dock-left.dock-open #tool-status{bottom:172px}
}

#canvas-dock[data-placement="float"]{position:fixed;left:0;top:0;bottom:auto;transform:none;width:auto;max-width:none;height:auto;display:flex;flex-direction:column;align-items:center;z-index:62}
#canvas-dock[data-placement="float"] .dock-surface{position:absolute;bottom:calc(100% + 12px);left:0;transform:translateY(8px) scale(.97);max-width:calc(100vw - 16px)}
#canvas-dock[data-placement="float"].is-open .dock-surface{transform:translateY(0) scale(1)}
#canvas-dock[data-placement="float"].is-down .dock-surface{bottom:auto;top:calc(100% + 12px);transform:translateY(-8px) scale(.97)}
#canvas-dock[data-placement="float"].is-down.is-open .dock-surface{transform:translateY(0) scale(1)}
#canvas-dock[data-placement="float"] .dock-reveal{width:54px;height:54px;border-radius:50%;border:1px solid #a6b3ac65;background:var(--theme-surface);background:color-mix(in srgb,var(--theme-surface) 88%,transparent);backdrop-filter:blur(16px);box-shadow:0 10px 26px #1a2f2730,inset 0 1px 0 #ffffff70;touch-action:none;cursor:grab}
#canvas-dock[data-placement="float"].is-dragging .dock-reveal{cursor:grabbing;box-shadow:0 16px 34px #1a2f2740}
#canvas-dock[data-placement="float"] .dock-reveal span{width:20px;height:20px;border-radius:50%;background:var(--theme-accent);opacity:.92;box-shadow:none}
#canvas-dock[data-placement="float"] .dock-reveal:hover span,#canvas-dock[data-placement="float"] .dock-reveal:focus-visible span{width:24px;height:24px;opacity:1}
#canvas-dock[data-placement="float"] .art-menu,#canvas-dock[data-placement="float"] .media-menu,#canvas-dock[data-placement="float"] .connector-menu{bottom:calc(100% + 66px)}

/* Position buttons sit at the right end of the toolbox pill. The toolbar scrolls horizontally when a board
   has many tools, so the group is sticky to the right edge: the tools slide under it, the buttons stay put. */
.canvas-dock .canvas-toolbar>.dock-placement{position:sticky;right:-2px;order:9999;flex:0 0 auto;align-self:stretch;display:flex;align-items:center;gap:1px;margin-left:auto;padding-left:5px;padding-right:2px;border-left:1px solid #8f9d9140;border-radius:14px 24px 24px 14px;background:var(--theme-surface);background:color-mix(in srgb,var(--theme-surface) 92%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);z-index:2}
#canvas-dock[data-placement="left"] .canvas-toolbar>.dock-placement{position:static;right:auto;margin-left:auto;border-radius:0;background:transparent;backdrop-filter:none;width:100%}
.dock-placement{display:flex;align-items:center;gap:1px;margin-left:5px;padding-left:5px;border-left:1px solid #8f9d9140}
.dock-placement .dock-place{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:38px;height:46px;padding:0;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--theme-text);touch-action:manipulation}
.dock-placement .dock-place svg{width:17px;height:17px;opacity:.78}
.dock-placement .dock-place small{font-size:7px;line-height:9px;opacity:.7;letter-spacing:.03em}
.dock-placement .dock-place:hover{background:#8298891c}
.dock-placement .dock-place[aria-pressed="true"]{background:color-mix(in srgb,var(--theme-accent) 14%,transparent);border-color:color-mix(in srgb,var(--theme-accent) 32%,transparent)}
.dock-placement .dock-place:focus-visible{outline:2px solid var(--theme-selection);outline-offset:-2px}
@media(max-width:800px){#canvas-dock[data-placement="left"]{top:44%}#canvas-dock[data-placement="left"] .canvas-toolbar .tool{width:42px;min-width:42px;height:42px}.dock-placement .dock-place{width:34px;height:42px}}

/* PDF page decks on the canvas: a stack of sheets, the current page on top, arrows and a page counter. */
.object.pdf{background:#fff!important;border:1px solid #ccd6de;border-radius:12px;box-shadow:0 10px 26px #16283a20,0 2px 6px #16283a12}
.object.pdf>.obj-text{padding:0;height:100%;overflow:visible;border-radius:11px}
.pdf-body{position:relative}
.pdf-deck{position:relative;width:100%;height:100%;border-radius:11px;isolation:isolate;container-type:inline-size}
.pdf-sheet{position:absolute;background:#fff;border:1px solid #d7dee4;border-radius:9px;box-shadow:0 3px 7px #1b2b3a16;pointer-events:none}
.pdf-sheet-1{inset:0;transform:translate(5px,5px) rotate(.7deg)}
.pdf-sheet-2{inset:0;transform:translate(9px,9px) rotate(-.9deg);opacity:.72}
.pdf-page{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;background:#fff;border:1px solid #d3dbe2;border-radius:9px;box-shadow:0 6px 16px #16283a1f;transform-origin:center;animation:none}
.pdf-page.pdf-flip-next{animation:pdf-flip-next .26s ease-out}
.pdf-page.pdf-flip-prev{animation:pdf-flip-prev .26s ease-out}
@keyframes pdf-flip-next{from{transform:rotateY(-26deg) translateX(-9%);opacity:.45;box-shadow:0 2px 6px #16283a10}to{transform:none;opacity:1}}
@keyframes pdf-flip-prev{from{transform:rotateY(26deg) translateX(9%);opacity:.45;box-shadow:0 2px 6px #16283a10}to{transform:none;opacity:1}}
.pdf-status{position:absolute;inset:auto 0 30% 0;font-size:11px;font-size:clamp(9px,3cqw,14px);color:#5d6f7b;background:#ffffffcc;padding:6px 8px;pointer-events:none}
.pdf-nav{position:absolute;top:50%;transform:translateY(-50%) scale(min(var(--ib-inv-zoom,1),2.4));transform-origin:center;width:2.1em;height:2.1em;display:grid;place-items:center;border-radius:50%;background:#ffffffdd;color:#274a5a;border:1px solid #c8d4dc;box-shadow:0 2px 6px #16283a1f;font-size:16px;font-size:clamp(12px,4.4cqw,22px);line-height:1;padding:0 0 .12em;opacity:0;transition:opacity .14s}
.pdf-prev{left:.5em}.pdf-next{right:.5em}
.object.pdf:hover .pdf-nav,.object.pdf:focus-within .pdf-nav,.object.pdf.selected .pdf-nav{opacity:1}
.pdf-nav:disabled{opacity:.25}
/* The counter bar belongs under the sheet, not across the object: sized to its own content, centred on the
   page, and never wider than the page it labels (the deck is usually wider than the page it shows). */
.pdf-bar{position:absolute;left:50%;right:auto;bottom:.5em;width:max-content;max-width:calc(100% - 1em);transform:translateX(-50%) scale(var(--pdf-bar-scale,min(var(--ib-inv-zoom,1),2.4)));transform-origin:bottom center;display:flex;align-items:center;justify-content:center;gap:.5em;padding:.34em .55em;border-radius:.7em;background:#ffffffeb;border:1px solid #d3dbe2;box-shadow:0 2px 8px #16283a1a;font-size:12px;font-size:clamp(9px,3.4cqw,16px);color:#33505f}
.pdf-title{display:none}   /* the name lives in the object's properties, not across the page */
.pdf-open{border:0;background:none;padding:0 .1em;font-size:1.05em;line-height:1;cursor:pointer;opacity:.8}
.pdf-open:hover{opacity:1}
.pdf-count{font-variant-numeric:tabular-nums;color:#5c7180;white-space:nowrap}
.pdf-sound{border:0;background:none;padding:0 .1em;font-size:1.05em;line-height:1;cursor:pointer;opacity:.8}
.pdf-sound:hover{opacity:1}
#add-pdf>svg{width:22px;height:22px}

/* A file being staged and compressed before it becomes an object, and any object the platform is re-encoding.
   One visual language for both: greyed-out content, a spinning compaction motif, plain words, real progress or
   elapsed time. */
:root{--proc-accent:var(--theme-accent,#20594a);--proc-ink:var(--theme-text,#172119);--proc-surface:var(--theme-surface,#fff)}
.object.bb-processing{outline:calc(2px*var(--ib-inv-zoom,1)) solid var(--proc-accent);outline-offset:calc(2px*var(--ib-inv-zoom,1))}
/* The content goes grey and dim while the platform works on it: it is temporarily not the thing to read, and the
   colour drain is what makes "busy" obvious at a glance on a photograph or a video still. The object's own
   controls, the motif and the selection chrome are excluded so they stay crisp and usable. */
.object.bb-processing > :not(.bb-proc, .object-controls, .booklet-navigation, .reaction-badges, .edge-anchor, .resize-handle){
  filter:grayscale(1) brightness(.9) contrast(.92);opacity:.5}
.bb-proc{position:absolute;inset:0;z-index:26;display:grid;place-items:center;padding:8px;border-radius:inherit;overflow:hidden;pointer-events:none;
  background:color-mix(in srgb,var(--proc-surface) 44%,transparent)}
.bb-proc:before{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(102deg,transparent 30%,color-mix(in srgb,var(--proc-accent) 20%,transparent) 50%,transparent 70%);
  background-size:260% 100%;background-repeat:no-repeat;animation:bb-proc-sweep 2.1s ease-in-out infinite}
/* Motif and card keep a constant on-screen size, like the selection controls: a processing state nobody can read
   (or recognise) at 50% zoom is not an indication. */
.bb-proc-stack{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;max-width:100%;
  transform:scale(min(var(--ib-inv-zoom,1),2));transform-origin:center}
/* Spinning compaction motif: dashed rings grinding inward and collapsing into a solid core — the ring reads as
   the spin, the collapse as the squeeze. */
.bb-proc-motif{position:relative;width:64px;height:64px;display:grid;place-items:center;color:var(--proc-accent);
  background:radial-gradient(circle at 50% 50%,color-mix(in srgb,var(--proc-surface) 72%,transparent) 0 52%,transparent 72%)}
.bb-proc-ring{position:absolute;inset:0;border-radius:50%;border:2px dashed currentColor;opacity:0;
  animation:bb-proc-collapse 2.2s cubic-bezier(.45,0,.55,1) infinite,bb-proc-spin 3.4s linear infinite}
.bb-proc-ring-2{animation-delay:.73s,0s}
.bb-proc-ring-3{animation-delay:1.46s,0s}
.bb-proc-core{width:13px;height:13px;border-radius:3.5px;background:currentColor;
  box-shadow:0 0 0 5px color-mix(in srgb,var(--proc-accent) 16%,transparent)}
.bb-proc-glyph{position:absolute;inset:0;display:none;place-items:center;font-size:26px;font-weight:700;line-height:1;color:var(--proc-accent)}
.bb-proc-card{position:relative;display:flex;align-items:center;gap:10px;max-width:100%;padding:8px 14px;border-radius:13px;
  border:1px solid color-mix(in srgb,var(--proc-accent) 30%,transparent);background:var(--proc-surface);color:var(--proc-ink);
  box-shadow:0 8px 22px #16241e26,0 1px 2px #16241e1a;font-size:12px;line-height:1.3}
/* The ring spinner still belongs to the pending-upload card, which is not an object yet. */
.bb-proc-spinner{flex:0 0 auto;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;color:var(--proc-accent);
  background:conic-gradient(from 0turn,color-mix(in srgb,var(--proc-accent) 10%,transparent) 0 40%,var(--proc-accent) 96%);
  -webkit-mask:radial-gradient(closest-side,transparent 60%,#000 62%);mask:radial-gradient(closest-side,transparent 60%,#000 62%);
  animation:bb-proc-spin .95s linear infinite}
.bb-proc-copy{display:grid;gap:2px;min-width:0;max-width:230px}
.bb-proc-label{font-size:12px;font-weight:650;letter-spacing:.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bb-proc-detail{font-size:10px;opacity:.66;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bb-proc-bar{position:relative;height:3px;margin-top:5px;border-radius:3px;overflow:hidden;background:color-mix(in srgb,var(--proc-ink) 13%,transparent)}
.bb-proc-bar>i{display:block;width:0;height:100%;border-radius:inherit;background:var(--proc-accent);transition:width .35s ease}
.bb-proc-bar[data-mode=unknown]>i{width:38%;animation:bb-proc-run 1.6s ease-in-out infinite}
.bb-proc[data-outcome]{background:transparent}
.bb-proc[data-outcome]:before{animation:none;background:none}
.bb-proc[data-outcome] .bb-proc-card{border-color:color-mix(in srgb,var(--proc-accent) 46%,transparent)}
.bb-proc[data-outcome] .bb-proc-bar{display:none}
.bb-proc[data-outcome] .bb-proc-ring,.bb-proc[data-outcome] .bb-proc-core{display:none}
.bb-proc[data-outcome] .bb-proc-motif{animation:none;border-radius:50%;background:color-mix(in srgb,var(--proc-accent) 14%,transparent)}
.bb-proc[data-outcome] .bb-proc-glyph{display:grid}
.bb-proc[data-outcome=failed] .bb-proc-card{border-color:#c2414a;color:#a3282f}
.bb-proc[data-outcome=failed] .bb-proc-glyph,.bb-proc[data-outcome=failed] .bb-proc-motif{color:#a3282f;background:color-mix(in srgb,#c2414a 14%,transparent)}
#bb-proc-chip{position:absolute;top:44px;right:16px;left:auto;z-index:39;display:flex;align-items:center;gap:8px;max-width:calc(100% - 40px);
  padding:6px 13px;border-radius:20px;pointer-events:none;font-size:11px;font-weight:550;color:var(--proc-ink);
  border:1px solid color-mix(in srgb,var(--proc-accent) 34%,transparent);background:color-mix(in srgb,var(--proc-surface) 94%,transparent);
  box-shadow:0 6px 20px #16241e1f}
#bb-proc-chip[hidden]{display:none}
#bb-proc-chip>i{width:12px;height:12px;border-radius:50%;flex:0 0 auto;
  background:conic-gradient(from 0turn,color-mix(in srgb,var(--proc-accent) 12%,transparent) 0 40%,var(--proc-accent) 96%);
  -webkit-mask:radial-gradient(closest-side,transparent 58%,#000 60%);mask:radial-gradient(closest-side,transparent 58%,#000 60%);
  animation:bb-proc-spin .95s linear infinite}
@keyframes bb-proc-spin{to{rotate:1turn}}
@keyframes bb-proc-collapse{0%{transform:scale(.98);opacity:.9}62%{opacity:.28}100%{transform:scale(.26);opacity:0}}
@keyframes bb-proc-sweep{0%{background-position:190% 0}100%{background-position:-90% 0}}
@keyframes bb-proc-run{0%{transform:translateX(-115%)}100%{transform:translateX(310%)}}
@media(max-width:560px){.bb-proc-motif{width:52px;height:52px}.bb-proc-card{padding:7px 11px;gap:8px}.bb-proc-copy{max-width:170px}#bb-proc-chip{top:38px;right:10px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.bb-proc:before{animation:none;background:none}.bb-proc-motif,.bb-proc-ring,.bb-proc-spinner,#bb-proc-chip>i{animation:none} .bb-proc-ring{opacity:.55!important;transform:scale(.72)} .bb-proc-ring-2,.bb-proc-ring-3{display:none}.bb-proc-bar[data-mode=unknown]>i{animation:none;width:100%;opacity:.5}}
/* A file being staged and compressed before it becomes an object. */
.object.pending-upload{border:1px dashed color-mix(in srgb,var(--proc-accent) 45%,transparent);background:var(--proc-surface);box-shadow:none;pointer-events:none;border-radius:14px}
.object.pending-upload .obj-text{display:flex;flex-direction:column;gap:7px;justify-content:center;padding:14px;font-size:13px;color:var(--proc-ink)}
.object.pending-upload .pending-head{display:flex;align-items:center;gap:9px;min-width:0}
.object.pending-upload strong{font-size:12.5px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.object.pending-upload .pending-state{font-size:11px;opacity:.68}
.object.pending-upload .bb-proc-bar{margin-top:2px}
.object.pending-upload-failed{border-color:#c2414a;background:#fff5f5}
.object.pending-upload-failed .pending-state{color:#a3282f}
.object.pending-upload-failed .bb-proc-spinner{animation:none;background:#c2414a;-webkit-mask:none;mask:none}
/* Interface mode, as the Learn panel explains it: the current mode, what Pro adds, and the tours reserved for it. */
.mode-card{border:1px solid var(--green);border-radius:10px;padding:11px 12px;margin:14px 0 4px;background:var(--theme-surface,#fff);color:var(--theme-text)}
.mode-card-head{display:flex;align-items:center;gap:8px;margin:0 0 6px;flex-wrap:wrap}
.mode-chip{display:inline-block;padding:2px 8px;border-radius:999px;border:1px solid var(--green);font-size:10px;letter-spacing:.08em;text-transform:uppercase;font-weight:700}
.mode-card[data-mode=pro] .mode-chip{background:var(--green);color:#fff}
.mode-card .helper{margin:4px 0}
.mode-locked{margin:4px 0 10px;padding-left:18px;font-size:12px}
.mode-locked li{margin:3px 0}
.mode-card button.secondary{margin-top:2px}
#help-panel small{color:inherit;opacity:.8}
.tour-mode{font-size:10px;letter-spacing:.08em;text-transform:uppercase;border:1px solid currentColor;border-radius:999px;padding:1px 7px;opacity:.85;white-space:nowrap}
#tour-card header{gap:8px}
#tour-card header strong{flex:1}

/* Administrator-only: compact the media stored on one object. Same footprint as the object's other
   actions, with a quiet working state so the panel says what it is doing. */
#selection-toolbar #object-compact{opacity:.82;position:relative}
#selection-toolbar #object-compact:hover{opacity:1}
#selection-toolbar #object-compact[data-state='working'],#selection-toolbar #object-compact[data-state='queued']{opacity:.55;cursor:progress}
/* How many times this object has already been compacted: a small count on the control, capped at five. */
.compact-count{position:absolute;top:-2px;right:-3px;min-width:14px;height:14px;padding:0 3px;border-radius:8px;
  display:grid;place-items:center;font-size:9px;font-weight:700;line-height:1;letter-spacing:-.2px;
  background:var(--proc-accent,var(--theme-accent,#20594a));color:var(--theme-surface,#fff);
  box-shadow:0 0 0 1.5px var(--theme-surface,#fff);pointer-events:none}
/* The details panel's media block: what the object costs on disk and what each compaction saved. */
.compact-report .compact-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:4px 0 9px}
.compact-metric{display:grid;gap:2px;padding:8px 9px;border:1px solid var(--line);border-radius:9px;background:color-mix(in srgb,var(--theme-text,#172119) 3%,transparent)}
.compact-metric span{font-size:9px;letter-spacing:.5px;text-transform:uppercase;opacity:.6}
.compact-metric b{font-size:13px;font-weight:650;font-variant-numeric:tabular-nums}
.compact-runs{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px;max-height:210px;overflow:auto;scrollbar-width:thin}
.compact-runs li{display:grid;grid-template-columns:auto 1fr auto;align-items:baseline;gap:4px 8px;font-size:11px;padding:6px 0;border-top:1px solid var(--line)}
.compact-runs time{font-size:10px;opacity:.6;font-variant-numeric:tabular-nums}
.compact-run-size{font-variant-numeric:tabular-nums;opacity:.85}
.compact-runs b{color:var(--proc-accent,var(--theme-accent,#20594a));font-weight:650;white-space:nowrap}
.compact-runs em{grid-column:2/-1;font-style:normal;font-size:9px;opacity:.55}
}

/* Password reveal control on the sign-in card — public/password-eye.js.
   The field keeps its own padding so the value never runs under the control; the button is a 34px target
   centred on the field's height, and the visible state adds a brand-green tint beside the open-eye icon so the
   state reads without relying on the glyph alone. Colours match the card's legacy palette (#253d36 text,
   #174e43 brand) because this sheet is the legacy layer; a future components-layer rule wins over it. */
#auth-form .pw-field{position:relative;display:block;min-width:0}
#auth-form .pw-field input{width:100%;padding-right:46px}
#auth-form .pw-eye{position:absolute;top:50%;right:5px;transform:translateY(-50%);display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:8px;background:transparent;color:#7b857d;cursor:pointer;line-height:0}
#auth-form .pw-eye svg{display:block;width:19px;height:19px}
#auth-form .pw-eye:hover{background:rgba(37,61,54,.08);color:#253d36}
#auth-form .pw-eye:focus-visible{outline:2px solid #253d36;outline-offset:2px}
#auth-form .pw-eye[data-state="visible"]{color:#174e43}
@media (prefers-reduced-motion:no-preference){#auth-form .pw-eye{transition:color .15s ease,background-color .15s ease}}
@media (max-width:420px){#auth-form .pw-eye{width:32px;height:32px;right:4px}#auth-form .pw-field input{padding-right:42px}}

/* Compact is a Pro facility: it is a storage-surgery action on a live board, and Standard mode is the simplified
   interface. media-compact.js also refuses to mount it there — this rule only covers the moments between a mode
   switch and the next reconcile, so the control can never paint in Standard mode. */
html[data-mode="standard"] #object-compact{display:none!important}

/* ==========================================================================
   Phone shell (2026-10-28)
   Before this block a 390 px phone was given a 537 px layout: the header's
   controls could not fit one row, so the document panned sideways, media
   queries mixed widths (`innerWidth` 537, `visualViewport` 390), the board
   selector was squeezed to 24 px, the toolbox opened underneath the header
   and dialog action rows pushed their buttons past the left edge. A 768 px
   tablet overflowed by 21 px for the same reason.
   Everything here is scoped to narrow viewports and to coarse pointers;
   desktop rendering is unchanged.
   ========================================================================== */

/* --- 1. anything up to a rotated phone or a small tablet: the header fits -- */
/* 960, not 820: a phone in landscape (844x390) was wider than the breakpoint and fell back to
   the desktop header, which needs 907 px — the page panned sideways by 63 px and the board
   selector was crushed exactly as it had been at 390 px. mobile-shell.js uses the same number. */
@media (max-width:960px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: clip; }
  .topbar { gap: 4px; flex-wrap: nowrap; min-width: 0; overflow: visible; }
  .topbar > * { flex: 0 0 auto; min-width: 0; }
  .topbar .board-identity { display: block !important; flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .topbar .board-identity select { width: 100%; max-width: 100% !important; }

  /* the four secondary chips live in the ••• menu; mobile-shell.js moves them */
  body.mobile-shell .topbar > #alignment-chip,
  body.mobile-shell .topbar > #language-select,
  body.mobile-shell .topbar > #mention-notifications { display: none !important; }
  body.mobile-shell #header-more .mobile-header-tools {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; min-height: 44px; padding: 2px 4px;
  }
  body.mobile-shell #header-more .mobile-header-tools > span { font-size: 12px; font-weight: 650; }
  body.mobile-shell #header-more .mobile-header-tools .lang-switch .lang-name { display: inline !important; }
  body.mobile-shell #header-more .mobile-header-tools .lang-switch { height: 34px; }
  body.mobile-shell #header-more .mobile-header-tools #alignment-chip { display: block !important; }
}

/* --- 2. phones: compact header, bottom toolbox rail, dialog layout ------- */
@media (max-width:700px) {
  .topbar { padding: 0 8px; }
  .topbar .board-identity select { height: 32px; font-size: 13px; }
  .topbar .board-identity span { display: none; }
  #board-access { display: none !important; }
  #board-gallery-button { min-width: 40px; min-height: 40px; padding: 8px 10px; font-size: 0; line-height: 1; }
  #board-gallery-button::first-letter { font-size: 18px; }
  #avatars.avatars { max-width: 54px; overflow: hidden; }
  #ai-budget { padding: 2px; }
  #ai-budget-chip { gap: 4px; padding: 0 4px; }
  #ai-budget-chip .ab-chip-figures small, #ai-budget-chip small { display: none !important; }
  #mode-switch { height: 36px; padding: 0 10px; }
  #header-more > summary { min-height: 40px; min-width: 42px; padding: 9px 10px; font-size: 17px; line-height: 1; }
  #header-more > div { max-width: calc(100vw - 16px); }

  /* canvas toolbox: bottom rail, finger-sized tools, surface opens upward */
  #canvas-dock { width: calc(100% - 12px) !important; max-width: none !important; bottom: 3px !important; }
  #canvas-dock .dock-reveal { width: 132px; height: 34px; }
  #canvas-dock .dock-reveal span { width: 84px; height: 5px; }
  #canvas-dock .dock-surface { bottom: 38px; max-width: calc(100vw - 12px); }
  #canvas-dock .canvas-toolbar { padding: 8px 8px 7px; gap: 3px; border-radius: 20px; }
  #canvas-dock .canvas-toolbar .tool,
  #canvas-dock .extra-tools > summary { flex: 0 0 46px; width: 46px; min-width: 46px; height: 52px; }
  #canvas-dock .dock-pin { width: 34px; height: 34px; top: -34px; }
  #board-timeline { display: none !important; }   /* ticks were 30x24 and unreachable; history is in ••• */

  dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: 92dvh; padding: 20px 16px; border-radius: 16px; }
  dialog h2 { font-size: 22px; }
  #modal-content .actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  #modal-content .actions > button { flex: 1 1 150px; min-width: 0; min-height: 44px; white-space: normal; }
  #modal-content .form-grid.two,
  #modal-content .modal-grid,
  #modal-content .history-comparison,
  #modal-content .settings-tab-panel { grid-template-columns: 1fr !important; }
  #modal-content .history-area-fields { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #modal-content .theme-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #modal-content .emoji-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #modal-content input, #modal-content select, #modal-content textarea { max-width: 100%; min-height: 40px; }
  #modal-content .settings-tablist button { min-height: 40px; }
}

@media (max-width:360px) {
  #avatars.avatars { display: none !important; }
}

@media (max-width:430px) {
  #avatars.avatars { max-width: 40px; }
  #ai-budget-chip .ab-chip-figures { display: none !important; }
  #mode-switch { padding: 0 8px; }
  #canvas-dock .canvas-toolbar .tool,
  #canvas-dock .extra-tools > summary { flex-basis: 44px; width: 44px; min-width: 44px; height: 50px; }
}

/* --- 3. touch screens of any size: targets for a finger, not a cursor ---- */
@media (pointer: coarse) {
  .zoom-controls { padding: 4px; }
  .zoom-controls > button { min-width: 44px; height: 44px; font-size: 17px; padding: 0; }
  .zoom-controls > #zoom-level { min-width: 56px; font-size: 13px; }
  #board-timeline { display: none !important; }        /* 30x24 ticks under the canvas on touch */
  #timeline-toggle { width: 40px; height: 40px; }
  .roster-person { min-width: 40px; min-height: 40px; }
  .canvas-dock .canvas-toolbar .tool,
  #canvas-dock .extra-tools > summary { min-height: 50px; }
}

@media (pointer: coarse) and (max-width:700px) {
  .zoom-controls { bottom: 54px !important; right: 8px !important; left: auto !important; }
  #touch-toolbox { bottom: 106px !important; left: 8px !important; }
  #touch-toolbox .tt-fab { height: 44px; }
}

@media (pointer: coarse) {
  /* every control a thumb must find: 40 px minimum, 44 where the layout allows */
  #boards { min-height: 40px; }
  #mode-switch { min-height: 40px; }
  #new-board { min-width: 40px; min-height: 40px; }
  #board-gallery-button { min-height: 40px; }
  #header-more > summary { min-height: 40px; }
  .workspace-bar button { min-width: 40px; min-height: 40px; }
  .canvas-dock { height: 44px; }
  .canvas-dock .dock-reveal { height: 44px; }
  .canvas-dock .dock-surface { bottom: 48px; }
  .dock-surface > .dock-pin { width: 40px; height: 40px; top: -40px; }
  #canvas-dock .dock-radial { min-width: 40px; min-height: 40px; }
}

@media (pointer: coarse) {
  /* colour swatches and inspector rows are 19-22 px on a desktop; a thumb needs more */
  .inspector .color, #inspector .color { width: 34px; height: 34px; }
  .inspector .colors, #inspector .colors { gap: 9px; }
  .inspector .row button, #inspector .row button { min-height: 40px; }
  .inspector header button, #inspector header button { min-width: 40px; min-height: 40px; }
  .inspector input, .inspector select, #inspector input, #inspector select { min-height: 40px; }
  .inspector textarea, #inspector textarea { min-height: 96px; }
  .text-button { min-height: 34px; }
}

@media (pointer: coarse) {
  /* sign-in screen: the language picker, the password eye and the mode toggle were 30-34 px tall */
  #auth-language { min-height: 38px; min-width: 42px; }
  #auth-form .pw-eye { width: 38px; height: 38px; right: 3px; }
  #auth-form .pw-field input { padding-right: 48px; }
  #auth-toggle { min-height: 38px; }
  #auth-form input { min-height: 44px; }
  #auth-submit { min-height: 46px; }
}

/* --- 4. panels, pickers and overlays: they were only ever measured on a desktop -------

   Measured at 320x568 and 390x664 before this block (scripts: audit.js in the phone
   harness): the chat panel's head actions were 20x20-34x34, the help panel carried 60-64
   targets under 38 px, the sticker picker's collection chips were 24-26 px tall, the gallery
   toolbar was 35-37 px, `.gallery-rename` was 42x19, and the touch-toolbox FAB (z-index 60)
   painted over the chat composer and the agent palette footer, so those taps hit the FAB.
   ------------------------------------------------------------------------------------- */

@media (max-width:960px) {
  /* the FAB is a canvas affordance; a panel the user opened is the foreground surface */
  body:has(#chat-panel:not([hidden])) #touch-toolbox,
  body:has(#agent-palette:not([hidden])) #touch-toolbox,
  body.ux-sheet-open #touch-toolbox { display: none !important; }
  #header-more .mobile-header-tools #mention-notifications { min-width: 40px; }
}

@media (pointer: coarse) {
  /* chat panel */
  .chat-panel header button, #chat-dock, #chat-close, #chat-options { min-width: 40px; min-height: 40px; }
  .chat-panel button, .chat-panel select, .chat-panel textarea { min-height: 40px; }
  /* help panel */
  #help-panel .text-button, #help-home, #help-close { min-height: 40px; }
  #help-close, #help-home { min-width: 40px; }
  /* agent palette */
  #close-agent-palette { width: 40px; height: 40px; }
  #agent-palette-search { min-height: 44px; }
  #agent-panel-help { min-height: 40px; }
  /* dialogs and the pickers inside them */
  .modal-close { width: 40px; height: 40px; top: 6px; right: 6px; font-size: 22px; }
  #modal-content button, dialog > button { min-height: 40px; }
  /* board gallery: its toolbar buttons and filters were 35-37 px */
  #board-gallery button, #board-gallery select, #board-gallery input { min-height: 40px; }
  /* the ••• menu's "Board tools" submenu summary was 34 px */
  #header-more summary { min-height: 40px; }
  .gallery-favorite { width: 40px; height: 40px; }
  .gallery-rename { min-height: 34px; padding: 8px 6px; }
  /* wide-but-touch: the zoom rail overlapped the dock by 5 px at 844 and 1366 */
  .zoom-controls { bottom: 56px; }
  /* Pro-mode template library sheet (full width at <=700 px): the search field measured 12 px
     tall and the group expanders 21 px */
  .library .search { min-height: 44px; }
  .library .search input, #search { min-height: 40px; font-size: 14px; }
  #template-category, #library-scope, #save-template, #library-scope { min-height: 40px; }
  #expand-template-groups, #collapse-template-groups { min-width: 40px; min-height: 40px; }
  .category { min-height: 34px; }
  /* PDF page deck: overlay controls are sized in container query units, so give them a
     finger-sized floor at 1:1 zoom (the whole canvas still scales with the user's zoom) */
  .pdf-nav { width: clamp(40px, 9cqw, 48px); height: clamp(40px, 9cqw, 48px); font-size: clamp(15px, 5cqw, 22px); }
  .pdf-open, .pdf-sound { min-height: 32px; min-width: 32px; }
}

/* --- 5. dynamic viewport: a keyboard must not push the bottom rail off-screen --------
   `100vh` on a phone is the URL-bar-less height and never shrinks for the on-screen
   keyboard, so the dock, zoom rail and dialog footers end up underneath it. `dvh` tracks
   the visual viewport. (The keyboard itself cannot be opened headless, so this block is
   reasoned from the CSS, not measured — see references/mobile-ux.md.)
   ----------------------------------------------------------------------------------- */
@supports (height: 1dvh) {
  @media (max-width:960px) {
    .workspace, .workspace-refined .workspace { height: calc(100dvh - 64px); }
    .auth-form { min-height: 100dvh; }
    dialog { max-height: 92dvh; }
    .chat-panel { max-height: 85dvh; }
    #help-panel { top: 64px; height: calc(100dvh - 64px); bottom: auto; }
  }
}

/* --- 6. rotated phones: wide but short ---------------------------------------------
   At 664x390 and 844x390 the agent palette had a 15 px browser row and 0 px of result
   list (scrollHeight 27602 / clientHeight 0), so every persona tile was painted under the
   search field and unreachable; the help panel and chat panel ran past the bottom edge.
   ----------------------------------------------------------------------------------- */
@media (max-height:560px) and (max-width:960px) {
  #help-panel { top: 52px; height: calc(100dvh - 52px); }
  .chat-panel { top: 58px !important; max-height: calc(100dvh - 70px) !important; }
  /* the palette becomes one scrolling drawer instead of a fixed header + 0 px list */
  #agent-palette { top: 6px; bottom: 6px; max-height: none; overflow: auto; }
  #agent-palette-results { overflow: visible; }
  .agent-palette-browser { flex: 0 0 auto; min-height: 0; overflow: visible; }
  .agent-palette-browser .persona-group-tabs { max-height: none; }
  #canvas-dock .dock-surface { max-height: calc(100dvh - 92px); overflow: auto; }
  dialog { max-height: 96dvh; }
}

/* ==========================================================================
   Full-screen media viewer (2026-10-28)
   A board card is sized in canvas units, so a PDF page, photo, video or web app is only as large
   as the object the author drew — and on a phone it is smaller than the zoomed-out canvas. The
   viewer is a body-level overlay that re-renders the object's media at viewport size, so it is
   unaffected by renderCanvas() rewriting #objects.innerHTML. Desktop cards are untouched: the only
   desktop-visible change is a ⛶ badge on hover/selection.
   ========================================================================== */
#media-fullscreen{position:fixed;inset:0;z-index:19000;display:flex;flex-direction:column;
  background:#0c1512f2;color:#fff;backdrop-filter:blur(7px)}
#media-fullscreen[hidden]{display:none}
.mf-bar{flex:0 0 auto;display:flex;align-items:center;gap:10px;
  padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px}
#mf-title{font-size:13px;font-weight:650;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#mf-count{margin-left:auto;font-size:11px;opacity:.7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:40%}
.mf-bar button{flex:0 0 auto;min-width:44px;min-height:44px;border-radius:12px;border:1px solid #ffffff33;
  background:#ffffff1a;color:#fff;font-size:18px;line-height:1;display:grid;place-items:center}
.mf-bar button[aria-pressed=true]{background:#ffffff38}
#mf-close{margin-left:auto}
#mf-count:not([hidden]) ~ #mf-close{margin-left:0}
.mf-stage{flex:1 1 auto;min-height:0;display:grid;place-items:center;padding:0 10px;overflow:auto;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.mf-stage img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.mf-stage.is-actual{place-items:start}
.mf-stage.is-actual img{max-width:none;max-height:none;cursor:zoom-out}
.mf-stage iframe,.mf-stage video{width:100%;height:100%;min-height:0;border:0;border-radius:10px;background:#000}
.mf-message{margin:0;padding:18px;font-size:13px;line-height:1.6;color:#fff;text-align:center;max-width:38em}
.mf-status{font-size:12px;opacity:.75;margin-top:10px}
.mf-nav{flex:0 0 auto;display:flex;align-items:center;justify-content:center;gap:16px;
  padding:10px 14px calc(12px + env(safe-area-inset-bottom,0px))}
.mf-nav[hidden]{display:none}
.mf-nav button{min-width:60px;min-height:46px;border-radius:12px;border:1px solid #ffffff33;
  background:#ffffff1a;color:#fff;font-size:22px;line-height:1}
.mf-nav button:disabled{opacity:.3}
#mf-pageno{font-size:12px;opacity:.8;min-width:70px;text-align:center;font-variant-numeric:tabular-nums}
/* the ⛶ badge: constant screen size (inverse canvas zoom), always visible to a finger */
.media-fullscreen{position:absolute;right:6px;top:6px;z-index:32;min-width:34px;min-height:34px;
  display:grid;place-items:center;border-radius:9px;background:#ffffffe6;color:#172119;
  border:1px solid #0002;font-size:15px;line-height:1;padding:0;
  transform:scale(var(--ib-inv-zoom,1));transform-origin:top right;opacity:0;transition:opacity .12s}
.object:hover>.media-fullscreen,.object.selected>.media-fullscreen,.object:focus-within>.media-fullscreen{opacity:1}
.media-fullscreen-footer{position:static;transform:none;opacity:1;min-height:32px;padding:0 10px;
  font-size:12px;display:inline-flex;align-items:center;gap:6px;margin-left:auto}
@media (pointer:coarse){
  .media-fullscreen{opacity:1;min-width:40px;min-height:40px;font-size:17px}
  .media-fullscreen-footer{min-height:40px;font-size:12px}
}
@media (prefers-reduced-motion:reduce){ .media-fullscreen{transition:none} }
body.media-full{overflow:hidden}

/* On-screen keyboard (mobile-shell.js sets --kb / --vvh from visualViewport and body.kb-open).
   The covered height is added to every bottom-anchored control, so opening the keyboard on the
   composer, the search field or a dialog field cannot push the rail, zoom controls or FAB behind
   it. On desktop --kb is always 0px and body.kb-open is never set. */
body.kb-open #canvas-dock{bottom:calc(3px + var(--kb,0px))!important}
body.kb-open #canvas-dock .dock-surface{bottom:calc(38px + var(--kb,0px))}
body.kb-open .zoom-controls{bottom:calc(58px + var(--kb,0px))!important}
body.kb-open #touch-toolbox{bottom:calc(110px + var(--kb,0px))!important}
body.kb-open .chat-panel{max-height:min(85dvh,calc(var(--vvh,100dvh) - 96px))!important}
body.kb-open .chat-panel{top:auto!important;bottom:calc(10px + var(--kb,0px))!important}
body.kb-open #help-panel{height:calc(var(--vvh,100dvh) - 64px);bottom:auto}
body.kb-open .mf-nav{padding-bottom:calc(12px + var(--kb,0px))}
body.kb-open dialog{max-height:calc(var(--vvh,100dvh) - 24px)}

/* Persona deck on a phone. Measured at 320/390: eight controls between 14 and 24 px
   (.pd-flip 62x14, .pd-actions 22x22, .pd-prev/.pd-next/.pd-collapse 24x24, .pd-toggle 35x20) and the
   card sat on top of the zoom rail (deck 174..380 x 449..586 vs zoom 173..382 x 522..576 at 390) and
   on the touch-toolbox FAB at 320. Pin it under the header, where nothing else floats, and give every
   control a finger-sized floor. Desktop keeps its saved/dragged position. */
@media (pointer: coarse) and (max-width: 960px) {
  #persona-deck { top: 72px !important; right: 8px !important; bottom: auto !important; left: auto !important;
    width: min(232px, calc(100vw - 16px)) !important; max-height: calc(100dvh - 190px); overflow: auto; }
  #persona-deck .pd-actions, #persona-deck .pd-actions button, #persona-deck .pd-prev, #persona-deck .pd-next,
  #persona-deck .pd-collapse, #persona-deck .pd-flip { min-width: 40px; min-height: 40px; }
  #persona-deck .pd-toggle { min-width: 44px; min-height: 40px; }
  #persona-deck.is-collapsed { max-height: none; }
}

/* Board map as a zoom control. The panel anchors above the zoom cluster (JS sets right/bottom from the
   live cluster rect, so it follows the dock, the responsive offsets and RTL), and the toggle in the
   cluster shows the pressed state while the map is open. */
#zoom-map.is-active{background:color-mix(in srgb,var(--theme-accent) 22%,transparent);color:var(--theme-accent);border-radius:5px}
#workspace-minimap{z-index:34}
#workspace-minimap.is-collapsed{width:auto;min-width:180px}
#workspace-minimap.is-collapsed svg{display:none}
#workspace-minimap.is-collapsed header{margin-bottom:0}
#workspace-minimap header button{white-space:nowrap}
/* Board alert stack (board-alerts.js): persistent until this participant dismisses each card. */
/* Right-hand notification area starting below the floating workspace toolbar and first-run banner band
   (they span the top of the board at every width), beneath the object inspector (z 6). */
#board-alerts{position:absolute;top:165px;right:16px;width:min(380px,calc(100% - 32px));max-height:calc(100% - 330px);overflow:auto;z-index:5;display:grid;gap:8px;pointer-events:none}
#board-alerts>*{pointer-events:auto}
.board-alert-head{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);background:#fffffff0;border:1px solid var(--line);border-radius:8px;padding:4px 10px}
.board-alert{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid var(--line);border-left:4px solid #5b7f9a;border-radius:9px;padding:12px 14px;box-shadow:0 6px 22px #2c493520;font-size:13px;color:#30443b}
.board-alert.warning{border-left-color:#c08a1e;background:#fffaf0}
.board-alert.critical{border-left-color:#a33a32;background:#fff4f2}
.board-alert.mention{border-left-color:var(--green)}
.board-alert.resolved{border-left-color:#7d9a86;background:#f4f7f3}
.board-alert-body{flex:1;min-width:0}
.board-alert-body strong{display:block;font-size:13px;margin-bottom:3px}
.board-alert-body p{margin:0 0 4px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:#3c5140}
.board-alert-body time,.board-alert-state{font-size:11px;color:var(--muted)}
.board-alert-state{display:inline-block;margin-bottom:3px}
.board-alert-actions{display:flex;flex-direction:column;gap:6px}
.board-alert button{font-size:12px;padding:6px 10px;white-space:nowrap}
.board-alert-pill{justify-self:end;font-size:12px;padding:7px 14px;border-radius:20px;background:#fff;border:1px solid var(--line);box-shadow:0 4px 14px #2c493520}
.board-alert-pill.critical{background:#fff4f2;border-color:#a33a32;color:#7a2a24}
.board-alert-more{justify-self:center;font-size:12px}
@media(max-width:600px){#board-alerts{top:195px;right:16px;width:calc(100% - 32px);max-height:calc(100% - 400px)}.board-alert{padding:10px 12px}.board-alert-actions{flex-direction:row}.board-alert{flex-wrap:wrap}}
