/* The sequence canvas and timeline (web/js/pages/seqcanvas.js). Its colors are fixed and the same in every account:
   nothing here reads the school's brand tokens. Light by default; dark from the switch (remembered per browser). */
.sqc {
  --sq-bg: #F5F6FA; --sq-dot: rgba(15, 23, 42, .09); --sq-ink: #0F172A; --sq-ink2: #334155; --sq-ink3: #64748B;
  --sq-card: #FFFFFF; --sq-line: #E2E5EE; --sq-soft: #F1F3F9; --sq-shadow: 0 10px 24px rgba(15, 23, 42, .07); --sq-pop: 0 20px 50px rgba(15, 23, 42, .14);
  --sq-hold: #B45309; --sq-holdbg: #FFF7E6; --sq-holdline: #E0A526; --sq-rev: #92400E; --sq-won: #15803D; --sq-wonbg: #F0FDF4; --sq-wonline: #BBF7D0;
  --sq-lost: #94A3B8; --sq-live: #16A34A; --sq-today: #E11D48;
  --t0: #5B4BF0; --t1: #0D9488; --t2: #D97706; --t3: #2563EB; --t4: #DB2777; --t5: #7C3AED;
  --t0t: #4338CA; --t1t: #0F766E; --t2t: #B45309; --t3t: #1D4ED8; --t4t: #BE185D; --t5t: #6D28D9;
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: calc(100vh / var(--zf, 1) - var(--jb-head, 0px) - 40px);
  margin: -8px -4px 0; padding: 16px; border-radius: 20px; background-color: var(--sq-bg); color: var(--sq-ink);
  background-image: radial-gradient(var(--sq-dot) 1px, transparent 1px); background-size: 24px 24px; font-family: var(--sans);
}
.sqc[data-theme="dark"] {
  --sq-bg: #0A0F1F; --sq-dot: rgba(255, 255, 255, .07); --sq-ink: #E7EAF3; --sq-ink2: #C9CFE0; --sq-ink3: #9AA3BD;
  --sq-card: #11182E; --sq-line: #2A3355; --sq-soft: #161D3A; --sq-shadow: 0 12px 30px rgba(0, 0, 0, .35); --sq-pop: 0 24px 60px rgba(0, 0, 0, .5);
  --sq-hold: #FCD34D; --sq-holdbg: #2A2213; --sq-holdline: #F5B84B; --sq-rev: #FCD34D; --sq-won: #86EFAC; --sq-wonbg: #0F2A22; --sq-wonline: #1F5A45;
  --sq-lost: #6B7596; --sq-live: #4ADE80;
  --t0: #8B7CFF; --t1: #2DD4BF; --t2: #F5B84B; --t3: #60A5FA; --t4: #F472B6; --t5: #A78BFA;
  --t0t: #B9B0FF; --t1t: #5EEAD4; --t2t: #FCD34D; --t3t: #93C5FD; --t4t: #F9A8D4; --t5t: #C4B5FD;
}
.sqc .t0 { --tc: var(--t0); --tt: var(--t0t); } .sqc .t1 { --tc: var(--t1); --tt: var(--t1t); } .sqc .t2 { --tc: var(--t2); --tt: var(--t2t); }
.sqc .t3 { --tc: var(--t3); --tt: var(--t3t); } .sqc .t4 { --tc: var(--t4); --tt: var(--t4t); } .sqc .t5 { --tc: var(--t5); --tt: var(--t5t); }
.sqc .jb-ico { width: 16px; height: 16px; }

