/* SEDNIVO Board smart toolbar: exactly one permanent left rail.
   All secondary controls are contextual, not another permanent toolbar. */
body.canvas-first main #boardWrap{width:100%;margin-left:0}
body.canvas-first .ta-floating-dock{display:none!important}
body.canvas-first #pageControls{left:76px;top:9px;z-index:7}
body.canvas-first .ta-smart-rail{
 position:fixed;left:10px;top:104px;bottom:auto;z-index:130;
 width:50px;max-height:calc(100dvh - 116px);
 padding:6px 4px;display:flex;flex-direction:column;align-items:center;gap:3px;
 border:1px solid #d7e0ed;border-radius:15px;background:#fffffff9;
 box-shadow:0 4px 19px #071f4f1b;overflow:auto;scrollbar-width:none;
 overscroll-behavior:contain;user-select:none
}
body.canvas-first .ta-smart-rail::-webkit-scrollbar{display:none}
.ta-smart-grip{
 position:sticky;top:0;left:0;z-index:2;flex:0 0 auto;
 display:grid;place-items:center;width:40px;min-width:40px;height:40px;
 padding:0;border:1px solid #cbd8e8;border-radius:10px;
 background:#f3f7fc;color:#506985;cursor:grab;touch-action:none
}
.ta-smart-grip:active{cursor:grabbing;background:#e3edfa}
.ta-smart-grip svg{width:20px;height:20px;fill:currentColor;pointer-events:none}
.ta-smart-grip:focus-visible{outline:2px solid #c9a349;outline-offset:1px}
.ta-smart-button{
 display:flex;align-items:center;justify-content:center;flex:0 0 auto;
 width:40px;min-width:40px;height:40px;padding:0;
 border:0;border-radius:10px;background:transparent;color:#1d344f;
 font:700 21px/1 Georgia,serif;cursor:pointer;touch-action:manipulation
}
.ta-smart-button .ta-smart-ico{display:grid;place-items:center;pointer-events:none}
/* Match the existing navy vector tool symbols; no system-dependent emoji. */
.ta-smart-rail [data-smart="color"] .ta-smart-ico svg,
.ta-smart-rail [data-smart="pan"] .ta-smart-ico svg,
.ta-smart-rail [data-smart="calculator"] .ta-smart-ico svg{
 display:block;width:25px;height:25px;overflow:visible;
}
/* Keep the calculator in sight even when the floating rail scrolls. */
#taSmartRail [data-smart="calculator"]{position:sticky;top:83px;z-index:2;background:#fff}

.ta-smart-button:hover,.ta-smart-button:focus-visible{background:#eef3fb;outline:none}
.ta-smart-button.active,.ta-smart-button[aria-expanded="true"]{
 background:#e5edf9;color:#071f4f
}
.ta-smart-button:focus-visible{outline:2px solid #c9a349;outline-offset:1px}
.ta-smart-button:disabled{opacity:.31;cursor:default}
#taSmartRail [data-smart="actions"][hidden]{display:none!important}
.ta-smart-separator{
 flex:0 0 1px;width:27px;height:1px;margin:4px 0;background:#e1e7f0
}
/* Contextual palettes: symbol-only grids, no menu headings or long labels. */
#taSmartFlyout{
 position:fixed;z-index:145;top:104px;left:69px;
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
 width:250px;max-width:calc(100vw - 16px);
 max-height:calc(100dvh - 18px);overflow-x:hidden;overflow-y:auto;
 overscroll-behavior:contain;gap:5px;padding:8px;
 border:1px solid #d4deed;border-radius:13px;
 box-shadow:0 10px 32px #071f4f29;
 background:#fffffffb;color:#163554;scrollbar-width:thin;
 font:500 12px/1.3 system-ui,sans-serif;
}
#taSmartFlyout[hidden]{display:none!important}
.ta-shape-chooser{width:min(390px,calc(100vw - 22px));max-height:calc(100dvh - 24px);
 padding:0;border:1px solid #cad8e8;border-radius:15px;background:#fff;color:#17334f;
 box-shadow:0 18px 50px #071f4f40;font:500 14px/1.4 system-ui,sans-serif}
.ta-shape-chooser::backdrop{background:#071f4f77}
.ta-shape-chooser form{display:grid;gap:8px;padding:14px}
.ta-shape-chooser header{display:flex;align-items:center;justify-content:space-between;gap:10px;
 min-height:0;height:auto;padding:0;border:0;background:transparent!important;box-shadow:none}
.ta-shape-chooser h2{margin:0;font:700 19px/1.3 system-ui,sans-serif;color:#071f4f}
.ta-shape-chooser header button{font-size:25px}
.ta-shape-chooser label{display:grid;gap:5px;font-weight:650}
.ta-shape-chooser label[hidden]{display:none}
.ta-shape-section{font:700 11px/1.2 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#536c87}
.ta-shape-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.ta-shape-card,.ta-relation-grid label{position:relative;display:grid!important;place-items:center;gap:2px;min-width:0;min-height:61px;padding:5px 2px;border:1px solid #b8cbe0;border-radius:9px;background:#f8fbff;color:#17334f;text-align:center;cursor:pointer}
.ta-shape-card input,.ta-relation-grid input{position:absolute;width:1px!important;height:1px!important;opacity:0;pointer-events:none}
.ta-shape-card:has(input:checked),.ta-relation-grid label:has(input:checked){border:2px solid #1a5ba4;background:#e7f2ff;color:#0a427e}
.ta-shape-card:focus-within,.ta-relation-grid label:focus-within{outline:2px solid #e4aa26;outline-offset:2px}
.ta-shape-card svg{width:26px;height:26px}
.ta-shape-card span,.ta-relation-grid label>span:last-child{font:650 10px/1.15 system-ui,sans-serif;
 max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ta-relation-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.ta-relation-grid label{min-height:50px}
.ta-relation-icon{position:relative;height:23px;font:27px/20px system-ui,sans-serif;color:#1a5ba4}
.ta-relation-icon b{position:absolute;left:50%;top:2px;transform:translateX(-50%);font:16px/20px system-ui,sans-serif;color:#b57516}
.ta-shape-chooser select,.ta-shape-chooser input{box-sizing:border-box;width:100%;min-height:43px;
 padding:8px 10px;border:1px solid #afc2d8;border-radius:8px;background:#fff;color:#17334f;
 font:inherit}
.ta-shape-chooser .ta-shape-help{margin:0;color:#506985;font-size:12px}
.ta-shape-chooser .ta-shape-error{min-height:1em;margin:0;color:#a62932;font-size:12px}
.ta-shape-chooser footer{display:flex;justify-content:flex-end;gap:8px}
.ta-shape-chooser button{min-height:38px;padding:6px 12px;border:1px solid #b8cbe0;
 border-radius:8px;background:#f4f8fd;color:#17334f;font:650 13px system-ui,sans-serif;cursor:pointer}
.ta-shape-chooser button.primary{background:#123e69;color:white;border-color:#123e69}
#taSmartFlyout .ta-smart-option{
 display:grid;place-items:center;position:relative;
 width:100%;min-width:0;min-height:40px;height:40px;padding:0;
 border:1px solid transparent;border-radius:9px;
 background:#f8fafd;color:#163554;touch-action:manipulation;
}
#taSmartFlyout .ta-smart-option .ta-smart-ico{
 width:100%;height:100%;display:grid;place-items:center;
 font:650 21px/1 Georgia,serif;
}
#taSmartFlyout .ta-smart-option:hover,#taSmartFlyout .ta-smart-option:focus-visible{
 background:#edf3fa;border-color:#d2deed;
}
#taSmartFlyout .ta-smart-option.selected{
 background:#e9f0fb;border-color:#9bb9df;color:#071f4f;
}
#taSmartFlyout .ta-smart-size{
 grid-column:1/-1;display:flex;align-items:center;gap:6px;
 width:100%;margin:3px 0 0;padding:6px 2px 4px;
 border-top:1px solid #e3eaf4;font:650 11px system-ui,sans-serif;
}
#taSmartFlyout .ta-smart-size>span{font-size:18px;line-height:1}
#taSmartFlyout .ta-smart-size input{
 flex:1;min-width:0;width:auto;margin:0;accent-color:#215bb5;
}
#taSmartFlyout .ta-smart-size output{
 min-width:38px;text-align:right;font-variant-numeric:tabular-nums;
}
#taSmartFlyout .ta-smart-colors{
 grid-column:1/-1;display:grid;
 grid-template-columns:repeat(8,minmax(0,1fr));
 gap:5px;padding:5px 0 7px;border-top:1px solid #e5ebf4;
}
#taSmartFlyout .ta-smart-swatch{
 width:24px;height:24px;min-width:0;min-height:24px;
 justify-self:center;padding:0;cursor:pointer;
 border-radius:50%;border:2px solid #d2dde8;
}
#taSmartFlyout .ta-smart-swatch.selected{
 outline:2px solid #153a64;outline-offset:2px;
}
#taSmartFlyout .ta-smart-color-custom{
 grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;
 gap:8px;margin:0;padding:5px 3px 0;
 border-top:1px solid #e3eaf4;font:650 11px system-ui,sans-serif;
}
#taSmartFullColor{
 width:42px;height:30px;min-width:42px;padding:2px;
 border:1px solid #c8d6e5;border-radius:7px;cursor:pointer;
}
/* A lightweight tooltip stays outside the scrolling flyout to avoid clipping. */
#taSmartTooltip{
 position:fixed;z-index:165;pointer-events:none;
 width:max-content;max-width:min(230px,calc(100vw - 12px));
 padding:7px 10px;border:1px solid #273f62;border-radius:8px;
 background:#071f4f;color:#fff;font:600 12px/1.3 system-ui,sans-serif;
 white-space:normal;box-shadow:0 4px 14px #071f4f35;
}
#taSmartTooltip[hidden]{display:none!important}
/* A compact view-control pill, as in Miro: it is not a second tool bar. */
body.canvas-first #viewControls,
body.canvas-first.ta-view-open #viewControls{
 display:flex!important;position:fixed!important;
 top:auto!important;left:auto!important;right:12px!important;
 bottom:11px!important;z-index:130!important;
 width:auto;max-width:min(280px,calc(100vw - 20px));
 margin:0;padding:5px 7px;gap:4px;align-items:center;
 border:1px solid #d4dfec;border-radius:14px;
 box-shadow:0 3px 15px #071f4f21;background:#fffffff9;
}
body.canvas-first #viewControls #panView{display:none!important}
body.canvas-first #viewControls button{min-width:34px;min-height:34px;padding:3px 6px}
body.canvas-first #viewControls #zoomLevel{min-width:48px;text-align:center}
@media(max-width:790px){
 body.canvas-first #viewControls{bottom:calc(72px + env(safe-area-inset-bottom,0px))!important;
  right:9px!important;padding:3px 4px;gap:2px}
 body.canvas-first #viewControls button{min-width:28px;min-height:32px;font-size:12px}
 body.canvas-first #viewControls #zoomLevel{min-width:36px;font-size:10px}
}
/* The underlying Canvas and ink stay full-width; only the floating
   controls consume visible pixels, as in a professional whiteboard. */
@media(min-width:1160px){
 body.canvas-first #liveBar{
  position:absolute;top:6px;right:12px;left:auto;
  z-index:14;border:1px solid #e3e9f3;border-radius:12px;
  background:#fffffff7;box-shadow:0 2px 9px #10234512;
  min-height:36px;height:36px;width:auto;max-width:55vw;
  margin:0;padding:5px 12px;gap:8px;flex-wrap:nowrap
 }
 body.canvas-first #liveStudent{max-width:230px}
 body.canvas-first #livePartner{display:none}
}
@media(max-height:620px) and (min-width:791px){
 body.canvas-first .ta-smart-rail{top:80px;max-height:calc(100dvh - 86px)}
}
@media(max-width:790px){
 body.canvas-first #liveBar{position:static}
 body.canvas-first #pageControls{left:8px;top:8px}
 body.canvas-first .ta-smart-rail{
  top:auto;bottom:calc(10px + env(safe-area-inset-bottom,0px));
  left:50%;transform:translateX(-50%);
  flex-direction:row;width:min(96vw,580px);max-width:calc(100vw - 14px);
  max-height:56px;height:56px;padding:5px;overflow-x:auto;overflow-y:hidden;
  border-radius:14px;gap:3px
 }
 body.canvas-first .ta-smart-separator{width:1px;min-width:1px;height:24px;margin:0 4px}
 #taSmartRail [data-smart="calculator"]{top:0;left:83px;z-index:3;box-shadow:2px 0 5px #071f4f16}
 body.canvas-first #taSmartFlyout{max-height:calc(100dvh - 90px)}
}
body.canvas-first .ta-smart-rail.is-moved{
 left:var(--ta-rail-left)!important;top:var(--ta-rail-top)!important;
 right:auto!important;bottom:auto!important;transform:none!important
}

.ta-selected-toolbar{
 position:fixed;z-index:135;top:70px;left:180px;
 display:flex;flex-direction:column;gap:7px;
 width:224px;max-width:calc(100vw - 24px);
 padding:9px;border:1px solid #d8e2ee;
 border-radius:12px;background:#fffffff9;
 box-shadow:0 5px 18px #061c3d21;
 color:#173755;font:600 12px/1.2 system-ui,sans-serif;
}
.ta-selected-toolbar[hidden]{display:none!important}
.ta-selected-title{font:700 11px/1.25 system-ui,sans-serif;
 color:#677e99;letter-spacing:.02em}
.ta-selected-colors{display:grid;grid-template-columns:repeat(8,18px) 24px;align-items:center;gap:4px}
.ta-selected-colors button{
 width:18px;min-width:18px;height:18px;min-height:18px;padding:0;
 border:1px solid #d4dce8;border-radius:4px;cursor:pointer;
}
.ta-selected-colors button.selected{outline:2px solid #2c5c91;outline-offset:1px}
.ta-selected-custom{width:24px;height:22px;position:relative}
.ta-selected-custom input{width:24px;height:22px;padding:1px;border-radius:4px;
 border:1px solid #bbcce1;background:white;cursor:pointer}
.ta-selected-width{display:flex;align-items:center;gap:7px;flex-wrap:nowrap;
 padding-top:2px;font:650 11px system-ui,sans-serif}
.ta-selected-width>span{font-size:17px;line-height:1;color:#5f7894}
.ta-selected-width input{accent-color:#215bb5;flex:1;min-width:0}
.ta-selected-width output{font-variant-numeric:tabular-nums;min-width:30px;text-align:right}
.ta-selected-style{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
 gap:4px;border-top:1px solid #e4ebf5;padding-top:7px}
.ta-selected-style button{
 min-width:0;min-height:27px;padding:3px;border-radius:6px;
 border:1px solid #d4dfed;background:#fbfcff;
 color:#163656;cursor:pointer
}
.ta-selected-style button svg{display:block;width:100%;height:14px}
.ta-selected-style button.selected{border-color:#7b9cc7;
 background:#e5eefb;color:#071f4f}
.ta-selected-style button[hidden]{display:none!important}
.ta-selected-toolbar.no-line-style .ta-selected-style{display:none}
.ta-selected-toolbar button:focus-visible,.ta-selected-toolbar input:focus-visible{
 outline:2px solid #c99e22;outline-offset:2px
}
@media(max-width:790px){.ta-selected-toolbar{z-index:142}}


/* Bilingual captions only inside contextual palettes, icon-only rail unchanged. */
#taSmartFlyout[data-menu="pen"],#taSmartFlyout[data-menu="shapes"]{
 width:350px;grid-template-columns:repeat(3,minmax(0,1fr));
}
#taSmartFlyout .ta-smart-heading{
 grid-column:1/-1;font:700 12px/1.4 system-ui,sans-serif;
 color:#163554;padding:3px 5px 5px;border-bottom:1px solid #e5ebf4;
}
#taSmartFlyout[data-menu="pen"] .ta-smart-option,
#taSmartFlyout[data-menu="shapes"] .ta-smart-option{
 height:83px;min-height:83px;display:flex;flex-direction:column;
 justify-content:center;align-items:center;gap:2px;padding:4px 4px;
 white-space:normal;overflow:hidden;
}
#taSmartFlyout[data-menu="pen"] .ta-smart-option .ta-smart-ico,
#taSmartFlyout[data-menu="shapes"] .ta-smart-option .ta-smart-ico{
 width:auto;height:24px;flex:none;font-size:22px;
}
#taSmartFlyout .ta-smart-caption{
 width:100%;display:flex;flex-direction:column;align-items:center;
 gap:0;line-height:1.1;font:600 10px/1.1 system-ui,sans-serif;
 text-align:center;min-width:0;pointer-events:none;
}
#taSmartFlyout .ta-smart-caption>span,#taSmartFlyout .ta-smart-caption small{
 display:block;max-width:100%;overflow:hidden;white-space:normal;overflow-wrap:break-word;
}
#taSmartFlyout .ta-smart-caption small{font:500 9px/1.15 system-ui,sans-serif;color:#65788f}
#taSmartFlyout .ta-smart-option.selected .ta-smart-caption small{color:#435d7b}
@media(max-width:430px){#taSmartFlyout[data-menu="pen"],#taSmartFlyout[data-menu="shapes"]{width:calc(100vw - 16px)}}