/* top bar */
.sqc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sqc-crumb { font-size: 13px; color: var(--sq-ink3); text-decoration: none; }
.sqc-crumb:hover { color: var(--sq-ink); }
.sqc-ident h1 { margin: 2px 0 0; font: 600 28px/1.15 var(--sans); letter-spacing: -.01em; color: var(--sq-ink); }
.sqc-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sqc-seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: var(--sq-card); border: 1px solid var(--sq-line); }
.sqc-seg > button, .sqc-seg > a { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; border-radius: 999px; padding: 7px 14px; font: 600 13px var(--sans); color: var(--sq-ink3); cursor: pointer; text-decoration: none; }
.sqc-seg > [aria-selected="true"], .sqc-seg > [aria-pressed="true"] { background: var(--sq-ink); color: var(--sq-bg); }
.sqc-seg > :hover:not([aria-selected="true"]):not([aria-pressed="true"]) { color: var(--sq-ink); }
.sqc-seg.small > button { padding: 5px 12px; font-size: 12.5px; }
.sqc-live { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; font: 600 13px var(--sans); color: var(--sq-ink3); background: var(--sq-card); border: 1px solid var(--sq-line); }
.sqc-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--sq-lost); }
.sqc-live.on { color: var(--sq-live); border-color: color-mix(in srgb, var(--sq-live) 45%, transparent); background: color-mix(in srgb, var(--sq-live) 12%, var(--sq-card)); }
.sqc-live.on i { background: var(--sq-live); box-shadow: 0 0 10px var(--sq-live); animation: sqc-pulse 1.8s ease-in-out infinite; }
@keyframes sqc-pulse { 50% { opacity: .35; } }
.sqc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--sq-line); background: var(--sq-card); color: var(--sq-ink2); font: 600 13px var(--sans); cursor: pointer; text-decoration: none; }
.sqc-btn:hover { color: var(--sq-ink); border-color: var(--sq-ink3); }
.sqc-btn.primary { background: var(--sq-ink); color: var(--sq-bg); border-color: var(--sq-ink); }
.sqc-zoom { display: inline-flex; align-items: center; border-radius: 12px; border: 1px solid var(--sq-line); background: var(--sq-card); overflow: hidden; }
.sqc-zoom button { border: 0; background: none; padding: 8px 9px; color: var(--sq-ink3); cursor: pointer; display: grid; place-items: center; }
.sqc-zoom button:hover { color: var(--sq-ink); background: var(--sq-soft); }
.sqc-zoom span { min-width: 46px; text-align: center; font: 600 12.5px var(--sans); color: var(--sq-ink2); }
.sqc-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 0; }
.sqc-sub:empty { display: none; }
.sqc-date { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--sans); color: var(--sq-ink3); }
.sqc-date input { border: 1px solid var(--sq-line); background: var(--sq-card); color: var(--sq-ink); border-radius: 10px; padding: 6px 10px; font: inherit; color-scheme: light dark; }
.sqc-hint { font-size: 12.5px; color: var(--sq-ink3); }

/* the board */
/* the stage: the moving board, with the blocks bar resting at its bottom edge (just above the legend) */
.sqc-stage { position: relative; flex: 1; min-height: 360px; display: flex; }
.sqc-vp { position: relative; flex: 1; min-width: 0; overflow: hidden; border-radius: 16px; cursor: grab; outline: none; touch-action: none; overscroll-behavior: contain; }
.sqc-vp:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--t0) 45%, transparent); }
.sqc-vp.panning { cursor: grabbing; user-select: none; }
.sqc-board { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.sqc-spacer { pointer-events: none; }
.sqc-lane { position: absolute; left: 12px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--tc) 26%, transparent); background: color-mix(in srgb, var(--tc) 5%, transparent); }
.sqc-lanelabel { position: absolute; left: 22px; top: 18px; width: 160px; display: flex; flex-direction: column; gap: 3px; }
.sqc-lanelabel b { font: 700 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--tt); }
.sqc-lanelabel span { font-size: 12.5px; color: var(--sq-ink3); }
.sqc-lanelabel a { font: 600 12.5px var(--sans); color: var(--tt); text-decoration: none; }
.sqc-lines { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.sqc-lines path { fill: none; stroke-width: 2; stroke-linecap: round; }
.sqc-lines path.t0, .sqc-lines .t0f { stroke: var(--t0); fill: none; } .sqc-lines .t0f { fill: var(--t0); stroke: none; }
.sqc-lines path.t1 { stroke: var(--t1); } .sqc-lines .t1f { fill: var(--t1); }
.sqc-lines path.t2 { stroke: var(--t2); } .sqc-lines .t2f { fill: var(--t2); }
.sqc-lines path.t3 { stroke: var(--t3); } .sqc-lines .t3f { fill: var(--t3); }
.sqc-lines path.t4 { stroke: var(--t4); } .sqc-lines .t4f { fill: var(--t4); }
.sqc-lines path.t5 { stroke: var(--t5); } .sqc-lines .t5f { fill: var(--t5); }
.sqc-lines path.dash { stroke-dasharray: 5 6; }
.sqc-lines path.par { stroke-width: 2.4; }
.sqc-elabel { font: 600 12px var(--sans); fill: var(--sq-ink3); paint-order: stroke; stroke: var(--sq-bg); stroke-width: 4px; }
.sqc-card { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 14px 10px; border-radius: 14px; border: 1px solid var(--sq-line); border-top: 3px solid var(--tc); background: var(--sq-card); color: var(--sq-ink); box-shadow: var(--sq-shadow); text-align: left; font: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.sqc-card:hover { transform: translateY(-2px); box-shadow: var(--sq-pop); }
.sqc-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--tc) 55%, transparent); outline-offset: 2px; }
.sqc-card.sel { border-color: var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 18%, transparent), var(--sq-pop); }
.sqc-card .k { font: 700 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sq-ink3); }
.sqc-card b { font-size: 15.5px; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sqc-card .meta { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--sq-ink3); margin-top: auto; }
.sqc-card .av { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--tc) 14%, var(--sq-card)); color: var(--tt); font: 700 9px var(--sans); font-style: normal; margin-right: -6px; border: 1.5px solid var(--sq-card); }
.sqc-card .av:last-of-type { margin-right: 4px; }
.sqc-card .flags { display: flex; gap: 4px; }
.sqc em.hold, .sqc em.rev { font: 700 11px var(--sans); font-style: normal; padding: 2px 7px; border-radius: 999px; color: var(--sq-hold); background: var(--sq-holdbg); border: 1px solid color-mix(in srgb, var(--sq-holdline) 60%, transparent); }
.sqc em.rev { border-style: dashed; color: var(--sq-rev); }
.sqc-card.won { border-top-color: var(--sq-won); background: var(--sq-wonbg); border-color: var(--sq-wonline); }
.sqc-card.won .k { color: var(--sq-won); }
.sqc-card.lost { border-style: dashed; border-top: 1px dashed var(--sq-lost); box-shadow: none; opacity: .8; }
.sqc-card.recent::after { content: ''; position: absolute; left: -7px; top: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--sq-card); border: 3px solid var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 22%, transparent), 0 0 14px var(--tc); }
.sqc-pill { position: absolute; box-sizing: border-box; padding: 5px 10px; border-radius: 999px; font: 600 11.5px var(--sans); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqc-pill.in { border: 1px dashed color-mix(in srgb, var(--tc) 60%, transparent); color: var(--tt); background: var(--sq-card); }
.sqc-pill.out { border: 1px solid var(--sq-line); color: var(--sq-ink2); background: var(--sq-card); }

/* floating panel and legend */
.sqc-panel { position: absolute; left: 32px; bottom: 32px; z-index: 5; width: min(380px, calc(100% - 64px)); box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 18px; background: var(--sq-card); border: 1px solid var(--sq-line); box-shadow: var(--sq-pop); color: var(--sq-ink); }
.sqc-panel[hidden] { display: none; }
.sqc-ph { display: flex; justify-content: space-between; align-items: center; }
.sqc-ph .k { font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--tt); }
.sqc-x { border: 0; background: none; color: var(--sq-ink3); cursor: pointer; padding: 4px; border-radius: 8px; display: grid; }
.sqc-x:hover { background: var(--sq-soft); color: var(--sq-ink); }
.sqc-pt { font-size: 20px; line-height: 1.2; }
.sqc-pm { margin: 0; font-size: 13px; color: var(--sq-ink3); }
.sqc-pl { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--sq-ink2); }
.sqc-pl > span { font: 700 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--sq-ink3); }
.sqc-pl > div { display: flex; gap: 8px; align-items: baseline; }
.sqc-pl i { font-style: normal; min-width: 72px; font-size: 12px; color: var(--sq-ink3); }
.sqc-pl .hold { color: var(--sq-hold); font-weight: 600; }
.sqc-pl .rev { color: var(--sq-rev); }
.sqc-ppl { display: flex; flex-wrap: wrap; gap: 4px; }
.sqc-ppl a { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sq-soft); color: var(--sq-ink2); font: 700 10.5px var(--sans); text-decoration: none; }
.sqc-pa { display: flex; gap: 8px; }
.sqc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 16px; border-radius: 14px; background: var(--sq-card); border: 1px solid var(--sq-line); font-size: 12.5px; color: var(--sq-ink2); }
.sqc-legend b { font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sq-ink3); }
.sqc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sqc .lg { display: inline-block; width: 26px; height: 0; border-top: 2px solid var(--t0); }
.sqc .lg.dash { border-top-style: dashed; }
.sqc .lg.par { border-top-color: var(--t1); border-top-width: 2.4px; }
.sqc .lg.dot { width: 10px; height: 10px; border: 2.5px solid var(--t0); border-radius: 50%; box-shadow: 0 0 8px var(--t0); }
.sqc .lg.solid { height: 10px; border: 0; border-radius: 4px; background: var(--t0); }
.sqc .lg.stripe { height: 10px; border: 0; border-radius: 4px; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--t0) 40%, transparent) 0 5px, color-mix(in srgb, var(--t0) 14%, transparent) 5px 10px); }
.sqc .lg.holdb { height: 10px; border: 1.5px dashed var(--sq-holdline); border-radius: 4px; background: var(--sq-holdbg); }

/* timeline */
.sqc-ruler { position: absolute; left: 12px; top: 0; height: 52px; border-radius: 14px; background: var(--sq-card); border: 1px solid var(--sq-line); box-shadow: var(--sq-shadow); }
.sqc-ruler span { position: absolute; top: 8px; display: flex; flex-direction: column; font-size: 12.5px; transform: translateX(-12px); white-space: nowrap; }
.sqc-ruler span b { color: var(--sq-ink); }
.sqc-ruler span i { font-style: normal; font-size: 11.5px; color: var(--sq-ink3); }
.sqc-ruler .lbl { left: 22px !important; transform: none; top: 17px; font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sq-ink3); }
.sqc-gridline { position: absolute; top: 60px; width: 0; border-left: 1px dashed var(--sq-line); }
.sqc-weekend { position: absolute; top: 60px; background: color-mix(in srgb, var(--sq-ink) 3.5%, transparent); }
.sqc-bar { position: absolute; height: 54px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: #fff; }
.sqc-bar .solid { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 12px; background: var(--tc); box-shadow: var(--sq-shadow); }
.sqc-bar .stripe { position: absolute; top: 0; bottom: 0; border-radius: 0 12px 12px 0; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tc) 42%, transparent) 0 6px, color-mix(in srgb, var(--tc) 14%, transparent) 6px 12px); }
.sqc-bar .solid + .stripe { margin-left: 0; }
.sqc-bar .txt { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; max-width: 100%; box-sizing: border-box; overflow: hidden; white-space: nowrap; }
.sqc-bar .txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.sqc-bar .txt i { font-style: normal; font-size: 11.5px; opacity: .9; }
.sqc-bar.won .solid { background: var(--sq-won); }
.sqc-bar.unsure { color: var(--tt); }
.sqc[data-theme="dark"] .sqc-bar.unsure { color: var(--tt); }
.sqc-mark span { overflow: hidden; text-overflow: ellipsis; }
.sqc-more { position: absolute; font: 600 11.5px var(--sans); color: var(--sq-ink3); }
.sqc[data-theme="dark"] .sqc-bar { color: #0A0F1F; }
.sqc-bar.sel .solid { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 25%, transparent), var(--sq-pop); }
.sqc-bar:focus-visible { outline: 3px solid color-mix(in srgb, var(--tc) 55%, transparent); outline-offset: 2px; border-radius: 12px; }
.sqc-mark { position: absolute; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sq-ink2); white-space: nowrap; transform: translateX(-6px); }
.sqc-mark i { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); flex: none; }
.sqc-mark.rev i { background: var(--sq-card); border: 2px dashed var(--sq-holdline); }
.sqc-hold { position: absolute; box-sizing: border-box; padding: 3px 10px; border-radius: 8px; border: 1.5px dashed var(--sq-holdline); background: var(--sq-holdbg); color: var(--sq-hold); font: 600 11.5px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqc-avatar { position: absolute; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--sq-card); border: 2px solid var(--tc); color: var(--tt); font: 700 9px var(--sans); text-decoration: none; }
.sqc-pin { position: absolute; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--sq-holdline); background: var(--sq-holdbg); color: var(--sq-hold); font: 600 11.5px var(--sans); white-space: nowrap; }
.sqc-today { position: absolute; top: 56px; border-left: 2px dashed var(--sq-today); }
.sqc-today span { position: absolute; top: -2px; left: 6px; font: 700 11px var(--sans); color: var(--sq-today); text-transform: uppercase; letter-spacing: .1em; }

/* editing on the board: rename, add, reorder, connect, drop blocks */
.sqc-lanebtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sqc-mini { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--sq-line); background: var(--sq-card); color: var(--tt); font: 600 12px var(--sans); cursor: pointer; text-decoration: none; }
.sqc-mini:hover { border-color: var(--tc); }
.sqc .sqc-mini .jb-ico { width: 13px; height: 13px; }
.sqc-hook { position: absolute; right: -8px; top: calc(50% - 8px); width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; background: var(--sq-card); border: 2.5px solid var(--tc); cursor: crosshair; opacity: 0; transition: opacity .15s, transform .15s; touch-action: none; }
.sqc-card:hover .sqc-hook, .sqc-card.sel .sqc-hook, .sqc.wiring .sqc-hook { opacity: 1; }
.sqc-hook:hover { transform: scale(1.25); background: var(--tc); }
.sqc-card.lost .sqc-hook { display: none; }
.sqc-wire { fill: none; stroke-width: 2.4; stroke-dasharray: 6 6; stroke: var(--tc, var(--t0)); }
.sqc-lines .sqc-wire.t0 { stroke: var(--t0); } .sqc-lines .sqc-wire.t1 { stroke: var(--t1); } .sqc-lines .sqc-wire.t2 { stroke: var(--t2); }
.sqc-lines .sqc-wire.t3 { stroke: var(--t3); } .sqc-lines .sqc-wire.t4 { stroke: var(--t4); } .sqc-lines .sqc-wire.t5 { stroke: var(--t5); }
.sqc.wiring, .sqc.wiring * { cursor: crosshair !important; user-select: none; }
.sqc-plus { position: absolute; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 1.5px solid var(--tc); background: var(--sq-card); color: var(--tt); cursor: pointer; opacity: 0; transform: scale(.8); transition: opacity .15s, transform .15s; box-shadow: var(--sq-shadow); }
.sqc .sqc-plus .jb-ico { width: 14px; height: 14px; }
.sqc-lane:hover ~ .sqc-plus, .sqc-board:hover .sqc-plus { opacity: .55; transform: none; }
.sqc-plus:hover, .sqc-plus:focus-visible { opacity: 1 !important; background: var(--tc); color: #fff; transform: scale(1.1) !important; }
.sqc.blocking .sqc-plus, .sqc.wiring .sqc-plus { display: none; }
.sqc-rename { width: 100%; box-sizing: border-box; margin: 0 -4px; padding: 1px 4px; border: 1.5px solid var(--tc); border-radius: 6px; background: var(--sq-card); color: var(--sq-ink); font: 700 15px var(--sans); outline: none; }
.sqc-card.dragging { opacity: .4; }
.sqc-card.drop-l { box-shadow: -6px 0 0 -2px var(--tc), var(--sq-pop); }
.sqc-card.drop-r { box-shadow: 6px 0 0 -2px var(--tc), var(--sq-pop); }
.sqc-card.drop-on { border-color: var(--tc); border-style: dashed; background: color-mix(in srgb, var(--tc) 8%, var(--sq-card)); transform: translateY(-2px) scale(1.03); }
.sqc.blocking .sqc-card:not(.lost) { outline: 2px dashed color-mix(in srgb, var(--tc) 45%, transparent); outline-offset: 4px; }

/* the blocks bar on the board (the editor's bar, on the canvas's own colors) */
.sqc-dock { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 6; display: flex; justify-content: center; pointer-events: none; }
.sqc-dock .vb-dock { position: relative; bottom: auto !important; margin: 0; pointer-events: auto; }
.sqc-dock .vb-dock-row, .sqc-dock .vb-dpop { background: var(--sq-card); border-color: var(--sq-line); box-shadow: var(--sq-pop); }
.sqc-dock .vb-dgrp { border-color: var(--sq-line); }
.sqc-dock .vb-dgrp.trig { background: var(--sq-soft); }
.sqc-dock .vb-tile { color: var(--sq-ink2); }
.sqc-dock .vb-tile:hover, .sqc-dock .vb-dgrp.trig .vb-tile:hover { background: color-mix(in srgb, var(--t0) 10%, var(--sq-card)); color: var(--sq-ink); }
.sqc-dock .vb-tile.trig .jb-ico { color: var(--sq-ink3); }
.sqc-dock .vb-tile.act .jb-ico { color: var(--t0); }
.sqc-dock .vb-dlab, .sqc-dock .vb-dpop-h .jb-muted { color: var(--sq-ink3); }
.sqc-dock .vb-dpop-h b { color: var(--sq-ink); }
.sqc-dock .vb-dpop-grid .vb-tile { border-color: var(--sq-line); }
.sqc-dock .vb-dall { background: var(--sq-ink); color: var(--sq-bg); }
.sqc-dock .vb-dall .jb-ico { stroke: currentColor; }
.sqc.drawer-open .sqc-dock, .sqc.blocking .sqc-dock .vb-dock-row { opacity: .35; }
.sqc.drawer-open .sqc-dock { display: none; }
.sqc-legend { position: relative; z-index: 1; }

/* the stage editor drawer: the platform's editor, docked on the right of the board */
.sqc-drawer { position: fixed; top: var(--dtop, 0); right: 0; bottom: 0; z-index: 30; width: min(560px, 100vw); box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; background: var(--page, #FBF8F4); color: var(--ink); border: 1px solid var(--sq-line); border-right: 0; border-bottom: 0; border-radius: 18px 0 0 0; box-shadow: -24px 0 60px rgba(15, 23, 42, .18); animation: sqc-in .22s ease-out; }
.sqc-drawer[hidden] { display: none; }
@keyframes sqc-in { from { transform: translateX(24px); opacity: 0; } }
.sqc-dh { display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px 22px; border-bottom: 1px solid var(--line, #E8E1D8); background: var(--card, #fff); }
.sqc-dh > div:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sqc-dh .k { font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--tt); }
.sqc-dh b { font-size: 20px; line-height: 1.2; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sqc-dh .sqc-pm { color: var(--ink-3); }
.sqc-dh .sqc-ppl a { background: var(--chip-soft, #F1ECE6); color: var(--ink-2); }
.sqc-dh .sqc-x { color: var(--ink-3); }
.sqc-dh .sqc-x:hover { background: var(--chip-soft, #F1ECE6); color: var(--ink); }
.sqc-db { flex: 1; overflow: auto; padding: 14px 18px 0; display: flex; flex-direction: column; }
.sqc-db .vb-canvas { flex: 1; }
.sqc-db .vb-canvas:has(.vb-dock) { min-height: 0; }
.vb-embedbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.sqc-db .vb-dock-row .vb-tile span, .sqc-db .vb-dlab { display: none; }
.sqc-db .vb-dock-row .vb-tile { padding: 9px; }
.sqc-db .vb-dock-row .vb-tile .jb-ico { width: 20px; height: 20px; }
.sqc-db .vb-dpop-grid .vb-tile span { display: inline; }
.sqc.drawer-open .sqc-stage { margin-right: min(560px, 100vw); }
@media (max-width: 1100px) { .sqc.drawer-open .sqc-stage { margin-right: 0; } }
/* the Help / AI Helper tab sits in the bottom-right corner: the legend leaves it room */
body:has(.jb-help.min) .sqc-legend { margin-right: 236px; }
@media (max-width: 760px) { body:has(.jb-help.min) .sqc-legend { margin-right: 0; margin-bottom: 64px; } }

@media (max-width: 760px) {
  .sqc { margin: 0 -12px; border-radius: 0; padding: 12px; }
  .sqc-tools { width: 100%; }
  .sqc-live, .sqc-zoom span { display: none; }
  .sqc-panel { left: 12px; right: 12px; bottom: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .sqc-card, .sqc-live.on i { transition: none; animation: none; } }
.sqc-ident { display: flex; align-items: center; gap: 12px; }
.sqc-back { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--sq-line); background: var(--sq-card); color: var(--sq-ink2); text-decoration: none; }
.sqc-back:hover { color: var(--sq-ink); border-color: var(--sq-ink3); }
.sqc-back .jb-ico { width: 18px; height: 18px; }

/* a slide-out opened from the stage drawer sits beside it, so the drawer (and the placeholder where a block landed)
   stays in view */
@media (min-width: 1100px) {
  html:has(.sqc.drawer-open) .jb-scrim.right { padding-right: min(560px, 100vw); background: linear-gradient(to left, transparent min(560px, 100vw), rgba(15, 23, 42, .32) 0); }
  html:has(.sqc.drawer-open) .jb-scrim.right .jb-sheet.jb-drawer { width: min(480px, calc(100vw - 600px)); border-radius: 18px 0 0 18px; box-shadow: -24px 0 60px rgba(15, 23, 42, .22); border-right: 1px solid var(--line, #E8E1D8); }
}
