/* ============================================================
   Buddy Board — Teaching Whiteboard
   ============================================================ */

:root {
  --bg: #eef1f7;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e5eaf2;
  --line-2: #dbe3ee;
  --brand: #1459ad;
  --brand-dark: #0b3979;
  --brand-soft: #eaf2fc;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .10);
  --topbar-h: 62px;
  --font: "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; }
[hidden] { display: none !important; }

svg { display: block; }

/* ---------------- Top bar ---------------- */

.topbar {
  flex: 0 0 auto;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  background: linear-gradient(140deg, #1d6ac4, #0b3979);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(20, 89, 173, .28);
}

.brand-mark svg { width: 20px; height: 20px; }

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.02em;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}

.brand-name span {
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .01em;
  color: var(--faint);
  margin-top: 2px;
}

.tools {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 auto;
  padding: 5px;
  border-radius: 14px;
  background: #f3f6fb;
  overflow-x: auto;
  scrollbar-width: none;
}

.tools::-webkit-scrollbar { display: none; }

.tool {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: #475569;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s, transform .1s;
}

.tool svg { width: 20px; height: 20px; }

.tool:hover { background: #e7ecf5; color: var(--ink); }

.tool:active { transform: scale(.94); }

.tool.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .34);
}

.tool:disabled {
  opacity: .32;
  cursor: default;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.sep {
  width: 1px;
  height: 22px;
  flex: 0 0 1px;
  background: var(--line-2);
  margin: 0 5px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}

.btn svg { width: 17px; height: 17px; }

.btn:hover { border-color: #c7d2fe; background: #f8faff; color: var(--brand-dark); }

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .25);
}

.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.btn .caret { width: 13px; height: 13px; opacity: .7; }

.icon-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 10px;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.icon-btn:hover { background: #f8faff; border-color: #c7d2fe; }

.icon-btn svg { width: 19px; height: 19px; }

.icon-btn.sm {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  border-color: transparent;
  background: transparent;
  color: var(--faint);
}

.icon-btn.sm:hover { background: #eef2ff; color: var(--brand); }

.only-mobile { display: none; }

/* ---------------- Workspace ---------------- */

.workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  position: relative;
}

/* ---------------- Sidebar ---------------- */

.sidebar {
  flex: 0 0 192px;
  width: 192px;
  min-height: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 25;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 12px 6px 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
}

.sidebar-head b {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 5px;
  border-radius: 5px;
  background: #eef2ff;
  color: var(--brand-dark);
  letter-spacing: 0;
  font-size: 10.5px;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 10px 8px;
  padding: 4px 5px 4px 7px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #f8fafc;
}

.page-jump .page-now {
  font-size: 10.5px;
  color: var(--faint);
  font-weight: 600;
  white-space: nowrap;
}

.page-jump input {
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: 600 12px var(--font);
  color: var(--ink);
  text-align: center;
  -moz-appearance: textfield;
}

.page-jump input::-webkit-outer-spin-button,
.page-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.page-jump input:focus { outline: 2px solid #c7d2fe; outline-offset: 0; }

.page-jump button {
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font: 700 11px var(--font);
  cursor: pointer;
}

.page-jump button:hover { background: #e0e7ff; }

.page-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding: 0;
  scrollbar-gutter: stable;
}

.page-list-spacer {
  width: 1px;
  pointer-events: none;
}

.page-list::-webkit-scrollbar { width: 8px; }
.page-list::-webkit-scrollbar-thumb { background: #d7dfeb; border-radius: 8px; }

.page-item {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 142px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 5px;
  background: #f8fafc;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  contain: layout style paint;
}

.page-item:hover { background: #f1f5fb; }

.page-item.active {
  border-color: #6366f1;
  background: var(--brand-soft);
}

.thumb-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 16 / 9;
}

.thumb-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.page-num {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(15, 23, 42, .55);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.5;
}

.page-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(79, 70, 229, .82);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.5;
}

.page-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 1px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.page-actions {
  display: flex;
  gap: 1px;
  opacity: 0;
  transition: opacity .15s;
}

.page-item:hover .page-actions,
.page-item.active .page-actions { opacity: 1; }

.mini {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--faint);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mini svg { width: 12px; height: 12px; }

.mini:hover { background: #e2e8f0; color: var(--ink-2); }

.page-item.active .mini:hover { background: #dbe4ff; }

.sidebar-foot {
  flex: 0 0 auto;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.new-board {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.new-board svg { width: 16px; height: 16px; }

.new-board:hover { background: var(--brand-soft); border-color: #c7d2fe; color: var(--brand-dark); }

.hint {
  margin: 9px 2px 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--faint);
}

.hint b { color: var(--muted); }

/* ---------------- Canvas ---------------- */

.canvas-area {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  background:
    radial-gradient(circle at 22% -10%, #f5f7ff 0%, rgba(245, 247, 255, 0) 55%),
    var(--bg);
}

.stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px 110px;
  overflow: hidden;
}

.board-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  will-change: transform;
}

canvas#board {
  display: block;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 18px 50px rgba(15, 23, 42, .14),
    0 2px 8px rgba(15, 23, 42, .06);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

canvas#board[data-tool="text"] { cursor: text; }

canvas#board[data-tool="eraser"] { cursor: cell; }

canvas#board[data-tool="select"] { cursor: default; }

canvas#board[data-tool="pan"],
canvas#board.space-pan { cursor: grab; }

canvas#board.grabbing,
canvas#board.space-pan.grabbing { cursor: grabbing; }

.stage.drop-active::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px dashed #6366f1;
  border-radius: 18px;
  background: rgba(238, 242, 255, .55);
  pointer-events: none;
  z-index: 20;
}

.drop-hint {
  display: none;
}

.stage.drop-active .drop-hint {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 21;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(79, 70, 229, .92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
}

/* ---------------- Props bar ---------------- */

.props {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  row-gap: 8px;
  max-width: calc(100% - 24px);
  padding: 9px 13px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .13);
  backdrop-filter: blur(12px);
  z-index: 6;
  transition: opacity .2s;
}

.group { display: flex; align-items: center; gap: 7px; }

.divider {
  width: 1px;
  height: 26px;
  flex: 0 0 1px;
  background: var(--line);
}

.swatches { display: flex; align-items: center; gap: 6px; }

.swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line-2);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}

.swatch:hover { transform: scale(1.14); }

.swatch.active {
  box-shadow: 0 0 0 2px var(--brand);
  transform: scale(1.06);
}

.color-custom {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-2);
  background: conic-gradient(#ef4444, #facc15, #22c55e, #06b6d4, #3b82f6, #a855f7, #ef4444);
  cursor: pointer;
}

.color-custom input {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}


.pen-size-control {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e2e8f0;
  min-width: 220px;
}
.pen-size-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:6px; color:#475569; font-size:12px; font-weight:700; }
.pen-size-heading strong { color:#1e293b; font-variant-numeric:tabular-nums; }
.pen-size-slider { display:block; width:100%; height:18px; margin:0; accent-color:var(--brand); cursor:pointer; }
.eraser-size-control { min-width:200px; }

.sizes { display: flex; align-items: center; gap: 2px; }

.size-btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s;
}

.size-btn:hover { background: #f1f5fb; }

.size-btn.active { background: var(--brand-soft); }

.size-btn i {
  display: block;
  border-radius: 50%;
  background: #475569;
  transition: background .15s;
}

.size-btn.active i { background: var(--brand); }

.ghostbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.ghostbtn svg { width: 15px; height: 15px; }

.ghostbtn:hover { background: #f1f5fb; }

.ghostbtn.active { background: var(--brand-soft); color: var(--brand-dark); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f4f6fb;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.pill small { font-size: 10px; font-weight: 500; color: var(--faint); }

.pill:hover { background: #e9eef8; }

.pill.active { background: var(--brand); color: #fff; }

.pill.active small { color: #e0e7ff; }

/* ---------------- Zoom controls ---------------- */

.zoom-ctl {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  backdrop-filter: blur(10px);
  z-index: 8;
}

.zoom-ctl button {
  height: 28px;
  min-width: 38px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font: 700 14px var(--font);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.zoom-ctl button:hover { background: var(--brand-soft); color: var(--brand-dark); }

.zoom-ctl #zoomFit { font-size: 11px; letter-spacing: .02em; }

.zoom-ctl #zoomLabel {
  padding-top: 3px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--faint);
}

body.presenting .zoom-ctl { display: none; }

/* ---------------- Stopwatch / Timer ---------------- */

.timer-widget {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  user-select: none;
}

.timer-display {
  cursor: grab;
  touch-action: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  backdrop-filter: blur(10px);
  color: var(--ink-2);
  font: 700 15px var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.timer-display:hover { color: var(--brand-dark); border-color: #c7d2fe; }
.timer-display:active { cursor: grabbing; }

.timer-display svg { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; }

.timer-widget.running .timer-display {
  border-color: #c7d2fe;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.timer-widget.done .timer-display {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .35); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.timer-panel {
  margin-top: 8px;
  width: 258px;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.timer-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: #f1f5f9;
}

.timer-tabs button {
  flex: 1 1 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: 700 12px var(--font);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.timer-tabs button.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.timer-big {
  margin: 12px 0 10px;
  text-align: center;
  font: 700 34px var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--ink);
}

.timer-widget.done .timer-big { color: #dc2626; }

.timer-set { margin-bottom: 10px; }

.timer-set-label {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.timer-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.timer-inputs input {
  width: 62px;
  padding: 7px 8px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 700 15px var(--font);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.timer-inputs input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}

.timer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.timer-presets button {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--ink-2);
  font: 600 11px var(--font);
  cursor: pointer;
}

.timer-presets button:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: #c7d2fe; }

.timer-actions { display: flex; gap: 6px; }

.timer-actions button {
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font: 700 12px var(--font);
  cursor: pointer;
}

.timer-actions button:hover { background: #f1f5f9; }

.timer-actions .timer-primary {
  flex: 1 1 auto;
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.timer-actions .timer-primary:hover { background: var(--brand-dark); }

.timer-widget.done .timer-actions .timer-primary { border-color: #dc2626; background: #dc2626; }

.timer-hint {
  margin: 9px 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--faint);
}

body.presenting .timer-widget { z-index: 40; }

/* ---------------- Busy overlay ---------------- */

.busy {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .28);
  backdrop-filter: blur(2px);
}

.busy-card {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(90vw, 480px);
  padding: 16px 22px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  border: 3px solid #e0e7ff;
  border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Export menu ---------------- */

.menu-wrap { position: relative; }

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  animation: pop .12s ease-out;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.menu button {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu button:hover { background: var(--brand-soft); }

.menu b { font-size: 13px; font-weight: 600; color: var(--ink); }

.menu span { font-size: 11px; color: var(--faint); }

/* ---------------- Text editor ---------------- */

.text-editor:empty::before {
  content: "Yahan likhein…";
  color: #94a3b8;
  pointer-events: none;
}

.text-editor {
  position: absolute;
  z-index: 40;
  padding: 2px 5px;
  border-radius: 4px;
  outline: 2px dashed #6366f1;
  outline-offset: 2px;
  background: rgba(255, 255, 255, .7);
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 2ch;
  max-width: 78%;
  cursor: text;
  caret-color: var(--brand);
}

/* ---------------- Present mode ---------------- */

body.presenting .topbar,
body.presenting .sidebar { display: none; }

body.presenting .stage { padding: 0; }

body.presenting canvas#board {
  border-radius: 0;
  box-shadow: none;
}

body.presenting .props {
  opacity: .96;
  left: 50%;
  bottom: 18px;
  max-width: calc(100vw - 28px);
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  z-index: 50;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .24);
}

body.presenting .props:hover,
body.presenting .props:focus-within { opacity: 1; }

body.presenting .page-tools { display: flex; }
body:not(.presenting) .page-tools { display: flex; }
.present-page-count {
  min-width: 42px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.present-page-count b { color: var(--brand-dark); }
body.presenting .timer-widget { position: absolute; top: 14px; left: 14px; }
body.presenting .timer-panel { max-height: calc(100vh - 90px); overflow-y: auto; }

.exit-present {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 60;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.exit-present svg { width: 15px; height: 15px; }

.exit-present:hover { background: rgba(15, 23, 42, .9); }

body.presenting .exit-present { display: inline-flex; }

/* ---------------- Toast & boot error ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 102px;
  transform: translate(-50%, 12px);
  padding: 10px 16px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.boot-error {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 200;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font: 12.5px/1.5 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  box-shadow: 0 14px 40px rgba(153, 27, 27, .18);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1180px) {
  .brand-name span { display: none; }
  .btn .btn-label { display: none; }
  .btn { padding: 0 10px; }
}

@media (max-width: 900px) {
  .only-mobile { display: grid; }
  .brand-name { display: none; }

  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-104%);
    transition: transform .22s ease;
    box-shadow: 16px 0 40px rgba(15, 23, 42, .14);
    border-radius: 0 14px 14px 0;
  }

  body.show-pages .sidebar { transform: none; }

  .stage { padding: 14px 14px 104px; }

  .topbar { gap: 8px; padding: 0 10px; }
  .tools { padding: 4px; }
  .tool { width: 36px; height: 36px; flex-basis: 36px; }
  .sep { margin: 0 2px; }
}

@media (max-width: 560px) {
  .brand-mark { display: none; }
  .props { gap: 7px; padding: 8px 10px; bottom: 10px; }
  .swatch { width: 19px; height: 19px; }
  .ghostbtn span { display: none; }
  .stage { padding-bottom: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Buddy Board presentation: canvas stays clean; leave only the floating tool dock. */
body.presenting .exit-present { display: none; }


/* Buddy Board refinement: compact tool strip, slide drawer and circular timer */
.color-window-btn {
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  outline: 1px solid var(--line-2);
  border-radius: 10px;
  background: conic-gradient(#ef4444, #facc15, #22c55e, #06b6d4, #3b82f6, #a855f7, #ef4444);
  box-shadow: 0 2px 7px rgba(15,23,42,.12);
}
.color-window-btn input {
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.page-list { scroll-behavior: smooth; }

.timer-widget { align-items: center; }
.timer-display {
  width: 76px;
  height: 76px;
  padding: 7px;
  border-radius: 50%;
  border: 3px solid #ef4444;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15,23,42,.18);
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: #b91c1c;
  font-size: 12px;
}
.timer-display svg { width: 19px; height: 19px; color: #dc2626; }
.timer-widget.running .timer-display {
  border-color: #dc2626;
  background: #fff7f7;
  color: #b91c1c;
}
.timer-widget.countdown-mode .timer-display {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220,38,38,.10), 0 5px 18px rgba(15,23,42,.18);
}
.timer-widget.done .timer-display { background: #fee2e2; }
.timer-panel { width: 276px; }
.timer-big {
  width: 156px;
  height: 156px;
  margin: 14px auto;
  border: 9px solid #dc2626;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #fff 62%, #fff1f2 63%);
  color: #b91c1c;
  font-size: 27px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 5px rgba(220,38,38,.10);
}
.timer-widget.running .timer-big { border-color: #dc2626; }
.timer-widget.done .timer-big { background: #fee2e2; }

body.presenting .sidebar { display: none; }
body.presenting.show-present-pages .sidebar {
  display: flex;
  position: fixed;
  z-index: 70;
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: 220px;
  max-width: min(82vw, 280px);
  height: auto;
  background: rgba(255,255,255,.97);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15,23,42,.28);
}
body.presenting.show-present-pages .page-list { overscroll-behavior: contain; }
body.presenting .props { gap: 7px; }
body.presenting .page-tools { display: flex; }
body.presenting .props .color-window-btn { flex: 0 0 34px; }


/* Reliable vertical slide browsing */
.page-list {
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-behavior: smooth;
  outline: none;
  cursor: default;
}
.page-list:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(99,102,241,.22);
}
.page-list::-webkit-scrollbar { width: 10px; }
.page-list::-webkit-scrollbar-thumb {
  background: #b9c5d8;
  border: 2px solid #f8fafc;
  border-radius: 10px;
}
.page-list::-webkit-scrollbar-thumb:hover { background: #8798b3; }


/* Fullscreen quick tools stay visible even when Eraser is selected */
body.presenting .props #presentPageTools { display: flex !important; }
body.presenting .props #presentPen,
body.presenting .props #presentBrush,
body.presenting .props #presentEraser { display: inline-flex !important; }
body.presenting .props #presentPageTools .ghostbtn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
body.presenting .props #presentPageTools { flex: 0 0 auto; }

/* Slide cards can be reordered by dragging them vertically */
.page-item { user-select: none; }
.page-item[draggable="true"] { cursor: grab; }
.page-item.dragging { opacity: .42; cursor: grabbing; }
.page-item.drag-over {
  border-color: #2563eb;
  background: #eaf1ff;
  transform: scale(.985);
}
.timer-actions {
  justify-content: center;
  margin: -2px auto 12px;
  width: 100%;
}
.timer-actions button { min-width: 64px; }
.timer-actions .timer-primary { min-width: 96px; }


/* Always-visible Start/Pause control directly beneath the floating round timer */
.timer-quick-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 30px;
  margin-top: 7px;
  padding: 5px 16px;
  border: 0;
  border-radius: 18px;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,38,38,.24);
  font: 700 12px var(--font);
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.timer-quick-toggle:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}
.timer-quick-toggle.is-running {
  background: #334155;
  box-shadow: 0 4px 12px rgba(51,65,85,.2);
}
.timer-quick-toggle.is-running:hover { background: #1e293b; }
.timer-quick-toggle:active { transform: scale(.97); }


/* Countdown urgency zones: green 0–70%, yellow 70–90%, red final 10% */
.timer-widget.timer-phase-green .timer-display {
  border-color: #16a34a;
  color: #15803d;
  background: #f0fdf4;
  box-shadow: 0 0 0 4px rgba(22,163,74,.10), 0 5px 18px rgba(15,23,42,.16);
}
.timer-widget.timer-phase-green .timer-display svg { color: #16a34a; }
.timer-widget.timer-phase-yellow .timer-display {
  border-color: #eab308;
  color: #a16207;
  background: #fefce8;
  box-shadow: 0 0 0 4px rgba(234,179,8,.12), 0 5px 18px rgba(15,23,42,.16);
}
.timer-widget.timer-phase-yellow .timer-display svg { color: #ca8a04; }
.timer-widget.timer-phase-red .timer-display {
  border-color: #dc2626;
  color: #b91c1c;
  background: #fff1f2;
  box-shadow: 0 0 0 5px rgba(220,38,38,.14), 0 5px 18px rgba(15,23,42,.18);
}
.timer-widget.timer-phase-red .timer-display svg { color: #dc2626; }
.timer-final-warning {
  margin-bottom: 6px;
  padding: 5px 10px;
  border-radius: 12px;
  background: #dc2626;
  color: #fff;
  font: 800 11px var(--font);
  letter-spacing: .04em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(220,38,38,.22);
  animation: timerPulse 1s ease-in-out infinite;
}
.timer-final-warning[hidden] { display: none !important; }

.timer-widget[hidden] { display: none !important; }
.timer-visibility-toggle.active {
  border-color: #dc2626;
  color: #b91c1c;
  background: #fff1f2;
}


/* Compact slide controls and grouped Pen/Eraser tool menus */
.slide-symbol {
  min-width: 36px;
  padding: 7px 9px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
}
#presentSlides { min-width: 48px; letter-spacing: .06em; }
.tool-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tool-menu-trigger { white-space: nowrap; }
.tool-menu-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 90;
  min-width: 190px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 12px 34px rgba(15,23,42,.2);
  backdrop-filter: blur(12px);
}
.tool-menu-panel[hidden] { display: none !important; }
.tool-menu-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.tool-menu-options .pill { white-space: nowrap; }
.tool-menu-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.tool-menu-label {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}
#colorGroup[hidden], #eraserGroup[hidden] { display: none !important; }
body.presenting .tool-menu-panel { bottom: calc(100% + 12px); }


/* Default floating stopwatch position requested from the reference screenshot */
.timer-widget {
  top: -58px;
  right: 72px;
  left: auto;
  align-items: center;
}
body.presenting .timer-widget {
  top: -58px;
  right: 72px;
  left: auto;
  align-items: center;
}
/* Tool menus are portalled to the viewport while open, so toolbar scrolling
   cannot crop the Pen/Stylus/Highlighter or Eraser options. */
.tool-menu-panel {
  z-index: 9999;
  max-width: min(320px, calc(100vw - 16px));
}


/* Popover menus open fully above the toolbar without the old bottom anchor */
.tool-menu-panel {
  bottom: auto;
  right: auto;
  height: auto;
  width: max-content;
  min-width: 210px;
  max-height: min(70vh, 360px);
  overflow-y: auto;
}


/* Fullscreen toolbar: New Page sits immediately left of Pen; utilities collapse into ^ */
.add-page-tool-group { display: none; }
body.presenting .add-page-tool-group { display: flex; }
.utility-menu-wrap { flex: 0 0 auto; }
.utility-menu-trigger {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.utility-menu-panel { min-width: 132px; }
.utility-menu-panel .tool-menu-options {
  flex-direction: column;
  align-items: stretch;
}
.utility-menu-panel .tool-menu-options button {
  justify-content: flex-start;
  width: 100%;
  white-space: nowrap;
}
.utility-menu-trigger[aria-expanded="true"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #c7d2fe;
}


.utility-background-color {
  min-width: 190px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.utility-background-color .color-window-btn {
  width: 32px;
  height: 32px;
}


/* Royal preset palettes for pen and page background */
.pen-color-picker {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.royal-palette {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.royal-swatch {
  width: 25px;
  height: 25px;
  min-width: 25px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--swatch-color, #4169e1);
  box-shadow: 0 0 0 1px #cbd5e1, 0 2px 5px rgba(15,23,42,.12);
  cursor: pointer;
}
.royal-swatch[data-pen-color="#4169E1"] { background: #4169e1; }
.royal-swatch[data-pen-color="#1E3A8A"] { background: #1e3a8a; }
.royal-swatch[data-pen-color="#6D28D9"] { background: #6d28d9; }
.royal-swatch[data-pen-color="#0F766E"] { background: #0f766e; }
.royal-swatch[data-pen-color="#B91C1C"] { background: #b91c1c; }
.royal-swatch[data-background-color="#FFFFFF"] { background: #fff; }
.royal-swatch[data-background-color="#EAF1FF"] { background: #eaf1ff; }
.royal-swatch[data-background-color="#DCE6FF"] { background: #dce6ff; }
.royal-swatch[data-background-color="#F0E9FF"] { background: #f0e9ff; }
.royal-swatch[data-background-color="#E6F4F1"] { background: #e6f4f1; }
.royal-swatch.active {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
  transform: scale(1.08);
}
.background-royal-palette { gap: 8px; }
.utility-background-color {
  flex-wrap: wrap;
  align-items: center;
}




/* Background swatches sit on the same line as the compact BG label. */
.utility-background-color {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  width: 100%;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.bg-short-label {
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  font-weight: 800;
  letter-spacing: .02em;
}
.background-royal-palette {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}
.background-royal-palette .royal-swatch {
  flex: 0 0 25px;
}
.bg-custom-color {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

/* Default position is only the starting point. Dragging the round timer
   sets inline left/top coordinates, which are intentionally not overridden. */
.timer-widget,
body.presenting .timer-widget {
  position: fixed;
  top: 59%;
  right: 24%;
  bottom: auto;
  left: auto;
  align-items: center;
}
@media (max-width: 900px) {
  .timer-widget,
  body.presenting .timer-widget {
    top: 57%;
    right: 8%;
    bottom: auto;
  }
}
.timer-display {
  cursor: grab;
  touch-action: none;
}
.timer-display:active { cursor: grabbing; }


/* Steno liner control shares the same compact utility-menu row as Grid. */
#linerToggle {
  justify-content: flex-start;
  width: 100%;
  white-space: nowrap;
}
#linerToggle.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #c7d2fe;
}


/* Compact horizontal utility popover: Grid | Liner | Clear | BG palette */
.utility-menu-panel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 16px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px;
}
.utility-menu-panel .tool-menu-options {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.utility-menu-panel .tool-menu-options button {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}
.utility-background-color {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding: 0 0 0 10px;
  border-top: 0;
  border-left: 1px solid var(--line);
}
.bg-short-label {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}
.background-royal-palette {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 6px;
}
.bg-custom-color {
  flex: 0 0 32px;
}


/* V21: two clear rows in the More Tools panel.
   Row 1: Grid | Liner | Clear
   Row 2: BG | color presets | custom picker
*/
.utility-menu-panel {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: flex-start;
  gap: 10px !important;
  width: max-content !important;
  min-width: 300px !important;
  max-width: min(92vw, 420px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  white-space: normal;
}
.utility-menu-panel .tool-menu-options {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start;
  gap: 7px !important;
  width: 100%;
  flex: 0 0 auto !important;
}
.utility-menu-panel .tool-menu-options > button {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0;
  white-space: nowrap;
}
.utility-menu-panel .utility-background-color {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  padding: 10px 0 0 !important;
  margin: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-left: 0 !important;
}
.utility-menu-panel .bg-short-label {
  flex: 0 0 24px !important;
  width: 24px !important;
  min-width: 24px !important;
}
.utility-menu-panel .background-royal-palette {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-end;
  gap: 7px !important;
  min-width: 0;
}
.utility-menu-panel .background-royal-palette .royal-swatch {
  flex: 0 0 25px !important;
}
.utility-menu-panel .bg-custom-color {
  flex: 0 0 32px !important;
}


/* Zoom shortcuts live inside the Pages menu/sidebar. */
.page-zoom-controls {
  display: grid;
  grid-template-columns: 38px 38px minmax(90px, 1fr);
  gap: 7px;
  align-items: center;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
}
.page-zoom-controls button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.page-zoom-controls button:hover {
  background: var(--brand-soft);
  border-color: #c7d2fe;
}
.page-zoom-controls button:active { transform: scale(.97); }
#pageZoomFit {
  padding: 0 10px;
  white-space: nowrap;
  font-size: 12px;
}


/* The Exams Buddy co-branding */
.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: block;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.brand-name span {
  color: #1e3a8a;
  font-weight: 600;
  letter-spacing: 0;
}


/* Temporary password-protected edition login gate */

@media (max-width: 480px) {
  .login-card { padding: 25px 21px 19px; border-radius: 19px; }
}


/* V37 utility popup order and stopwatch context/resize controls */
.utility-menu-panel { min-width: 300px; }
.utility-menu-panel .utility-action-row {
  display: flex; align-items: center; gap: 7px; width: 100%;
}
.utility-menu-panel .utility-action-row button {
  flex: 1 1 auto; min-width: 0; justify-content: center; white-space: nowrap;
}
.utility-menu-panel .utility-media-row { padding-bottom: 8px; }
.utility-menu-panel .utility-board-row {
  padding: 8px 0; border-top: 1px solid var(--line);
}
.utility-menu-panel .utility-background-color {
  width: 100%; min-width: 0; padding-top: 9px; border-top: 1px solid var(--line);
}
.timer-widget {
  box-sizing: border-box;
  min-width: 110px;
  min-height: 40px;
}
.timer-widget.timer-fixed .timer-display { cursor: default; }
.timer-resize-handle {
  position: absolute; right: -5px; bottom: -5px;
  width: 16px; height: 16px; padding: 0;
  border: 0; border-radius: 3px;
  background: linear-gradient(135deg, transparent 0 42%, #64748b 43% 52%, transparent 53% 62%, #64748b 63% 72%, transparent 73%);
  cursor: nwse-resize; touch-action: none; z-index: 4;
}
.timer-resize-handle[hidden] { display: none !important; }
.timer-context-menu {
  position: absolute; z-index: 10050; min-width: 158px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 5px; border: 1px solid var(--line-2); border-radius: 9px;
  background: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.2);
}
.timer-context-menu[hidden] { display: none !important; }
.timer-context-menu button {
  border: 0; border-radius: 6px; background: transparent;
  color: var(--ink); padding: 8px 10px; text-align: left;
  font: 600 12px var(--font); cursor: pointer; white-space: nowrap;
}
.timer-context-menu button:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* V43: import action available in presentation/fullscreen toolbar */
.present-import-button { white-space: nowrap; flex: 0 0 auto; }
body.presenting .present-import-button { display: inline-flex; align-items: center; gap: 5px; }

/* V45: edge-to-edge presentation canvas; no application header/sidebar. */
body.presenting {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body.presenting .topbar,
body.presenting .sidebar { display: none !important; }
body.presenting .canvas-area {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  z-index: 1 !important;
}
body.presenting .stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.presenting .board-wrap { max-width: none; }
body.presenting canvas#board { border-radius: 0 !important; }
body.presenting .props { z-index: 1000 !important; }
html:fullscreen, html:fullscreen body { width: 100%; height: 100%; overflow: hidden; }

/* V46: keep the clean presentation layout active across Import/file-picker focus changes. */
body.presenting .topbar, body.presenting .sidebar { display: none !important; }
body.presenting .app, body.presenting .app-shell, body.presenting .main-layout {
  min-width: 0 !important; min-height: 0 !important;
}
body.presenting .canvas-area, body.presenting .stage {
  inset: 0 !important; margin: 0 !important; padding: 0 !important;
  width: 100vw !important; height: 100vh !important; height: 100dvh !important;
}
body.presenting .present-import-button { display: inline-flex !important; }


/* V48: stopwatch is an independent floating layer above the camera preview. */
#timerWidget.timer-widget {
  position: fixed !important;
  z-index: 10075 !important;
  isolation: isolate;
  touch-action: none;
}
#timerWidget .timer-context-menu {
  z-index: 10095 !important;
}
#timerWidget .timer-resize-handle {
  z-index: 5;
  touch-action: none;
}


/* V50: viewport-rooted stopwatch can reach every edge, including bottom-right. */
body > #timerWidget.timer-widget { position: fixed !important; z-index: 10075 !important; max-width: calc(100vw - 8px); max-height: calc(100dvh - 8px); margin: 0 !important; }

/* V51: full-shell drag target with viewport-safe floating coordinates. */
body > #timerWidget.timer-widget {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  touch-action: none !important;
  user-select: none;
  -webkit-user-select: none;
  z-index: 10075 !important;
}
body > #timerWidget.timer-widget .timer-display { touch-action: none !important; }

/* V52: inline left/top must win over old fixed-position CSS; never use inset !important. */
body > #timerWidget.timer-widget { right: auto !important; bottom: auto !important; }


/* V53: compact floating stopwatch by default; open the full control panel on double-click. */
body > #timerWidget.timer-widget {
  width: max-content !important; height: max-content !important;
  min-width: 0 !important; min-height: 0 !important;
  align-items: flex-start; gap: 0;
}
body > #timerWidget.timer-widget .timer-display {
  box-sizing: border-box; width: 104px; height: 52px; min-width: 92px; min-height: 42px;
  justify-content: center; border-radius: 999px; cursor: grab;
}
body > #timerWidget.timer-widget .timer-display svg { width: 18px; height: 18px; }
body > #timerWidget.timer-widget .timer-quick-toggle { margin-top: 6px; }
body > #timerWidget.timer-widget .timer-panel { width: 276px; max-width: min(276px, calc(100vw - 16px)); }
body > #timerWidget.timer-widget .timer-resize-handle { right: -7px; bottom: -7px; }
body > #timerWidget.timer-widget .timer-panel[hidden] { display: none !important; }


/* V54: circular, high-visibility stopwatch dial; default unlocked and draggable. */
body > #timerWidget.timer-widget .timer-display {
  width: 112px !important; height: 112px !important; min-width: 112px !important; min-height: 112px !important;
  aspect-ratio: 1 / 1; flex: 0 0 112px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 10px !important; border-radius: 50% !important;
  border: 3px solid #15803d !important; background: #fff !important;
  box-shadow: 0 0 0 5px rgba(22,163,74,.12), 0 5px 18px rgba(15,23,42,.18);
  cursor: grab !important; touch-action: none !important;
}
body > #timerWidget.timer-widget .timer-display:active { cursor: grabbing !important; }
body > #timerWidget.timer-widget .timer-display svg { width: 27px !important; height: 27px !important; flex: 0 0 auto; }
body > #timerWidget.timer-widget .timer-display #timerText {
  display: block; font-size: 25px !important; line-height: 1 !important;
  font-weight: 900 !important; letter-spacing: -.5px; white-space: nowrap;
}
body > #timerWidget.timer-widget.timer-fixed .timer-display { cursor: grab !important; }
body > #timerWidget.timer-widget { touch-action: none !important; }

/* V55: compact transport controls under the floating circular stopwatch */
body > #timerWidget.timer-widget .timer-quick-actions { display:flex; align-items:center; justify-content:center; gap:7px; margin-top:7px; }
body > #timerWidget.timer-widget .timer-quick-toggle { margin-top:0; }
body > #timerWidget.timer-widget .timer-quick-restart { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border:0; border-radius:50%; background:#2563eb; color:#fff; font-size:23px; line-height:1; font-weight:700; cursor:pointer; box-shadow:0 4px 12px rgba(37,99,235,.22); }
body > #timerWidget.timer-widget .timer-quick-restart:hover { background:#1d4ed8; transform:rotate(-25deg); }
body > #timerWidget.timer-widget .timer-quick-restart[hidden] { display:none !important; }
.timer-insert-countdown { background:#eef2ff !important; color:#3730a3 !important; border:1px solid #c7d2fe !important; font-weight:700; }

/* V56: timer controls open as a compact left-side overlay, never below the dial. */
body > #timerWidget.timer-widget .timer-panel {
  position: fixed !important;
  left: 14px !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  width: min(320px, calc(100vw - 28px)) !important;
  height: min(340px, calc(100dvh - 28px)) !important;
  max-height: calc(100dvh - 28px) !important;
  overflow: auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  z-index: 10090 !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 48px rgba(15,23,42,.28) !important;
}
body > #timerWidget.timer-widget .timer-panel[hidden] { display:none !important; }
body > #timerWidget.timer-widget .timer-quick-actions { flex-wrap: nowrap; }
body > #timerWidget.timer-widget .timer-more-toggle {
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; border:1px solid #cbd5e1; border-radius:50%;
  background:#fff; color:#334155; font-size:23px; line-height:1;
  font-weight:800; cursor:pointer; box-shadow:0 3px 10px rgba(15,23,42,.12);
}
body > #timerWidget.timer-widget .timer-more-toggle:hover,
body > #timerWidget.timer-widget .timer-more-toggle[aria-expanded="true"] { background:#eef2ff; color:#3730a3; border-color:#a5b4fc; }


/* V60: true edge-to-edge canvas in the Windows desktop presentation window.
   The board canvas is stretched to the available display area to remove side gutters. */
body.presenting canvas#board {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}


/* V61: three-part floating toolbar */
body.presenting .props {
  width: calc(100vw - 40px) !important;
  max-width: 1500px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  overflow: visible !important;
  padding: 10px 14px !important;
}
.dock-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  flex: 0 0 auto;
}
.dock-left { justify-content: flex-start; }
.dock-middle { justify-content: center; }
.dock-right { justify-content: flex-end; }
.board-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  background: #f1f5f9;
  white-space: nowrap;
}
.board-mode-option {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  font-family: inherit; font-size: 11px; line-height: 1.1; font-weight: 700;
  cursor: pointer;
}
.board-mode-option.active {
  color: #1d4ed8;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,.14);
}
.dock-section .page-tools { gap: 5px; }
.dock-section .divider { height: 26px; }
.dock-right #recordingToolbarControls { display: flex; align-items: center; gap: 8px; }
.dock-right #buddyLiveButton { flex: 0 0 auto; }
@media (max-width: 900px) {
  body.presenting .props {
    width: calc(100vw - 12px) !important;
    padding: 7px !important;
    gap: 6px !important;
  }
  .dock-section { gap: 5px; }
  .board-mode-option { padding: 0 6px; font-size: 10px; }
}
@media (max-width: 680px) {
  body.presenting .props { overflow-x: auto !important; justify-content: flex-start !important; }
  .dock-section { flex: 0 0 auto; }
}


/* V62: one-button mode switch and compact, content-sized toolbar groups */
.board-mode-switch, .board-mode-option { display: none !important; }
.board-mode-toggle {
  flex: 0 0 auto;
  width: 42px;
  height: 34px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  color: #334155;
  font-family: inherit; font-size: 15px; line-height: 1; font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
.board-mode-toggle[aria-pressed="true"] {
  color: #fff;
  background: #1d4ed8;
  border-color: #1d4ed8;
}
body.presenting .props {
  width: max-content !important;
  max-width: calc(100vw - 24px) !important;
  justify-content: center !important;
  gap: 18px !important;
}
.dock-section {
  flex: 0 0 auto !important;
  width: max-content;
  gap: 7px !important;
}
.dock-left, .dock-middle, .dock-right { justify-content: center !important; }
.dock-left { gap: 7px !important; }
.dock-middle { gap: 7px !important; }
.dock-right { gap: 7px !important; }
#utilityMenuWrap { display: flex; align-items: center; gap: 7px; }
#recordingToolbarControls { display: flex; align-items: center; gap: 7px; }
#utilityMenuToggle { order: 3; }
#recordingToolbarControls { order: 1; }
#buddyLiveButton { order: 1; }
#toolbarRecordButton { order: 2; }
@media (max-width: 760px) {
  body.presenting .props { gap: 8px !important; }
  .dock-section { gap: 4px !important; }
  .board-mode-toggle { width: 36px; height: 32px; }
}


/* V83 Android WebView compatibility: keep slide navigation and stopwatch
   controls tappable above the presentation canvas in native fullscreen. */
body.presenting.show-present-pages > .sidebar,
body.presenting.show-present-pages .sidebar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  z-index: 10080 !important;
}
body.presenting.show-present-pages .page-list {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  min-height: 0;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}
body > #timerWidget.timer-widget {
  position: fixed !important;
  z-index: 10100 !important;
  pointer-events: auto !important;
}
body > #timerWidget.timer-widget button {
  pointer-events: auto !important;
  touch-action: manipulation;
}
body > #timerWidget.timer-widget .timer-panel {
  z-index: 10110 !important;
}

/* V90: compact unified import-plus control */
.buddy-import-plus { gap: 6px; }
.buddy-import-plus > svg:first-child { width: 17px; height: 17px; }
.buddy-import-plus .btn-label { font-weight: 700; }


/* V91: Android fullscreen page drawer reliability */
@media (max-width: 900px) {
  body.presenting.show-present-pages .sidebar {
    left: max(8px, env(safe-area-inset-left)) !important;
    top: max(8px, env(safe-area-inset-top)) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: min(300px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    z-index: 10050 !important;
    isolation: isolate;
    transform: translateZ(0) !important;
  }
  body.presenting.show-present-pages .page-list {
    min-height: 0 !important; max-height: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
  #presentSlides { min-width: 44px; min-height: 42px; touch-action: manipulation; }
}


/* V112: strict open/close behavior for the presentation slide drawer. */
body.presenting:not(.show-present-pages) .sidebar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.presenting.show-present-pages .sidebar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  -webkit-transform: none !important;
}
body.presenting.show-present-pages .page-list {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}
body.presenting:not(.show-present-pages) .canvas-area,
body.presenting:not(.show-present-pages) .stage {
  width: 100vw !important;
  max-width: 100vw !important;
}
#presentSlides {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
}

/* V114: single page-menu open/close control state. */
#presentSlides.is-open { background:#e8efff !important; color:#1747b8 !important; border-color:#9bb7ff !important; }


/* V115: closed page drawer must be completely absent, including stale inline styles. */
body.presenting:not(.show-present-pages) .sidebar,
body.presenting:not(.show-present-pages) .sidebar .page-list {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.presenting.show-present-pages .sidebar,
body.presenting.show-present-pages .sidebar .page-list {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* V116: large, reliable stopwatch resize grip for Windows mouse and Android touch/stylus. */
body > #timerWidget.timer-widget { overflow: visible !important; }
#timerWidget .timer-resize-handle {
  position: absolute !important;
  right: -9px !important;
  bottom: -9px !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  background: #2457e6 !important;
  box-shadow: 0 2px 9px rgba(15,23,42,.32) !important;
  cursor: nwse-resize !important;
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  z-index: 10110 !important;
}
#timerWidget .timer-resize-handle::after {
  content: "↘";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}
#timerWidget .timer-resize-handle[hidden] { display:none !important; }
#timerWidget.timer-resizing, #timerWidget.timer-resizing * { cursor:nwse-resize !important; }
#timerWidget.timer-resizing .timer-display { transition:none !important; }


/* V118: compact page navigation — previous, add page, next; import is icon-only. */
#presentPageTools #presentAddPage {
  min-width: 38px;
  padding-left: 10px;
  padding-right: 10px;
  font-weight: 700;
}
#presentImportButton {
  min-width: 38px;
  width: 38px;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
  font-size: 21px;
  line-height: 1;
}


/* V120: icon-only Pen, Eraser and Stopwatch controls. */
#penMenuToggle, #eraserMenuToggle, #timerVisibilityToggle {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  font-size: 0 !important;
}
#penMenuToggle svg, #eraserMenuToggle svg, #timerVisibilityToggle svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
}


/* V121: ensure Pen and Stopwatch symbols are visibly rendered in the toolbar. */
#penMenuToggle, #timerVisibilityToggle {
  color: #475569 !important;
  background: #f8fafc !important;
  border: 1px solid #dbe3f0 !important;
  border-radius: 10px !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}
#penMenuToggle .toolbar-symbol, #timerVisibilityToggle .toolbar-symbol {
  display: block !important;
  width: 23px !important;
  height: 23px !important;
  flex: 0 0 23px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}
#timerVisibilityToggle.active { color: #b91c1c !important; background: #fff1f2 !important; }


/* V123: resize grip is a real draggable hit target, not just a decorative icon. */
#timerWidget .timer-resize-handle {
  display: block !important;
  position: absolute !important;
  right: -12px !important;
  bottom: -12px !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  z-index: 2147483000 !important;
  pointer-events: auto !important;
  touch-action: none !important;
  cursor: nwse-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
#timerWidget .timer-display {
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  max-width: none !important;
  transition: none !important;
}
#timerWidget.timer-resizing .timer-resize-handle {
  background: #123fc7 !important;
  box-shadow: 0 0 0 4px rgba(37,99,235,.18), 0 2px 10px rgba(15,23,42,.35) !important;
}


/* V124: force the icon-only toolbar controls to render in every platform shell. */
#penMenuWrap, #eraserMenuWrap {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 0 0 42px !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  overflow: visible !important;
}
#penMenuToggle, #eraserMenuToggle, #timerVisibilityToggle {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  flex: 0 0 42px !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  color: #475569 !important;
  background: #f8fafc !important;
  border: 1px solid #dbe3f0 !important;
  border-radius: 10px !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
#penMenuToggle .lekho-tool-icon,
#eraserMenuToggle .lekho-tool-icon,
#timerVisibilityToggle .lekho-tool-icon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 23px !important;
  height: 23px !important;
  min-width: 23px !important;
  min-height: 23px !important;
  flex: 0 0 23px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}
#timerVisibilityToggle { margin-left: 2px !important; }


/* V125: use font glyphs for Pen and Stopwatch so symbols render consistently
   in Chromium, Android WebView and Windows Electron. */
#penMenuToggle .lekho-tool-glyph,
#eraserMenuToggle .lekho-tool-glyph,
#timerVisibilityToggle .lekho-tool-glyph {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  color: #475569 !important;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Arial Unicode MS", sans-serif !important;
  font-size: 25px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-indent: 0 !important;
}
#penMenuToggle, #eraserMenuToggle, #timerVisibilityToggle {
  color: #475569 !important;
  font-size: 0 !important;
}

/* V126: compact icon-only tool buttons — no visible Pen/Eraser/Stopwatch words. */
#penMenuToggle, #eraserMenuToggle, #timerVisibilityToggle {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
  margin: 0 2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: 0 !important;
}
#penMenuToggle .lekho-tool-glyph,
#eraserMenuToggle .lekho-tool-glyph,
#timerVisibilityToggle .lekho-tool-glyph {
  display: inline-flex !important;
  width: 26px !important;
  height: 26px !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  line-height: 1 !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* V127: keep the Stopwatch toolbar button present; JS preserves its icon span. */
#stopwatchToolWrap {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: auto !important;
  min-width: 46px !important;
  height: 42px !important;
  overflow: visible !important;
}
#stopwatchToolWrap #timerVisibilityToggle {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 0 0 42px !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
}
#timerVisibilityToggle .lekho-tool-glyph { display:inline-flex !important; visibility:visible !important; opacity:1 !important; }

/* V135 Phase 1: professional compact header and backup/save-state affordances. */
body:not(.presenting) .topbar { gap: 8px; }
body:not(.presenting) .actions { gap: 5px; }
body:not(.presenting) .actions .btn { border-radius: 10px; }
.buddy-digital-board-backup-btn { flex: 0 0 auto; }
.lekho-save-status { display:inline-flex; align-items:center; white-space:nowrap; font-size:11px; color:#64748b; padding:4px 6px; border-radius:8px; background:#f1f5f9; }
.lekho-save-status[data-status="saved"] { color:#166534; background:#ecfdf5; }
.lekho-save-status[data-status="saving"] { color:#1d4ed8; background:#eff6ff; }
.lekho-save-status[data-status="error"] { color:#b91c1c; background:#fef2f2; }
@media(max-width:1200px) { .lekho-save-status { display:none; } .buddy-digital-board-backup-btn .btn-label { display:none; } }
@media(max-width:760px) { .buddy-digital-board-backup-btn { min-width:40px; } }


/* V136 Phase 2: compact presenter pointer controls and overlays. */
.utility-presenter-row { display:flex; align-items:center; gap:6px; }
.utility-presenter-row .ghostbtn { min-height:34px; padding:5px 9px; font-size:12px; }
.utility-presenter-row .ghostbtn.active { background:#dbeafe; color:#1d4ed8; border-color:#93c5fd; }
#lekhoLaserPointer {
  position:fixed; left:50%; top:50%; width:18px; height:18px;
  border-radius:50%; background:#ef2222; border:2px solid #fff;
  box-shadow:0 0 0 2px rgba(185,28,28,.55),0 0 18px rgba(239,34,34,.9);
  transform:translate(-50%,-50%); z-index:2147483000;
  pointer-events:none; opacity:0; transition:opacity .08s;
}
#lekhoLaserPointer.active { opacity:1; }
#lekhoSpotlight {
  position:fixed; inset:0; z-index:2147482000; pointer-events:none;
  opacity:0; transition:opacity .12s;
  background:radial-gradient(circle 115px at var(--spot-x,50%) var(--spot-y,50%),
    transparent 0 78px, rgba(0,0,0,.70) 118px);
}
#lekhoSpotlight.active { opacity:1; }


/* V136 Phase 2: compact presenter pointer controls and overlays. */
.utility-presenter-row { display:flex; align-items:center; gap:6px; }
.utility-presenter-row .ghostbtn { min-height:34px; padding:5px 9px; font-size:12px; }
.utility-presenter-row .ghostbtn.active { background:#dbeafe; color:#1d4ed8; border-color:#93c5fd; }
#lekhoLaserPointer {
  position:fixed; left:50%; top:50%; width:18px; height:18px;
  border-radius:50%; background:#ef2222; border:2px solid #fff;
  box-shadow:0 0 0 2px rgba(185,28,28,.55),0 0 18px rgba(239,34,34,.9);
  transform:translate(-50%,-50%); z-index:2147483000;
  pointer-events:none; opacity:0; transition:opacity .08s;
}
#lekhoLaserPointer.active { opacity:1; }
#lekhoSpotlight {
  position:fixed; inset:0; z-index:2147482000; pointer-events:none;
  opacity:0; transition:opacity .12s;
  background:radial-gradient(circle 115px at var(--spot-x,50%) var(--spot-y,50%),
    transparent 0 78px, rgba(0,0,0,.70) 118px);
}
#lekhoSpotlight.active { opacity:1; }


/* Buddy Digital Board V137: draggable classroom measuring tools */
.lekho-measure-overlay[hidden] { display: none !important; }
.lekho-measure-overlay {
  position: fixed; z-index: 9997; touch-action: none; cursor: grab;
  user-select: none; color: #172554; font: 12px/1.2 Arial, sans-serif;
}
#lekhoRuler {
  left: 24%; top: 38%; width: min(52vw, 620px); height: 54px;
  border: 1px solid #b7791f; border-radius: 5px;
  background: linear-gradient(to bottom, rgba(255,248,220,.96), rgba(255,236,179,.88));
  box-shadow: 0 3px 12px rgba(0,0,0,.22);
  background-image: repeating-linear-gradient(to right, transparent 0 9px, #76551c 9px 10px, transparent 10px 19px, #76551c 19px 20px, transparent 20px 49px, #76551c 49px 50px), linear-gradient(to bottom, rgba(255,248,220,.96), rgba(255,236,179,.88));
  background-size: 100% 17px, 100% 100%; background-repeat: no-repeat; background-position: left bottom, left top;
}
#lekhoRuler .measure-zero { position:absolute; left:7px; top:5px; font-weight:bold; }
#lekhoRuler .measure-end { position:absolute; right:7px; top:5px; font-weight:bold; }
#lekhoProtractor {
  left: 32%; top: 30%; width: 320px; height: 165px;
  border: 2px solid rgba(37,99,235,.85); border-bottom: 0;
  border-radius: 165px 165px 0 0;
  background: repeating-conic-gradient(from 270deg at 50% 100%, rgba(37,99,235,.7) 0deg 0.45deg, transparent .45deg 5deg), rgba(219,234,254,.66);
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}
#lekhoProtractor:after { content:""; position:absolute; left:50%; bottom:-2px; height:2px; width:100%; background:#2563eb; transform:translateX(-50%); }
.protractor-degree { position:absolute; bottom:9px; left:50%; transform:translateX(-50%); white-space:nowrap; font-weight:700; color:#1e40af; }


/* Buddy Digital Board V138: math equation editor and draggable geometry compass */
.lekho-compass-overlay[hidden], .lekho-math-dialog[hidden] { display:none !important; }
.lekho-compass-overlay {
  position:fixed; z-index:9998; left:42%; top:35%; width:150px; height:190px;
  touch-action:none; cursor:grab; user-select:none;
}
.lekho-compass-overlay .compass-hinge {
  position:absolute; left:63px; top:5px; width:24px; height:24px; border-radius:50%;
  background:linear-gradient(135deg,#64748b,#1e293b); border:2px solid #e2e8f0; z-index:3;
}
.lekho-compass-overlay .compass-leg {
  position:absolute; top:23px; width:9px; height:145px; border-radius:8px;
  background:linear-gradient(90deg,#64748b,#e2e8f0,#475569); transform-origin:top center;
}
.compass-leg-left { left:70px; transform:rotate(-18deg); }
.compass-leg-right { left:80px; transform:rotate(18deg); }
.lekho-compass-overlay .compass-needle {
  position:absolute; left:50px; top:157px; width:0; height:0;
  border-left:7px solid transparent; border-right:7px solid transparent; border-top:25px solid #334155;
}
.lekho-compass-overlay .compass-pencil {
  position:absolute; left:96px; top:155px; width:8px; height:29px; border-radius:2px;
  background:#f59e0b; transform:rotate(18deg);
}
.lekho-math-dialog {
  position:fixed; z-index:10010; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(440px,calc(100vw - 28px)); padding:16px; border-radius:12px;
  background:var(--panel-bg,#fff); color:var(--text-color,#172033);
  border:1px solid rgba(100,116,139,.45); box-shadow:0 14px 50px rgba(0,0,0,.28);
}
.lekho-math-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.lekho-math-head button { font-size:24px; border:0; background:transparent; cursor:pointer; }
.lekho-math-dialog label { display:block; margin:8px 0 5px; font-size:13px; }
.lekho-math-dialog textarea { width:100%; box-sizing:border-box; resize:vertical; padding:10px; border:1px solid #94a3b8; border-radius:8px; font:16px/1.5 Arial,sans-serif; }
.lekho-math-symbols,.lekho-math-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.lekho-math-symbols button,.lekho-math-actions button { padding:7px 11px; border:1px solid #94a3b8; border-radius:7px; background:var(--button-bg,#f1f5f9); color:inherit; cursor:pointer; }
.lekho-math-actions { justify-content:flex-end; }


/* Buddy Digital Board V139: adjustable geometry compass */
.lekho-compass-overlay .compass-adjust {
  position:absolute; left:50%; top:190px; transform:translateX(-50%);
  width:190px; padding:7px 10px; border:1px solid #94a3b8; border-radius:9px;
  background:rgba(255,255,255,.96); color:#1e293b; box-shadow:0 3px 10px rgba(0,0,0,.16);
  cursor:default; font:12px Arial,sans-serif;
}
.compass-adjust label { display:flex; justify-content:space-between; align-items:center; gap:8px; font-weight:600; }
.compass-adjust input { display:block; width:100%; margin:7px 0 0; cursor:pointer; }
.compass-adjust output { font-variant-numeric:tabular-nums; color:#1d4ed8; }


/* V141: top-right close control for Android WebView and browser builds */
.lekho-top-close-button {
  min-width:34px !important; width:34px; height:34px; padding:0 !important;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:25px; line-height:1; font-weight:500;
  color:#fff !important; background:#dc2626 !important;
  border:0 !important; border-radius:8px !important;
  flex:0 0 auto; margin-left:6px;
}
.lekho-top-close-button:hover { background:#b91c1c !important; }


/* Buddy Digital Board floating movable tool palette */
.tools.lekho-floating-tools{
  position:fixed!important;z-index:10050!important;left:50%;top:78px;
  margin:0!important;max-width:calc(100vw - 18px);max-height:calc(100vh - 24px);
  overflow:auto!important;box-shadow:0 10px 30px #0f172a30;
  border:1px solid #cbd5e1;touch-action:pan-x pan-y;
}
.tools.lekho-floating-tools.is-vertical{left:14px;top:110px;flex-direction:column;align-items:stretch;max-width:76px;max-height:calc(100vh - 130px);overflow-y:auto!important;overflow-x:hidden!important}
.tools.lekho-floating-tools.is-vertical .sep{width:100%;height:1px;min-height:1px;margin:3px 0}
.tools .lekho-tools-grip{flex:0 0 30px;width:30px;height:30px;border:0;border-radius:8px;background:#dbeafe;color:#1e40af;font-weight:900;cursor:move;touch-action:none}
.tools .lekho-tools-orient{flex:0 0 30px;width:30px;height:30px;border:0;border-radius:8px;background:#e2e8f0;color:#334155;font-weight:900;cursor:pointer}
.tools.lekho-floating-tools.is-vertical .lekho-tools-grip,.tools.lekho-floating-tools.is-vertical .lekho-tools-orient{align-self:center}
@media(max-width:700px){.tools.lekho-floating-tools{max-width:calc(100vw - 12px)}.tools.lekho-floating-tools.is-vertical{max-height:calc(100vh - 110px)}}


/* Clean floating presentation dock */
.props.lekho-dock-floating{
  position:fixed!important;left:50%;top:auto;bottom:22px;transform:translateX(-50%);
  display:flex!important;align-items:center;justify-content:center;flex-wrap:nowrap;
  gap:10px;padding:9px 12px;max-width:calc(100vw - 24px);width:max-content;
  overflow:visible;z-index:10040!important;
  background:rgba(255,255,255,.96);border:1px solid #dbe4f0;border-radius:20px;
  box-shadow:0 14px 38px rgba(15,23,42,.16),0 2px 8px rgba(15,23,42,.06);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
}
.props.lekho-dock-floating .dock-section{gap:7px}
.props.lekho-dock-floating .ghostbtn{border-radius:11px;transition:background .15s,box-shadow .15s,transform .15s}
.props.lekho-dock-floating .ghostbtn:hover{background:#eff4ff;box-shadow:0 2px 8px #1e40af18}
.props.lekho-dock-floating .lekho-dock-grip,
.props.lekho-dock-floating .lekho-dock-orient{
  flex:0 0 28px;width:28px;height:28px;padding:0;border:1px solid #dbe4f0;
  border-radius:9px;background:#f1f5f9;color:#475569;font-weight:800;
  display:grid;place-items:center;cursor:pointer;touch-action:none
}
.props.lekho-dock-floating .lekho-dock-grip{cursor:move}
.props.lekho-dock-floating.is-vertical{
  left:16px;top:50%;bottom:auto;transform:translateY(-50%);
  width:auto;max-width:90px;max-height:calc(100vh - 28px);
  flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;
  padding:10px 8px;gap:8px;border-radius:18px
}
.props.lekho-dock-floating.is-vertical .dock-section{flex-direction:column;gap:6px}
.props.lekho-dock-floating.is-vertical .dock-section .page-tools{flex-direction:column}
.props.lekho-dock-floating.is-vertical .divider{width:28px;height:1px;flex:0 0 1px}
.props.lekho-dock-floating.is-vertical .lekho-dock-grip,
.props.lekho-dock-floating.is-vertical .lekho-dock-orient{align-self:center}
.props.lekho-dock-floating.is-vertical .tool-menu-panel{left:calc(100% + 8px);top:0}
.props.lekho-dock-floating.is-dragging{user-select:none;opacity:.94}
@media(max-width:700px){
 .props.lekho-dock-floating{max-width:calc(100vw - 12px);gap:5px;padding:7px 8px;border-radius:16px}
 .props.lekho-dock-floating .dock-section{gap:4px}
 .props.lekho-dock-floating.is-vertical{max-height:calc(100vh - 18px)}
}


/* Vertical dock: keep the Live, Record and More controls on one horizontal row */
.props.lekho-dock-floating.is-vertical #dockRight{
  flex-direction:row!important;align-items:center!important;justify-content:center!important;
  flex-wrap:nowrap!important;gap:7px!important;width:auto;min-width:max-content
}
.props.lekho-dock-floating.is-vertical #dockRight .recording-toolbar-controls{
  display:flex!important;flex-direction:row!important;align-items:center!important;
  justify-content:center!important;gap:7px!important
}
.props.lekho-dock-floating.is-vertical #dockRight #buddyLiveButton,
.props.lekho-dock-floating.is-vertical #dockRight #utilityMenuToggle,
.props.lekho-dock-floating.is-vertical #dockRight .toolbar-record-dot,
.props.lekho-dock-floating.is-vertical #dockRight .toolbar-pause-button,
.props.lekho-dock-floating.is-vertical #dockRight .toolbar-stop-button{
  flex:0 0 auto!important;white-space:nowrap
}
.props.lekho-dock-floating.is-vertical #dockRight .utility-menu-wrap{
  display:flex;flex-direction:row;align-items:center;gap:6px
}


/* Slimmer floating dock profile */
.props.lekho-dock-floating{
  padding:7px 9px;gap:7px;border-radius:17px
}
.props.lekho-dock-floating .dock-section{gap:5px}
.props.lekho-dock-floating .ghostbtn{
  min-width:34px;min-height:34px;padding:5px 7px
}
.props.lekho-dock-floating .lekho-dock-grip,
.props.lekho-dock-floating .lekho-dock-orient{
  width:25px;height:25px;flex-basis:25px
}
.props.lekho-dock-floating.is-vertical{
  max-width:74px;padding:7px 5px;gap:6px;border-radius:15px
}
.props.lekho-dock-floating.is-vertical .dock-section{gap:4px}
.props.lekho-dock-floating.is-vertical .dock-section .page-tools{gap:3px}
.props.lekho-dock-floating.is-vertical .ghostbtn{
  min-width:30px;min-height:30px;padding:4px 5px;border-radius:9px
}
.props.lekho-dock-floating.is-vertical .lekho-dock-grip,
.props.lekho-dock-floating.is-vertical .lekho-dock-orient{
  width:24px;height:24px;flex-basis:24px
}
.props.lekho-dock-floating.is-vertical #dockRight{gap:4px!important}
.props.lekho-dock-floating.is-vertical #dockRight .recording-toolbar-controls{gap:4px!important}
@media(max-width:700px){
 .props.lekho-dock-floating{padding:6px 7px;gap:4px}
 .props.lekho-dock-floating.is-vertical{max-width:68px;padding:6px 4px}
 .props.lekho-dock-floating.is-vertical .ghostbtn{min-width:28px;min-height:28px;padding:3px}
}


/* Keep LIVE / Recording / More aligned with the selected dock orientation */
.props.lekho-dock-floating.is-vertical #dockRight{
  flex-direction:column!important;align-items:center!important;
  justify-content:center!important;flex-wrap:nowrap!important;
  width:auto;min-width:0;gap:4px!important
}
.props.lekho-dock-floating.is-vertical #dockRight .recording-toolbar-controls{
  flex-direction:column!important;align-items:center!important;
  justify-content:center!important;gap:4px!important
}
.props.lekho-dock-floating:not(.is-vertical) #dockRight{
  flex-direction:row!important;align-items:center!important;
  justify-content:flex-end!important;flex-wrap:nowrap!important
}
.props.lekho-dock-floating:not(.is-vertical) #dockRight .recording-toolbar-controls{
  flex-direction:row!important;align-items:center!important;gap:5px!important
}


/* More Tools control follows the floating dock orientation */
.props.lekho-dock-floating.is-vertical #utilityMenuWrap{
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;
  gap:4px!important;width:auto
}
.props.lekho-dock-floating.is-vertical #utilityMenuToggle{
  transform:rotate(90deg);transform-origin:center
}
.props.lekho-dock-floating:not(.is-vertical) #utilityMenuWrap{
  display:flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:center!important;
  gap:5px!important;width:auto
}
.props.lekho-dock-floating:not(.is-vertical) #utilityMenuToggle{
  transform:none
}


/* One combined handle replaces separate move and orientation buttons */
.props.lekho-dock-floating .lekho-dock-handle{
  flex:0 0 27px;width:27px;height:27px;padding:0;
  border:1px solid #dbe4f0;border-radius:9px;
  background:#f1f5f9;color:#475569;font-size:15px;font-weight:900;
  display:grid;place-items:center;cursor:grab;touch-action:none;
  user-select:none;-webkit-user-select:none
}
.props.lekho-dock-floating .lekho-dock-handle:active{cursor:grabbing;background:#e2e8f0}
.props.lekho-dock-floating.is-vertical .lekho-dock-handle{align-self:center}
.props.lekho-dock-floating.is-dragging{user-select:none;opacity:.94}


/* Close button for the Pages / slide sidebar */
.sidebar-head .sidebar-close-button{
  margin-left:auto;margin-right:4px;flex:0 0 28px;width:28px;height:28px;
  min-width:28px;padding:0;border:1px solid #e2e8f0;border-radius:8px;
  background:#f8fafc;color:#64748b;font-size:19px;font-weight:700;
  line-height:1;display:grid;place-items:center
}
.sidebar-head .sidebar-close-button:hover{background:#fee2e2;border-color:#fecaca;color:#b91c1c}
body.hide-pages .sidebar{display:none!important}
body.hide-pages .workspace{grid-template-columns:minmax(0,1fr)!important}


/* V159: compact, centered floating tool controls */
.props.lekho-dock-floating{
  align-items:center!important;justify-content:center!important;
}
.props.lekho-dock-floating.is-vertical{
  align-items:center!important;justify-content:center!important;
  max-width:66px!important;padding:6px 4px!important;gap:5px!important
}
.props.lekho-dock-floating.is-vertical .dock-section{
  align-items:center!important;justify-content:center!important;
  width:100%;gap:4px!important
}
.props.lekho-dock-floating.is-vertical .dock-section .page-tools,
.props.lekho-dock-floating.is-vertical #dockLeft,
.props.lekho-dock-floating.is-vertical #dockMiddle{
  align-items:center!important;justify-content:center!important
}
.props.lekho-dock-floating.is-vertical .ghostbtn,
.props.lekho-dock-floating.is-vertical .board-mode-toggle,
.props.lekho-dock-floating.is-vertical .toolbar-record-dot,
.props.lekho-dock-floating.is-vertical .toolbar-pause-button,
.props.lekho-dock-floating.is-vertical .toolbar-stop-button,
.props.lekho-dock-floating.is-vertical #buddyLiveButton,
.props.lekho-dock-floating.is-vertical #utilityMenuToggle{
  min-width:28px!important;width:28px!important;height:28px!important;
  min-height:28px!important;padding:3px!important;border-radius:9px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  font-size:13px!important;line-height:1!important
}
.props.lekho-dock-floating.is-vertical .present-page-count{font-size:10px!important}
.props.lekho-dock-floating.is-vertical #penMenuToggle,
.props.lekho-dock-floating.is-vertical #eraserMenuToggle,
.props.lekho-dock-floating.is-vertical #timerVisibilityToggle{
  min-width:30px!important;width:30px!important;height:30px!important;
  padding:3px!important;font-size:0!important
}
.lekho-pen-icon{display:block!important;width:19px!important;height:19px!important}
.props.lekho-dock-floating.is-vertical .lekho-pen-icon{width:18px!important;height:18px!important}
.props.lekho-dock-floating.is-vertical .lekho-dock-handle{
  width:24px!important;height:24px!important;flex-basis:24px!important
}


/* Pen icon rendering and Clear action inside Eraser menu */
#penMenuToggle{color:#475569!important;font-size:0!important;line-height:0!important}
#penMenuToggle .lekho-pen-icon{
  display:block!important;visibility:visible!important;opacity:1!important;
  width:23px!important;height:23px!important;flex:0 0 23px!important;
  overflow:visible!important
}
#penMenuToggle .lekho-pen-icon path{stroke:currentColor!important;fill:none!important}
#eraserMenuPanel .eraser-clear-action{
  width:100%;min-height:34px;margin-top:5px;padding:7px 10px;
  display:flex;align-items:center;justify-content:center;gap:6px;
  border:1px solid #fecaca;border-radius:9px;
  background:#fff7f7;color:#b91c1c;font-weight:700;font-size:12px;
  white-space:nowrap
}
#eraserMenuPanel .eraser-clear-action:hover{background:#fee2e2;border-color:#fca5a5}


/* V162: first drawing Tool Box stays pinned at the top; second teaching dock remains floating */
.tools.lekho-floating-tools{
  position:fixed!important;
  top:116px!important;
  bottom:auto!important;
  z-index:10050!important;
}
.tools.lekho-floating-tools:not(.is-vertical){
  left:50%!important;
  transform:translateX(-50%)!important;
}
.tools.lekho-floating-tools.is-vertical{
  left:14px!important;
  top:116px!important;
  bottom:auto!important;
  transform:none!important;
  max-height:calc(100vh - 132px)!important;
}
/* Keep the second #props dock draggable and free-floating at its saved position. */
.props.lekho-dock-floating{
  position:fixed!important;
  z-index:10040!important;
}


/* V163: first drawing toolbar centered vertically and horizontally inside the header */
.topbar{position:relative!important;overflow:visible!important}
.topbar .tools.lekho-floating-tools{
  position:absolute!important;
  top:50%!important;
  left:50%!important;
  bottom:auto!important;
  right:auto!important;
  transform:translate(-50%,-50%)!important;
  margin:0!important;
  z-index:35!important;
  max-width:calc(100% - 420px)!important;
  max-height:calc(var(--topbar-h) - 8px)!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
/* The header toolbar is a single compact horizontal row */
.topbar .tools.lekho-floating-tools.is-vertical{
  left:50%!important;top:50%!important;
  transform:translate(-50%,-50%)!important;
  flex-direction:row!important;align-items:center!important;
  max-width:calc(100% - 420px)!important;
  max-height:calc(var(--topbar-h) - 8px)!important;
  overflow-x:auto!important;overflow-y:hidden!important
}
@media(max-width:900px){
 .topbar .tools.lekho-floating-tools,
 .topbar .tools.lekho-floating-tools.is-vertical{
   max-width:calc(100% - 180px)!important
 }
}
@media(max-width:600px){
 .topbar .tools.lekho-floating-tools,
 .topbar .tools.lekho-floating-tools.is-vertical{
   max-width:calc(100% - 100px)!important
 }
}


/* V164: reserve separate header space for the first toolbar so action/background controls never sit underneath it */
.topbar{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.topbar .brand{
  flex:0 0 auto!important;
  min-width:max-content!important;
}
.topbar .tools.lekho-floating-tools,
.topbar .tools.lekho-floating-tools.is-vertical{
  position:relative!important;
  inset:auto!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  transform:none!important;
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
  max-height:calc(var(--topbar-h) - 8px)!important;
  margin:0!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  z-index:31!important;
}
.topbar .tools.lekho-floating-tools .tool{flex:0 0 34px;width:34px;height:34px}
.topbar .actions{
  position:relative!important;
  z-index:32!important;
  flex:0 0 auto!important;
  min-width:max-content!important;
  margin-left:auto!important;
}
@media(max-width:1150px){
 .topbar{gap:6px!important;padding-left:8px!important;padding-right:8px!important}
 .topbar .brand-name span{display:none}
 .topbar .tools.lekho-floating-tools .tool{flex-basis:30px;width:30px;height:30px}
 .topbar .actions{gap:5px!important}
}
@media(max-width:850px){
 .topbar .brand{display:none!important}
 .topbar .tools.lekho-floating-tools{flex:1 1 45%!important}
 .topbar .actions{flex:0 1 auto!important;min-width:0!important}
}


/* V165: ensure the first Pen tool visibly renders its pencil symbol */
.topbar .tools button.tool[data-tool="pen"]{
  color:#334155!important;
  font-size:0!important;
  line-height:0!important;
}
.topbar .tools button.tool[data-tool="pen"] svg{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:22px!important;
  height:22px!important;
  min-width:22px!important;
  min-height:22px!important;
  overflow:visible!important;
  stroke:currentColor!important;
}
.topbar .tools button.tool[data-tool="pen"] svg path{
  stroke:currentColor!important;
  fill:none!important;
  stroke-width:1.9!important;
}
.topbar .tools button.tool[data-tool="pen"]:hover{
  color:#1d4ed8!important;
  background:#eaf1ff!important;
}


/* V166: clear toolbox symbol on the floating toolbar handle */
.props.lekho-dock-floating .lekho-dock-handle{
  font-size:0!important;
}
.props.lekho-dock-floating .lekho-dock-toolbox-icon{
  display:block!important;width:17px!important;height:17px!important;
  min-width:17px!important;min-height:17px!important;
  color:currentColor!important;overflow:visible!important;
}
.props.lekho-dock-floating .lekho-dock-handle:hover{
  color:#1d4ed8!important;background:#eaf1ff!important;border-color:#bfdbfe!important;
}


/* V167: five selectable pen presets in the Pen tool palette */
#penMenuPanel .tool-menu-options{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:6px!important;
}
#penMenuPanel .tool-menu-options .pill{
  min-width:0!important;
  padding:8px 6px!important;
  white-space:normal!important;
  text-align:center!important;
  font-size:12px!important;
  line-height:1.25!important;
}
@media(max-width:620px){
  #penMenuPanel .tool-menu-options{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* V168 — Modern Pen Tool popover and trigger */
#penMenuWrap{position:relative}
#penMenuToggle{
  position:relative!important;
  min-width:48px!important;min-height:44px!important;
  border:1px solid #d7e2f3!important;border-radius:13px!important;
  background:linear-gradient(145deg,#ffffff,#f0f5ff)!important;
  color:#2448d8!important;
  box-shadow:0 3px 10px rgba(30,64,175,.08),inset 0 1px 0 #fff!important;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease!important;
}
#penMenuToggle:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(37,99,235,.16)!important}
#penMenuToggle[aria-expanded="true"]{
  color:#fff!important;background:linear-gradient(135deg,#3158f5,#4f46e5)!important;
  border-color:#3158f5!important;box-shadow:0 7px 18px rgba(49,88,245,.28)!important
}
#penMenuToggle .lekho-pen-icon{width:22px!important;height:22px!important}
#penMenuToggle::after{
  content:"";display:inline-block;width:7px;height:7px;margin-left:5px;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px);opacity:.8
}
#penMenuPanel.lekho-modern-pen-panel{
  width:min(520px,calc(100vw - 24px))!important;min-width:0!important;
  max-width:calc(100vw - 24px)!important;max-height:min(76vh,430px)!important;
  overflow:visible!important;padding:16px!important;gap:13px!important;
  border:1px solid rgba(191,209,239,.9)!important;border-radius:19px!important;
  background:linear-gradient(160deg,rgba(255,255,255,.99),rgba(246,249,255,.98))!important;
  box-shadow:0 18px 48px rgba(22,42,88,.2),0 3px 10px rgba(37,99,235,.08)!important;
  backdrop-filter:blur(18px)!important
}
.lekho-pen-panel-heading{
  display:flex;flex-direction:column;gap:3px;padding:0 2px 10px;
  border-bottom:1px solid #e4eaf5
}
.lekho-pen-panel-title{
  display:flex;align-items:center;gap:8px;color:#172554;
  font-size:15px;font-weight:800;letter-spacing:-.2px
}
.lekho-pen-heading-icon{
  width:27px;height:27px;display:grid;place-items:center;border-radius:9px;
  background:#eaf0ff;color:#3158e8;font-size:18px
}
.lekho-pen-panel-title small{
  margin-left:auto;padding:4px 7px;border-radius:20px;
  background:#edf2ff;color:#3158d9;font-size:9px;font-weight:800;letter-spacing:.7px
}
.lekho-pen-panel-subtitle{font-size:11px;color:#71809b;padding-left:35px}
#penMenuPanel .tool-menu-options{
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:8px!important;align-items:stretch!important
}
#penMenuPanel .tool-menu-options .pill{
  min-width:0!important;min-height:72px!important;padding:10px 5px!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;
  justify-content:center!important;gap:7px!important;
  border:1px solid #e0e7f2!important;border-radius:13px!important;
  background:linear-gradient(180deg,#fff,#f8faff)!important;
  color:#43516b!important;font-size:11px!important;font-weight:700!important;
  white-space:normal!important;line-height:1.2!important;
  box-shadow:0 2px 5px rgba(30,50,90,.035)!important;
  transition:all .16s ease!important
}
#penMenuPanel .tool-menu-options .pill:hover{
  transform:translateY(-2px);border-color:#9db5ff!important;
  background:#f1f5ff!important;color:#2448d8!important;
  box-shadow:0 6px 14px rgba(49,88,245,.1)!important
}
#penMenuPanel .tool-menu-options .pill.active{
  border:1.5px solid #3158f5!important;background:linear-gradient(145deg,#edf3ff,#e3ebff)!important;
  color:#2448d8!important;box-shadow:0 0 0 2px rgba(49,88,245,.09)!important
}
#penMenuPanel .tool-menu-color{
  padding:11px 2px 2px!important;border-top:1px solid #e4eaf5!important;
  gap:12px!important
}
#penMenuPanel .tool-menu-label{font-size:12px!important;font-weight:800!important;color:#34425d!important}
#penMenuPanel .royal-palette{gap:9px!important}
#penMenuPanel .royal-swatch{
  width:25px!important;height:25px!important;border:2px solid #fff!important;
  box-shadow:0 0 0 1px #d7e0ef,0 2px 5px #1e293b18!important
}
#penMenuPanel .royal-swatch.active{box-shadow:0 0 0 2px #3158f5,0 0 0 4px #dce6ff!important}
#penMenuPanel .pen-size-control{
  padding-top:11px!important;border-top:1px solid #e4eaf5!important
}
#penMenuPanel .pen-size-heading{font-size:12px!important;color:#34425d!important;font-weight:800!important}
#penMenuPanel .pen-size-slider{accent-color:#3158f5!important}
@media(max-width:620px){
 #penMenuPanel.lekho-modern-pen-panel{width:calc(100vw - 16px)!important;padding:12px!important}
 #penMenuPanel .tool-menu-options{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 #penMenuPanel .tool-menu-options .pill{min-height:62px!important;font-size:10px!important}
}


/* V169: force both missing toolbar SVG icons to render visibly */
.props.lekho-dock-floating .lekho-dock-handle{
  color:#334155!important;background:#f1f5f9!important;
}
.props.lekho-dock-floating .lekho-dock-toolbox-icon{
  width:19px!important;height:19px!important;
  display:block!important;opacity:1!important;visibility:visible!important;
  stroke:#334155!important;fill:none!important;
}
.props.lekho-dock-floating .lekho-dock-toolbox-icon rect,
.props.lekho-dock-floating .lekho-dock-toolbox-icon path{
  stroke:#334155!important;fill:none!important;stroke-width:1.9!important;
}
#penMenuToggle{
  color:#334155!important;
  font-size:0!important;
}
#penMenuToggle .lekho-pen-icon{
  display:block!important;visibility:visible!important;opacity:1!important;
  width:23px!important;height:23px!important;flex:0 0 23px!important;
  stroke:#334155!important;fill:none!important;overflow:visible!important;
}
#penMenuToggle .lekho-pen-icon path{
  stroke:#334155!important;fill:none!important;stroke-width:2!important;
}
#penMenuToggle[aria-expanded="true"] .lekho-pen-icon path{stroke:#fff!important}


/* V170: keep the same Toolbox briefcase symbol in both horizontal and vertical dock modes */
.props.lekho-dock-floating .lekho-dock-handle,
.props.lekho-dock-floating.is-vertical .lekho-dock-handle,
.props.lekho-dock-floating:not(.is-vertical) .lekho-dock-handle{
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 36px!important;width:36px!important;height:36px!important;
  min-width:36px!important;min-height:36px!important;padding:0!important;
  color:#334155!important;background:#f1f5f9!important;
  border:1px solid #d7e2f3!important;border-radius:11px!important;
  font-size:0!important;line-height:0!important;overflow:visible!important;
}
.props.lekho-dock-floating .lekho-dock-handle svg.lekho-dock-toolbox-icon,
.props.lekho-dock-floating.is-vertical .lekho-dock-handle svg.lekho-dock-toolbox-icon{
  display:block!important;visibility:visible!important;opacity:1!important;
  width:21px!important;height:21px!important;min-width:21px!important;min-height:21px!important;
  flex:0 0 21px!important;overflow:visible!important;
  stroke:#334155!important;fill:none!important;
}
.props.lekho-dock-floating .lekho-dock-handle svg.lekho-dock-toolbox-icon rect,
.props.lekho-dock-floating .lekho-dock-handle svg.lekho-dock-toolbox-icon path{
  display:inline!important;visibility:visible!important;opacity:1!important;
  stroke:#334155!important;fill:none!important;stroke-width:1.9!important;
}
.props.lekho-dock-floating.is-vertical .lekho-dock-handle{
  align-self:center!important;writing-mode:horizontal-tb!important;transform:none!important;
}


/* V171: choose each pen preset using the same clean pencil icon */
#penMenuPanel .tool-menu-options .pen-type-icon-button{
  min-height:64px!important;height:64px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:10px!important;
  color:#43516b!important;
}
#penMenuPanel .pen-type-icon-button .lekho-pen-type-icon{
  display:block!important;width:27px!important;height:27px!important;
  min-width:27px!important;min-height:27px!important;
  stroke:currentColor!important;fill:none!important;opacity:1!important;visibility:visible!important;
}
#penMenuPanel .pen-type-icon-button.active{
  color:#2448d8!important;border-color:#3158f5!important;
  background:linear-gradient(145deg,#edf3ff,#e3ebff)!important;
  box-shadow:0 0 0 2px rgba(49,88,245,.1)!important;
}
#penMenuPanel .pen-type-icon-button:hover .lekho-pen-type-icon{
  transform:rotate(-7deg);transition:transform .15s ease;
}
@media(max-width:620px){
 #penMenuPanel .tool-menu-options .pen-type-icon-button{height:56px!important;min-height:56px!important}
 #penMenuPanel .pen-type-icon-button .lekho-pen-type-icon{width:24px!important;height:24px!important}
}


/* V172 — Premium Pen Tools redesign: blue glass header + refined selector cards */
#penMenuPanel.lekho-modern-pen-panel{
  width:min(650px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  min-width:0!important;
  padding:0!important;
  gap:0!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.92)!important;
  border-radius:22px!important;
  background:linear-gradient(155deg,#ffffff 0%,#f7faff 58%,#eef4ff 100%)!important;
  box-shadow:0 22px 55px rgba(28,55,115,.22),0 4px 14px rgba(37,99,235,.09)!important;
  backdrop-filter:blur(22px)!important;
}
#penMenuPanel .lekho-pen-panel-heading{
  position:relative!important;
  min-height:84px!important;
  padding:18px 20px 14px 22px!important;
  display:flex!important;flex-direction:column!important;justify-content:center!important;
  gap:5px!important;
  border:0!important;
  background:linear-gradient(112deg,#2563eb 0%,#1748c9 58%,#123da9 100%)!important;
  overflow:hidden!important;
}
#penMenuPanel .lekho-pen-panel-heading:after{
  content:"";position:absolute;right:-45px;top:-105px;width:290px;height:210px;
  border:1px solid rgba(255,255,255,.16);border-radius:50%;
  box-shadow:0 0 0 22px rgba(255,255,255,.045),0 0 0 48px rgba(255,255,255,.035);
  pointer-events:none
}
#penMenuPanel .lekho-pen-panel-title{
  position:relative;z-index:1;gap:10px!important;
  color:#fff!important;font-size:17px!important;font-weight:850!important;
  letter-spacing:-.35px!important
}
#penMenuPanel .lekho-pen-heading-icon{
  width:34px!important;height:34px!important;border-radius:11px!important;
  background:rgba(255,255,255,.17)!important;color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25)!important;font-size:21px!important
}
#penMenuPanel .lekho-pen-panel-title small{
  padding:6px 10px!important;border:1px solid rgba(255,255,255,.22)!important;
  background:rgba(255,255,255,.16)!important;color:#fff!important;
  font-size:9px!important;letter-spacing:.9px!important
}
#penMenuPanel .lekho-pen-panel-subtitle{
  position:relative;z-index:1;padding-left:44px!important;
  color:rgba(255,255,255,.82)!important;font-size:11px!important
}
#penMenuPanel .tool-menu-options{
  padding:16px 17px 14px!important;
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:9px!important;border-bottom:1px solid #e1e9f7!important
}
#penMenuPanel .tool-menu-options .pen-type-icon-button{
  position:relative!important;min-width:0!important;min-height:76px!important;height:76px!important;
  padding:12px 6px!important;border:1px solid #dce5f4!important;
  border-radius:15px!important;background:linear-gradient(180deg,#fff,#f7faff)!important;
  color:#52627d!important;box-shadow:0 3px 9px rgba(24,48,95,.045)!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease!important
}
#penMenuPanel .pen-type-icon-button .lekho-pen-type-icon{
  width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important;
  stroke:currentColor!important;stroke-width:1.9!important
}
#penMenuPanel .tool-menu-options .pen-type-icon-button:hover{
  transform:translateY(-2px)!important;border-color:#9bb7ff!important;
  background:#f1f6ff!important;box-shadow:0 8px 16px rgba(37,99,235,.11)!important
}
#penMenuPanel .tool-menu-options .pen-type-icon-button.active{
  border:1.7px solid #315cf5!important;
  background:linear-gradient(145deg,#eaf1ff,#dce8ff)!important;
  color:#2450e8!important;box-shadow:0 0 0 3px rgba(49,92,245,.10),0 8px 16px rgba(37,99,235,.10)!important
}
#penMenuPanel .tool-menu-options .pen-type-icon-button.active:after{
  content:"✓";position:absolute;right:6px;top:6px;width:17px;height:17px;
  display:grid;place-items:center;border-radius:50%;
  background:#315cf5;color:#fff;font-size:10px;font-weight:900;
  box-shadow:0 2px 5px rgba(37,99,235,.24)
}
#penMenuPanel .tool-menu-color{
  margin:0!important;padding:15px 20px!important;
  display:flex!important;align-items:center!important;gap:16px!important;
  border:0!important;border-bottom:1px solid #e1e9f7!important;
  background:rgba(255,255,255,.48)!important
}
#penMenuPanel .tool-menu-label{
  min-width:58px!important;color:#263957!important;
  font-size:13px!important;font-weight:850!important
}
#penMenuPanel .royal-palette{display:flex!important;align-items:center!important;gap:10px!important}
#penMenuPanel .royal-swatch{
  width:29px!important;height:29px!important;min-width:29px!important;
  border:2px solid #fff!important;border-radius:50%!important;
  box-shadow:0 0 0 1px #d8e2f1,0 3px 7px rgba(15,23,42,.12)!important;
  transition:transform .15s ease,box-shadow .15s ease!important
}
#penMenuPanel .royal-swatch:hover{transform:scale(1.1)!important}
#penMenuPanel .royal-swatch.active{
  box-shadow:0 0 0 2px #315cf5,0 0 0 5px #dce7ff!important
}
#penMenuPanel .color-custom{
  margin-left:auto!important;width:34px!important;height:34px!important;
  border:2px solid #fff!important;border-radius:11px!important;
  box-shadow:0 0 0 1px #d9e3f2,0 3px 8px rgba(15,23,42,.13)!important
}
#penMenuPanel .pen-size-control{
  margin:0!important;padding:14px 20px 17px!important;
  border:0!important;background:rgba(255,255,255,.35)!important
}
#penMenuPanel .pen-size-heading{
  margin-bottom:10px!important;color:#263957!important;
  font-size:13px!important;font-weight:850!important
}
#penMenuPanel .pen-size-heading strong{
  padding:4px 9px;border-radius:20px;background:#eaf0ff;color:#244fe0;
  font-size:12px!important
}
#penMenuPanel .pen-size-slider{
  width:100%!important;height:7px!important;accent-color:#315cf5!important;
  cursor:pointer!important
}
@media(max-width:620px){
 #penMenuPanel.lekho-modern-pen-panel{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;border-radius:17px!important}
 #penMenuPanel .lekho-pen-panel-heading{min-height:74px!important;padding:13px 14px!important}
 #penMenuPanel .tool-menu-options{padding:12px 10px!important;gap:6px!important}
 #penMenuPanel .tool-menu-options .pen-type-icon-button{height:61px!important;min-height:61px!important;border-radius:12px!important}
 #penMenuPanel .pen-type-icon-button .lekho-pen-type-icon{width:24px!important;height:24px!important}
 #penMenuPanel .tool-menu-color{padding:12px!important;gap:9px!important}
 #penMenuPanel .royal-palette{gap:7px!important}
 #penMenuPanel .royal-swatch{width:24px!important;height:24px!important;min-width:24px!important}
 #penMenuPanel .pen-size-control{padding:12px 14px 15px!important}
}


/* V173 — Compact Pen Tools popup: reduce width, height and internal spacing */
#penMenuPanel.lekho-modern-pen-panel{
  width:min(490px,calc(100vw - 20px))!important;
  max-width:calc(100vw - 20px)!important;
  max-height:min(62vh,330px)!important;
  border-radius:17px!important;
}
#penMenuPanel .lekho-pen-panel-heading{
  min-height:61px!important;
  padding:10px 14px 9px 15px!important;
  gap:2px!important;
}
#penMenuPanel .lekho-pen-panel-title{font-size:14px!important;gap:8px!important}
#penMenuPanel .lekho-pen-heading-icon{width:28px!important;height:28px!important;border-radius:9px!important;font-size:17px!important}
#penMenuPanel .lekho-pen-panel-subtitle{font-size:10px!important;padding-left:36px!important}
#penMenuPanel .lekho-pen-panel-title small{padding:4px 8px!important;font-size:8px!important}
#penMenuPanel .tool-menu-options{
  padding:9px 11px!important;gap:6px!important;
}
#penMenuPanel .tool-menu-options .pen-type-icon-button{
  height:52px!important;min-height:52px!important;padding:7px 4px!important;
  border-radius:11px!important;
}
#penMenuPanel .pen-type-icon-button .lekho-pen-type-icon{
  width:23px!important;height:23px!important;min-width:23px!important;min-height:23px!important;
}
#penMenuPanel .pen-type-icon-button.active:after{
  width:14px!important;height:14px!important;right:4px!important;top:4px!important;font-size:9px!important
}
#penMenuPanel .tool-menu-color{
  padding:9px 13px!important;gap:10px!important;min-height:48px!important
}
#penMenuPanel .tool-menu-label{min-width:42px!important;font-size:11px!important}
#penMenuPanel .royal-palette{gap:7px!important}
#penMenuPanel .royal-swatch{width:23px!important;height:23px!important;min-width:23px!important}
#penMenuPanel .color-custom{width:27px!important;height:27px!important;border-radius:8px!important}
#penMenuPanel .pen-size-control{padding:8px 13px 11px!important}
#penMenuPanel .pen-size-heading{margin-bottom:5px!important;font-size:11px!important}
#penMenuPanel .pen-size-heading strong{padding:3px 7px!important;font-size:10px!important}
#penMenuPanel .pen-size-slider{height:5px!important}
@media(max-width:620px){
 #penMenuPanel.lekho-modern-pen-panel{
   width:min(420px,calc(100vw - 14px))!important;
   max-width:calc(100vw - 14px)!important;
   max-height:58vh!important;border-radius:14px!important
 }
 #penMenuPanel .lekho-pen-panel-heading{min-height:56px!important;padding:8px 11px!important}
 #penMenuPanel .tool-menu-options{grid-template-columns:repeat(5,minmax(0,1fr))!important;padding:8px!important;gap:4px!important}
 #penMenuPanel .tool-menu-options .pen-type-icon-button{height:46px!important;min-height:46px!important}
 #penMenuPanel .pen-type-icon-button .lekho-pen-type-icon{width:20px!important;height:20px!important}
 #penMenuPanel .tool-menu-color{padding:8px!important;gap:7px!important}
 #penMenuPanel .royal-palette{gap:5px!important}
 #penMenuPanel .royal-swatch{width:20px!important;height:20px!important;min-width:20px!important}
 #penMenuPanel .pen-size-control{padding:7px 10px 9px!important}
}


/* V174 — smaller Pen Tools popup with readable names under each icon */
#penMenuPanel.lekho-modern-pen-panel{
  width:min(430px,calc(100vw - 20px))!important;
  max-width:calc(100vw - 20px)!important;
  max-height:min(56vh,285px)!important;
  border-radius:15px!important;
}
#penMenuPanel .lekho-pen-panel-heading{
  min-height:53px!important;padding:8px 12px 7px 13px!important;gap:1px!important
}
#penMenuPanel .lekho-pen-panel-title{font-size:13px!important;gap:7px!important}
#penMenuPanel .lekho-pen-heading-icon{width:25px!important;height:25px!important;font-size:15px!important}
#penMenuPanel .lekho-pen-panel-subtitle{font-size:9px!important;padding-left:32px!important}
#penMenuPanel .lekho-pen-panel-title small{padding:3px 7px!important;font-size:7px!important}
#penMenuPanel .tool-menu-options{
  padding:8px 9px!important;gap:5px!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important
}
#penMenuPanel .tool-menu-options .pen-type-icon-button{
  height:61px!important;min-height:61px!important;padding:6px 3px!important;
  border-radius:10px!important;gap:4px!important;
  flex-direction:column!important
}
#penMenuPanel .pen-type-icon-button .lekho-pen-type-icon{
  width:21px!important;height:21px!important;min-width:21px!important;min-height:21px!important;
  flex:0 0 21px!important
}
#penMenuPanel .pen-type-label{
  display:block!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap!important;font-size:9px!important;line-height:1.1!important;
  font-weight:750!important;color:inherit!important
}
#penMenuPanel .tool-menu-options .pen-type-icon-button.active:after{
  width:12px!important;height:12px!important;right:3px!important;top:3px!important;font-size:8px!important
}
#penMenuPanel .tool-menu-color{padding:7px 11px!important;gap:8px!important;min-height:40px!important}
#penMenuPanel .tool-menu-label{min-width:36px!important;font-size:10px!important}
#penMenuPanel .royal-palette{gap:6px!important}
#penMenuPanel .royal-swatch{width:21px!important;height:21px!important;min-width:21px!important}
#penMenuPanel .color-custom{width:25px!important;height:25px!important}
#penMenuPanel .pen-size-control{padding:7px 11px 9px!important}
#penMenuPanel .pen-size-heading{margin-bottom:4px!important;font-size:10px!important}
#penMenuPanel .pen-size-heading strong{padding:2px 6px!important;font-size:9px!important}
#penMenuPanel .pen-size-slider{height:4px!important}
@media(max-width:620px){
 #penMenuPanel.lekho-modern-pen-panel{width:calc(100vw - 14px)!important;max-width:calc(100vw - 14px)!important}
 #penMenuPanel .tool-menu-options{padding:7px 6px!important;gap:3px!important}
 #penMenuPanel .tool-menu-options .pen-type-icon-button{height:56px!important;min-height:56px!important}
 #penMenuPanel .pen-type-label{font-size:8px!important}
 #penMenuPanel .tool-menu-color{padding:7px!important}
 #penMenuPanel .royal-swatch{width:19px!important;height:19px!important;min-width:19px!important}
}


/* V176 — modern compact More Tools panel */
.utility-menu-panel{
  width:min(520px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  padding:0!important;gap:0!important;overflow:hidden!important;
  border:1px solid #d8e5fa!important;border-radius:19px!important;
  background:linear-gradient(155deg,#fff 0%,#f7faff 60%,#eef4ff 100%)!important;
  box-shadow:0 18px 48px rgba(27,55,112,.2),0 3px 12px rgba(37,99,235,.08)!important;
  backdrop-filter:blur(18px)!important;
}
.utility-panel-heading{
  min-height:65px;padding:10px 14px 10px 16px;
  display:flex;align-items:center;gap:10px;
  color:#fff;background:linear-gradient(110deg,#2563eb,#1747bd);
  position:relative;overflow:hidden
}
.utility-panel-heading:after{
  content:"";position:absolute;right:-42px;top:-90px;width:210px;height:170px;
  border:1px solid #ffffff25;border-radius:50%;box-shadow:0 0 0 20px #ffffff0d,0 0 0 42px #ffffff0a;
  pointer-events:none
}
.utility-panel-icon{
  width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;
  border-radius:10px;background:#ffffff24;border:1px solid #ffffff30;
  font-size:20px;font-weight:800
}
.utility-panel-title{font-size:15px;font-weight:850;line-height:1.15;z-index:1}
.utility-panel-title small{display:block;margin-top:4px;font-size:10px;font-weight:500;color:#dbeafe}
.utility-panel-count{
  margin-left:auto;padding:5px 8px;border-radius:20px;z-index:1;
  border:1px solid #ffffff40;background:#ffffff20;color:#fff;
  font-size:8px;font-weight:900;letter-spacing:.7px;white-space:nowrap
}
.utility-menu-panel .utility-action-row{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:7px!important;padding:10px 12px 0!important;
  border:0!important
}
.utility-menu-panel .utility-action-row button{
  min-width:0!important;min-height:48px!important;padding:7px 5px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:5px!important;white-space:normal!important;text-align:center!important;
  border:1px solid #dce6f5!important;border-radius:12px!important;
  background:linear-gradient(180deg,#fff,#f6f9ff)!important;
  color:#344663!important;font-size:11px!important;font-weight:750!important;
  box-shadow:0 2px 6px rgba(25,48,90,.045)!important;
  transition:transform .15s,border-color .15s,box-shadow .15s!important
}
.utility-menu-panel .utility-action-row button:hover{
  transform:translateY(-1px);border-color:#9bb8ff!important;
  background:#eff5ff!important;color:#2451d9!important;
  box-shadow:0 5px 12px rgba(37,99,235,.1)!important
}
.utility-menu-panel .utility-action-row button[aria-pressed="true"],
.utility-menu-panel .utility-action-row button.active{
  border-color:#315cf5!important;background:#eaf1ff!important;color:#2450df!important;
  box-shadow:0 0 0 2px #315cf51a!important
}
.utility-menu-panel .utility-media-row{padding-top:12px!important}
.utility-menu-panel .utility-board-row{
  margin-top:9px!important;padding:10px 12px!important;
  border-top:1px solid #e1e9f7!important;border-bottom:1px solid #e1e9f7!important
}
.utility-menu-panel .utility-board-row button{min-height:42px!important}
.utility-menu-panel .utility-background-color{
  width:auto!important;margin:0 12px!important;padding:10px 2px 12px!important;
  border:0!important;display:flex!important;align-items:center!important;gap:9px!important
}
.utility-menu-panel .bg-short-label{
  min-width:28px!important;font-size:11px!important;font-weight:900!important;color:#344663!important
}
.utility-menu-panel .background-royal-palette{display:flex!important;align-items:center!important;gap:7px!important;flex:1}
.utility-menu-panel .background-royal-palette .royal-swatch{
  width:23px!important;height:23px!important;min-width:23px!important;
  border:2px solid #fff!important;box-shadow:0 0 0 1px #d7e1f0,0 2px 5px #0f172a18!important
}
.utility-menu-panel .background-royal-palette .royal-swatch.active{
  box-shadow:0 0 0 2px #315cf5,0 0 0 4px #dce7ff!important
}
.utility-menu-panel .background-royal-palette .color-custom{
  width:27px!important;height:27px!important;border-radius:9px!important;margin-left:auto!important
}
@media(max-width:520px){
 .utility-menu-panel{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;border-radius:15px!important}
 .utility-panel-heading{min-height:57px;padding:8px 10px!important}
 .utility-menu-panel .utility-action-row{gap:5px!important;padding-left:8px!important;padding-right:8px!important}
 .utility-menu-panel .utility-action-row button{min-height:43px!important;font-size:10px!important}
 .utility-menu-panel .utility-background-color{margin:0 8px!important}
 .utility-menu-panel .background-royal-palette{gap:5px!important}
}


/* V177 — compact, distinctive Quick Tools panel */
.utility-menu-panel{
  width:min(390px,calc(100vw - 18px))!important;
  max-width:calc(100vw - 18px)!important;
  border-radius:16px!important;
}
.utility-panel-heading{
  min-height:53px!important;padding:8px 12px!important;gap:8px!important;
}
.utility-panel-icon{
  width:29px!important;height:29px!important;flex-basis:29px!important;
  border-radius:9px!important;font-size:17px!important
}
.utility-panel-title{font-size:14px!important}
.utility-panel-title small{font-size:9px!important;margin-top:2px!important}
.utility-panel-count{font-size:7px!important;padding:4px 7px!important}
.utility-menu-panel .utility-action-row{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;padding:8px 9px 0!important
}
.utility-menu-panel .utility-action-row button{
  min-height:39px!important;height:39px!important;padding:5px 3px!important;
  border-radius:10px!important;font-size:10px!important;gap:4px!important;
  box-shadow:0 1px 4px rgba(25,48,90,.04)!important
}
.utility-menu-panel .utility-media-row{padding-top:9px!important}
.utility-menu-panel .utility-board-row{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  margin-top:7px!important;padding:7px 9px!important;
  gap:6px!important
}
.utility-menu-panel .utility-board-row button{
  min-height:35px!important;height:35px!important;font-size:10px!important
}
.utility-menu-panel .utility-background-color{
  margin:0 9px!important;padding:7px 1px 9px!important;gap:7px!important
}
.utility-menu-panel .bg-short-label{font-size:10px!important;min-width:22px!important}
.utility-menu-panel .background-royal-palette{gap:6px!important}
.utility-menu-panel .background-royal-palette .royal-swatch{
  width:20px!important;height:20px!important;min-width:20px!important
}
.utility-menu-panel .background-royal-palette .color-custom{
  width:24px!important;height:24px!important
}
@media(max-width:520px){
 .utility-menu-panel{width:calc(100vw - 14px)!important;max-width:calc(100vw - 14px)!important}
 .utility-menu-panel .utility-action-row{gap:4px!important;padding-left:7px!important;padding-right:7px!important}
 .utility-menu-panel .utility-action-row button{font-size:9px!important;min-height:36px!important;height:36px!important}
 .utility-panel-heading{min-height:49px!important;padding:7px 9px!important}
 .utility-menu-panel .utility-background-color{margin:0 7px!important}
}


/* V178 — clean Quick Tools: remove Laser, compact M math menu */
.utility-menu-panel .utility-presenter-row{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.utility-menu-panel .utility-presenter-row #spotlightToggle{
  grid-column:auto!important;
}
.math-tools-wrap{
  position:relative!important;min-width:0!important;display:flex!important;
  align-items:stretch!important;justify-content:stretch!important
}
.utility-menu-panel .math-tools-trigger{
  width:100%!important;height:39px!important;min-height:39px!important;
  padding:4px!important;border:1px solid #cbdaf3!important;border-radius:10px!important;
  background:linear-gradient(145deg,#eef4ff,#dfeaff)!important;color:#214ed3!important;
  font-size:16px!important;font-weight:900!important;letter-spacing:-.5px!important;
  box-shadow:inset 0 1px 0 #fff,0 2px 6px rgba(37,99,235,.09)!important
}
.utility-menu-panel .math-tools-trigger:hover,
.utility-menu-panel .math-tools-trigger.active{
  background:linear-gradient(135deg,#315cf5,#1d4ed8)!important;
  border-color:#315cf5!important;color:#fff!important
}
.math-tools-menu{
  position:absolute!important;left:0!important;top:calc(100% + 6px)!important;
  z-index:10080!important;min-width:145px!important;padding:6px!important;
  border:1px solid #d8e5fa!important;border-radius:12px!important;
  background:#fff!important;box-shadow:0 12px 28px rgba(27,55,112,.18)!important
}
.math-tools-menu[hidden]{display:none!important}
.math-tools-menu #mathEditorToggle{
  width:100%!important;min-height:36px!important;height:auto!important;
  justify-content:flex-start!important;padding:8px 10px!important;
  border:0!important;border-radius:8px!important;background:#f3f7ff!important;
  color:#2448c8!important;font-size:11px!important;font-weight:800!important
}
.math-tools-menu #mathEditorToggle:hover{background:#e6efff!important}


/* V179 — group geometry tools under the M menu */
.math-tools-menu{
  display:flex!important;flex-direction:column!important;gap:5px!important;
  min-width:164px!important;padding:7px!important
}
.math-tools-menu[hidden]{display:none!important}
.math-tools-menu-title{
  padding:4px 7px 6px;color:#7b8ba5;font-size:9px;font-weight:900;
  letter-spacing:.75px;text-transform:uppercase;border-bottom:1px solid #e8eef8;
  margin-bottom:2px
}
.math-tools-menu #rulerToggle,
.math-tools-menu #protractorToggle,
.math-tools-menu #compassToggle,
.math-tools-menu #mathEditorToggle{
  width:100%!important;min-height:34px!important;height:34px!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:8px!important;padding:7px 9px!important;
  border:1px solid transparent!important;border-radius:8px!important;
  background:#f5f8ff!important;color:#344663!important;
  font-size:11px!important;font-weight:750!important;white-space:nowrap!important
}
.math-tools-menu #rulerToggle:hover,
.math-tools-menu #protractorToggle:hover,
.math-tools-menu #compassToggle:hover,
.math-tools-menu #mathEditorToggle:hover{
  background:#eaf1ff!important;border-color:#cbdaf8!important;color:#2450d8!important
}
.math-tools-menu #rulerToggle[aria-pressed="true"],
.math-tools-menu #protractorToggle[aria-pressed="true"],
.math-tools-menu #compassToggle[aria-pressed="true"]{
  background:#e7efff!important;border-color:#b9ccff!important;color:#244fdb!important
}
.utility-menu-panel .utility-presenter-row{
  grid-template-columns:repeat(2,minmax(0,1fr))!important
}


/* V180 — prevent the M submenu from overlaying/hiding the other Quick Tools.
   Expand it inline as a compact two-column section instead of floating over the panel. */
.utility-menu-panel{
  overflow:visible!important;
  max-height:calc(100vh - 20px)!important;
}
.utility-menu-panel .utility-presenter-row{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
}
.utility-menu-panel .math-tools-wrap{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  min-width:0!important;align-self:start!important
}
.utility-menu-panel .math-tools-wrap:has(#mathToolsMenu:not([hidden])){
  grid-column:1/-1!important;
}
.utility-menu-panel .math-tools-menu{
  position:static!important;inset:auto!important;transform:none!important;
  z-index:auto!important;box-sizing:border-box!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  margin-top:6px!important;padding:7px!important;
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;overflow:visible!important;
  border:1px solid #dbe6f7!important;border-radius:11px!important;
  background:linear-gradient(145deg,#f9fbff,#eef4ff)!important;
  box-shadow:inset 0 1px 0 #fff!important;
}
.utility-menu-panel .math-tools-menu[hidden]{display:none!important}
.utility-menu-panel .math-tools-menu-title{
  grid-column:1/-1!important;margin:0!important;padding:3px 5px 6px!important;
}
.utility-menu-panel .math-tools-menu #rulerToggle,
.utility-menu-panel .math-tools-menu #protractorToggle,
.utility-menu-panel .math-tools-menu #compassToggle,
.utility-menu-panel .math-tools-menu #mathEditorToggle{
  min-width:0!important;width:100%!important;height:34px!important;min-height:34px!important;
  justify-content:center!important;padding:6px 5px!important;
  white-space:nowrap!important;font-size:10px!important
}
@media(max-height:520px){
 .utility-menu-panel{max-height:calc(100vh - 12px)!important;overflow-y:auto!important}
}


/* V182 — compact paper pattern choices */
.utility-menu-panel .utility-board-row{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:5px!important;align-items:stretch!important
}
.utility-menu-panel .utility-board-row button{
  min-width:0!important;min-height:34px!important;height:34px!important;
  padding:5px 6px!important;border-radius:9px!important;font-size:10px!important;
  white-space:nowrap!important;justify-content:center!important
}
.utility-menu-panel .utility-board-row button.active{
  background:#e8f0ff!important;border-color:#8eafff!important;color:#2450d8!important;
  box-shadow:0 0 0 2px #315cf51a!important
}
@media(max-width:520px){
 .utility-menu-panel .utility-board-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .utility-menu-panel .utility-board-row button{font-size:9px!important;padding:4px 3px!important}
}


/* V183 — dedicated Page Setup section for all paper backgrounds */
.utility-menu-panel .page-setup-launch-row{
  display:block!important;padding:7px 9px!important;margin-top:6px!important;
  border-top:1px solid #e3ebf8!important;border-bottom:0!important
}
.utility-menu-panel .page-setup-launch{
  width:100%!important;min-height:37px!important;height:37px!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  padding:7px 11px!important;border:1px solid #d6e3f7!important;border-radius:10px!important;
  background:linear-gradient(135deg,#f4f8ff,#eaf1ff)!important;color:#244ed2!important;
  font-size:11px!important;font-weight:850!important
}
.utility-menu-panel .page-setup-launch.active{
  background:linear-gradient(135deg,#245cf0,#1747c5)!important;color:#fff!important;border-color:#245cf0!important
}
.utility-menu-panel .page-setup-panel{
  margin:0 9px 9px!important;padding:9px!important;
  border:1px solid #dce7f8!important;border-radius:12px!important;
  background:linear-gradient(145deg,#fbfdff,#f0f5ff)!important;
  box-shadow:inset 0 1px 0 #fff!important
}
.utility-menu-panel .page-setup-panel[hidden]{display:none!important}
.utility-menu-panel .page-setup-title{
  display:flex!important;align-items:baseline!important;justify-content:space-between!important;
  gap:8px!important;padding:1px 2px 8px!important;color:#324a70!important;
  font-size:9px!important;font-weight:900!important;letter-spacing:.7px!important
}
.utility-menu-panel .page-setup-title small{
  color:#8091ac!important;font-size:9px!important;font-weight:550!important;
  letter-spacing:0!important;text-transform:none!important
}
.utility-menu-panel .page-setup-patterns{
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important
}
.utility-menu-panel .page-setup-patterns button{
  min-width:0!important;min-height:43px!important;height:auto!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;
  justify-content:center!important;gap:3px!important;padding:5px 2px!important;
  border:1px solid #d9e4f5!important;border-radius:9px!important;
  background:#fff!important;color:#465a78!important;font-size:15px!important;
  box-shadow:0 2px 5px #17345b0a!important
}
.utility-menu-panel .page-setup-patterns button span{
  font-size:9px!important;font-weight:800!important;white-space:nowrap!important
}
.utility-menu-panel .page-setup-patterns button.active{
  border-color:#315cf5!important;background:#e9f0ff!important;color:#2450d8!important;
  box-shadow:0 0 0 2px #315cf51a!important
}
@media(max-width:520px){
 .utility-menu-panel .page-setup-patterns{gap:4px!important}
 .utility-menu-panel .page-setup-patterns button{min-height:40px!important;font-size:13px!important}
 .utility-menu-panel .page-setup-patterns button span{font-size:8px!important}
 .utility-menu-panel .page-setup-title small{font-size:8px!important}
}


/* V184 — optimized Quick Tools layout: tighter spacing, aligned controls */
.utility-menu-panel{
  width:min(460px,calc(100vw - 18px))!important;
  max-width:calc(100vw - 18px)!important;
  padding:0!important;border-radius:15px!important;
}
.utility-panel-heading{
  min-height:48px!important;padding:7px 10px!important;gap:7px!important;
}
.utility-panel-icon{width:27px!important;height:27px!important;flex-basis:27px!important;font-size:15px!important}
.utility-panel-title{font-size:13px!important}
.utility-panel-title small{font-size:8px!important;margin-top:1px!important}
.utility-panel-count{font-size:7px!important;padding:4px 6px!important}
.utility-menu-panel .utility-action-row{
  gap:5px!important;padding:7px 8px 0!important
}
.utility-menu-panel .utility-action-row button{
  min-height:36px!important;height:36px!important;padding:4px 5px!important;
  border-radius:9px!important;font-size:10px!important;gap:4px!important
}
.utility-menu-panel .utility-media-row{padding-top:7px!important}
.utility-menu-panel .utility-presenter-row{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  padding-top:6px!important
}
.utility-menu-panel .utility-presenter-row button{
  min-height:37px!important;height:37px!important
}
.utility-menu-panel .page-setup-launch-row{
  margin-top:5px!important;padding:6px 8px 0!important;
  border-top:1px solid #e7edf7!important
}
.utility-menu-panel .page-setup-launch{
  min-height:34px!important;height:34px!important;padding:5px 9px!important;
  border-radius:9px!important;font-size:10px!important
}
.utility-menu-panel .page-setup-panel{
  margin:5px 8px 7px!important;padding:7px!important;border-radius:10px!important
}
.utility-menu-panel .page-setup-title{padding:0 2px 6px!important;font-size:8px!important}
.utility-menu-panel .page-setup-title small{font-size:8px!important}
.utility-menu-panel .page-setup-patterns{gap:5px!important}
.utility-menu-panel .page-setup-patterns button{
  min-height:38px!important;padding:4px 2px!important;border-radius:8px!important;
  font-size:13px!important;gap:2px!important
}
.utility-menu-panel .page-setup-patterns button span{font-size:8px!important}
.utility-menu-panel .utility-background-color{
  margin:0 8px!important;padding:6px 1px 8px!important;gap:7px!important;
  min-height:34px!important
}
.utility-menu-panel .bg-short-label{font-size:10px!important;min-width:20px!important}
.utility-menu-panel .background-royal-palette{gap:6px!important}
.utility-menu-panel .background-royal-palette .royal-swatch{
  width:19px!important;height:19px!important;min-width:19px!important
}
.utility-menu-panel .background-royal-palette .color-custom{
  width:23px!important;height:23px!important
}
@media(max-width:520px){
 .utility-menu-panel{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important}
 .utility-panel-heading{min-height:45px!important;padding:6px 8px!important}
 .utility-menu-panel .utility-action-row{padding-left:6px!important;padding-right:6px!important;gap:4px!important}
 .utility-menu-panel .utility-action-row button{font-size:9px!important;min-height:34px!important;height:34px!important}
 .utility-menu-panel .page-setup-patterns{gap:3px!important}
 .utility-menu-panel .page-setup-patterns button span{font-size:7px!important}
 .utility-menu-panel .utility-background-color{margin:0 6px!important}
}


/* V185 — narrower floating Quick Tools panel */
.utility-menu-panel{
  width:min(370px,calc(100vw - 20px))!important;
  max-width:calc(100vw - 20px)!important;
  padding:0!important;
  border-radius:14px!important;
}
.utility-panel-heading{
  min-height:43px!important;
  padding:6px 9px!important;
  gap:6px!important;
}
.utility-panel-icon{
  width:25px!important;height:25px!important;flex-basis:25px!important;
  border-radius:8px!important;font-size:14px!important
}
.utility-panel-title{font-size:12px!important}
.utility-panel-title small{font-size:8px!important}
.utility-panel-count{font-size:7px!important;padding:3px 6px!important}
.utility-menu-panel .utility-action-row{
  gap:4px!important;padding:6px 7px 0!important
}
.utility-menu-panel .utility-action-row button{
  min-height:32px!important;height:32px!important;
  padding:3px 4px!important;border-radius:8px!important;
  font-size:9px!important;gap:3px!important
}
.utility-menu-panel .utility-presenter-row{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  padding-top:5px!important
}
.utility-menu-panel .utility-presenter-row button{
  min-height:33px!important;height:33px!important
}
.utility-menu-panel .page-setup-launch-row{
  margin-top:4px!important;padding:5px 7px 0!important
}
.utility-menu-panel .page-setup-launch{
  min-height:31px!important;height:31px!important;
  padding:4px 8px!important;font-size:9px!important;border-radius:8px!important
}
.utility-menu-panel .page-setup-panel{
  margin:4px 7px 6px!important;padding:6px!important;border-radius:9px!important
}
.utility-menu-panel .page-setup-title{
  padding:0 2px 5px!important;font-size:8px!important
}
.utility-menu-panel .page-setup-patterns{gap:4px!important}
.utility-menu-panel .page-setup-patterns button{
  min-height:34px!important;padding:3px 1px!important;
  border-radius:7px!important;font-size:12px!important
}
.utility-menu-panel .page-setup-patterns button span{font-size:7px!important}
.utility-menu-panel .utility-background-color{
  margin:0 7px!important;padding:5px 1px 7px!important;
  min-height:30px!important;gap:6px!important
}
.utility-menu-panel .bg-short-label{font-size:9px!important;min-width:18px!important}
.utility-menu-panel .background-royal-palette{gap:5px!important}
.utility-menu-panel .background-royal-palette .royal-swatch{
  width:17px!important;height:17px!important;min-width:17px!important
}
.utility-menu-panel .background-royal-palette .color-custom{
  width:21px!important;height:21px!important
}
@media(max-width:520px){
 .utility-menu-panel{
   width:min(350px,calc(100vw - 14px))!important;
   max-width:calc(100vw - 14px)!important
 }
 .utility-panel-heading{min-height:41px!important;padding:5px 7px!important}
 .utility-menu-panel .utility-action-row{padding-left:6px!important;padding-right:6px!important;gap:4px!important}
 .utility-menu-panel .utility-action-row button{font-size:8px!important;min-height:31px!important;height:31px!important}
 .utility-menu-panel .page-setup-patterns{gap:3px!important}
 .utility-menu-panel .page-setup-patterns button span{font-size:7px!important}
 .utility-menu-panel .utility-background-color{margin:0 6px!important}
}


/* V186 — compact, balanced main toolbar */
.topbar{
  height:58px!important;min-height:58px!important;
  gap:8px!important;padding:0 10px!important;
}
.brand{gap:7px!important;flex:0 0 auto!important}
.brand-mark{
  width:34px!important;height:34px!important;flex-basis:34px!important;
  border-radius:9px!important;box-shadow:0 3px 9px rgba(79,70,229,.2)!important
}
.brand-name{font-size:14px!important}
.brand-name span{font-size:9px!important;margin-top:1px!important}
.tools{
  flex:0 1 auto!important;min-width:0!important;margin:0 auto!important;
  gap:2px!important;padding:3px!important;border-radius:11px!important;
  max-width:48vw!important
}
.tool{width:32px!important;height:32px!important;flex:0 0 32px!important;border-radius:8px!important}
.tool svg{width:18px!important;height:18px!important}
.sep{height:19px!important;margin:0 3px!important}
.actions{flex:0 0 auto!important;gap:4px!important;min-width:0!important}
.actions .btn{
  height:34px!important;min-height:34px!important;padding:0 9px!important;
  gap:5px!important;border-radius:9px!important;font-size:11.5px!important
}
.actions .btn svg{width:15px!important;height:15px!important}
.actions .btn .caret{width:11px!important;height:11px!important}
.actions .lekho-save-status{
  font-size:10px!important;padding:4px 6px!important;border-radius:7px!important;
  white-space:nowrap!important
}
.actions .lekho-top-close-button{
  width:34px!important;min-width:34px!important;padding:0!important;
  font-size:22px!important;border-radius:9px!important
}
.lekho-window-controls button{width:30px!important;height:28px!important}
@media(max-width:1500px){
 .topbar{gap:6px!important;padding:0 8px!important}
 .brand-name span{display:none!important}
 .tools{max-width:43vw!important}
 .tool{width:30px!important;height:30px!important;flex-basis:30px!important}
 .actions .btn{padding:0 7px!important;font-size:10.5px!important}
 .actions{gap:3px!important}
}
@media(max-width:1180px){
 .topbar{gap:5px!important}
 .brand-mark{width:30px!important;height:30px!important;flex-basis:30px!important}
 .brand-name{font-size:12px!important}
 .tools{max-width:40vw!important}
 .tool{width:28px!important;height:28px!important;flex-basis:28px!important}
 .actions .btn-label{display:none!important}
 .actions .btn{width:34px!important;min-width:34px!important;padding:0!important;justify-content:center!important}
 .actions .btn .caret{display:none!important}
 .actions .lekho-save-status{display:none!important}
}
@media(max-width:760px){
 .topbar{height:52px!important;min-height:52px!important;gap:4px!important;padding:0 6px!important}
 .tools{max-width:calc(100vw - 150px)!important}
 .actions{gap:2px!important}
 .actions .btn{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important}
 .actions .btn svg{width:16px!important;height:16px!important}
 .actions .lekho-top-close-button{width:30px!important;min-width:30px!important}
}


/* V188 — icon-only Camera / Recording / Microphone quick actions */
.utility-menu-panel .utility-media-row{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  align-items:center!important;gap:8px!important;padding:8px 10px 9px!important
}
.utility-menu-panel .utility-media-row .quick-tool-icon-button{
  width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;
  padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid #d9e5f7!important;border-radius:11px!important;
  background:linear-gradient(145deg,#fff,#f3f7ff)!important;color:#344967!important;
  box-shadow:0 2px 7px rgba(35,65,120,.06)!important
}
.utility-menu-panel .utility-media-row .quick-tool-icon-button svg{
  display:block!important;width:20px!important;height:20px!important;flex:0 0 20px!important
}
.utility-menu-panel .utility-media-row #openRecordingTools svg{width:19px!important;height:19px!important}
.utility-menu-panel .utility-media-row .quick-tool-icon-button:hover{
  color:#2454e8!important;border-color:#9bb7ff!important;background:#edf3ff!important
}
.utility-menu-panel .utility-media-row .quick-tool-icon-button:focus-visible{
  outline:2px solid #315cf5!important;outline-offset:2px!important
}


/* V189 — icon-only Spotlight and refined compact Quick Tools */
.utility-menu-panel{width:min(340px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px)!important;border-radius:13px!important}
.utility-panel-heading{min-height:39px!important;padding:5px 8px!important}
.utility-panel-icon{width:23px!important;height:23px!important;flex-basis:23px!important}
.utility-panel-title{font-size:11px!important}.utility-panel-title small{font-size:7px!important}
.utility-panel-count{font-size:7px!important;padding:3px 5px!important}
.utility-menu-panel .utility-media-row{gap:6px!important;padding:6px 7px 5px!important}
.utility-menu-panel .utility-media-row .quick-tool-icon-button{height:36px!important;min-height:36px!important;border-radius:9px!important}
.utility-menu-panel .utility-media-row .quick-tool-icon-button svg{width:18px!important;height:18px!important}
.utility-menu-panel .utility-presenter-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:0 7px 6px!important}
.utility-menu-panel .utility-presenter-row #spotlightToggle,.utility-menu-panel .utility-presenter-row .math-tools-wrap{height:34px!important;min-height:34px!important}
.utility-menu-panel .utility-presenter-row .spotlight-icon-button{width:100%!important;min-width:0!important;height:34px!important;min-height:34px!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;border:1px solid #d9e5f7!important;border-radius:9px!important;background:linear-gradient(145deg,#fff,#f3f7ff)!important;color:#344967!important}
.utility-menu-panel .spotlight-icon-button svg{width:18px!important;height:18px!important}
.utility-menu-panel .spotlight-icon-button.active{background:#e8efff!important;color:#2454e8!important;border-color:#9bb7ff!important}
.utility-menu-panel .utility-presenter-row .math-tools-trigger{height:34px!important;min-height:34px!important;border-radius:9px!important}
.utility-menu-panel .page-setup-launch-row{padding:4px 7px 0!important}
.utility-menu-panel .page-setup-launch{height:29px!important;min-height:29px!important;font-size:9px!important}
.utility-menu-panel .page-setup-panel{margin:4px 7px 5px!important;padding:5px!important}
.utility-menu-panel .page-setup-patterns button{min-height:31px!important}
.utility-menu-panel .utility-background-color{margin:0 7px!important;padding:4px 1px 6px!important;min-height:27px!important}
.utility-menu-panel .background-royal-palette .royal-swatch{width:16px!important;height:16px!important;min-width:16px!important}
.utility-menu-panel .background-royal-palette .color-custom{width:20px!important;height:20px!important}


/* V190 — reduce Quick Tools panel width while keeping controls balanced */
.utility-menu-panel{
  width:min(300px,calc(100vw - 18px))!important;
  max-width:min(300px,calc(100vw - 18px))!important;
  min-width:0!important;
}
.utility-menu-panel .utility-media-row{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:5px!important;padding-left:6px!important;padding-right:6px!important
}
.utility-menu-panel .utility-presenter-row{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:5px!important;padding-left:6px!important;padding-right:6px!important
}
.utility-menu-panel .page-setup-patterns{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:3px!important
}
.utility-menu-panel .page-setup-patterns button span{font-size:7px!important}
.utility-menu-panel .utility-background-color{margin-left:6px!important;margin-right:6px!important}
@media(max-width:520px){
  .utility-menu-panel{
    width:min(292px,calc(100vw - 14px))!important;
    max-width:min(292px,calc(100vw - 14px))!important
  }
}


/* V191 — harden floating toolbox handle icon in both orientations */
.props.lekho-dock-floating .lekho-dock-handle{
  color:#334155!important;
  font-size:0!important;
  line-height:0!important;
  overflow:visible!important;
}
.props.lekho-dock-floating .lekho-dock-handle .lekho-dock-toolbox-icon,
.props.lekho-dock-floating.is-vertical .lekho-dock-handle .lekho-dock-toolbox-icon,
.props.lekho-dock-floating:not(.is-vertical) .lekho-dock-handle .lekho-dock-toolbox-icon{
  display:block!important;visibility:visible!important;opacity:1!important;
  position:relative!important;width:21px!important;height:21px!important;
  min-width:21px!important;min-height:21px!important;max-width:21px!important;max-height:21px!important;
  flex:0 0 21px!important;overflow:visible!important;
  color:#334155!important;
}
.props.lekho-dock-floating .lekho-dock-handle .lekho-dock-toolbox-icon rect,
.props.lekho-dock-floating .lekho-dock-handle .lekho-dock-toolbox-icon path{
  display:initial!important;visibility:visible!important;opacity:1!important;
  stroke:#334155!important;fill:none!important;stroke-width:1.9!important;
}


/* V192 — prominent top-right close control for the Pages slide-out */
.sidebar{position:relative!important}
.sidebar-head{
  position:relative!important;
  min-height:46px!important;
  padding:10px 48px 7px 14px!important;
}
.sidebar-head .sidebar-close-button{
  position:absolute!important;
  top:8px!important;right:9px!important;
  z-index:30!important;
  display:grid!important;place-items:center!important;
  width:29px!important;height:29px!important;
  min-width:29px!important;min-height:29px!important;
  margin:0!important;padding:5px!important;
  border:1px solid #d7e2f3!important;border-radius:9px!important;
  background:#f8faff!important;color:#64748b!important;
  box-shadow:0 2px 7px rgba(31,55,95,.09)!important;
  cursor:pointer!important;
}
.sidebar-head .sidebar-close-button svg{
  display:block!important;width:15px!important;height:15px!important;
  min-width:15px!important;min-height:15px!important;
}
.sidebar-head .sidebar-close-button:hover{
  color:#dc2626!important;background:#fff1f2!important;
  border-color:#fecaca!important;
}
.sidebar-head #addPage{margin-left:auto!important}
@media(max-width:760px){
  .sidebar-head .sidebar-close-button{
    top:7px!important;right:7px!important;width:30px!important;height:30px!important
  }
}

#buddyAccessDenied{position:fixed;inset:0;z-index:2147483000;background:rgba(4,18,42,.92);display:grid;place-items:center;color:#fff;text-align:center;padding:24px}#buddyAccessDenied section{max-width:420px;background:#103d78;border:1px solid #e7bd60;border-radius:18px;padding:30px;box-shadow:0 20px 60px #0005}#buddyAccessDenied strong{font-size:24px}#buddyAccessDenied p{color:#dce9ff}.buddy-permission-disabled{opacity:.38!important;cursor:not-allowed!important}


/* V204 — responsive header recovery: keep the complete tool strip reachable on narrow windows */
.topbar{box-sizing:border-box!important;min-width:0!important;max-width:100vw!important}
.topbar .brand{min-width:0!important;max-width:100%!important}
.topbar .brand-name{min-width:0!important;white-space:nowrap!important}
.topbar .tools{min-width:0!important;flex:1 1 auto!important;max-width:none!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;overscroll-behavior-x:contain!important}
.topbar .tools .tool{flex:0 0 32px!important}
.topbar .actions{min-width:0!important;max-width:100%!important;flex:0 1 auto!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important}
@media(max-width:760px){
 .topbar{height:auto!important;min-height:0!important;max-height:none!important;padding:6px 7px!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;row-gap:6px!important;column-gap:6px!important;overflow:visible!important}
 .topbar #sidebarToggle{order:0!important;flex:0 0 32px!important}
 .topbar .brand{order:1!important;display:flex!important;flex:1 1 calc(100% - 46px)!important;min-width:0!important;max-width:calc(100% - 46px)!important;gap:7px!important}
 .topbar .brand-mark{display:block!important;flex:0 0 34px!important;width:34px!important;height:34px!important}
 .topbar .brand-name{display:block!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:13px!important}
 .topbar .brand-name span{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:9px!important}
 .topbar .tools{order:2!important;display:flex!important;flex:1 1 100%!important;width:100%!important;max-width:100%!important;min-width:0!important;height:38px!important;max-height:38px!important;padding:2px 1px!important;justify-content:flex-start!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important}
 .topbar .tools .tool{flex:0 0 32px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important}
 .topbar .actions{order:3!important;display:flex!important;flex:1 1 100%!important;width:100%!important;max-width:100%!important;min-width:0!important;margin-left:0!important;justify-content:flex-start!important;overflow-x:auto!important;overflow-y:hidden!important;padding:2px 0!important;-webkit-overflow-scrolling:touch!important}
 .topbar .actions .btn{flex:0 0 34px!important;width:34px!important;min-width:34px!important;height:32px!important;min-height:32px!important}
}
@media(min-width:761px) and (max-width:1100px){
 .topbar .brand-name span{display:none!important}
 .topbar .tools{flex:1 1 0!important;max-width:none!important}
 .topbar .actions{flex:0 1 auto!important;max-width:42vw!important}
}
ar .brand-name span{display:none!important}
 .topbar .tools{flex:1 1 0!important;max-width:none!important}
 .topbar .actions{flex:0 1 auto!important;max-width:42vw!important}
}

/* V207 — visible top-right action X; clickable and excluded from Electron drag region */
body.lekho-desktop-app .actions #topCloseButton{
 display:inline-flex!important;visibility:visible!important;opacity:1!important;
 pointer-events:auto!important;position:relative!important;z-index:2147483647!important;
 flex:0 0 42px!important;width:42px!important;min-width:42px!important;height:42px!important;
 -webkit-app-region:no-drag!important;app-region:no-drag!important
}
t;
 flex:0 0 42px!important;width:42px!important;min-width:42px!important;height:42px!important;
 -webkit-app-region:no-drag!important;app-region:no-drag!important
}

/* V208 — final top-right X hit-target and Electron no-drag rule */
body.lekho-desktop-app #topCloseButton,
body.lekho-desktop-app .actions #topCloseButton {
  display:inline-flex!important; visibility:visible!important; opacity:1!important;
  pointer-events:auto!important; position:relative!important; z-index:2147483647!important;
  -webkit-app-region:no-drag!important; app-region:no-drag!important;
  flex:0 0 42px!important; width:42px!important; min-width:42px!important;
  height:42px!important; min-height:42px!important;
}


/* V209 — browser-mode close guidance (web pages cannot close arbitrary tabs) */
#buddyBrowserCloseHelp{
 position:fixed!important;inset:0!important;z-index:2147483647!important;
 display:grid!important;place-items:center!important;padding:18px!important;
 background:rgba(15,23,42,.48)!important;
}
#buddyBrowserCloseHelp .buddy-close-help-card{
 position:relative!important;width:min(440px,calc(100vw - 36px))!important;
 padding:26px!important;border-radius:16px!important;background:#fff!important;
 color:#172033!important;box-shadow:0 20px 70px rgba(0,0,0,.28)!important;
 font:14px/1.55 Segoe UI,Arial,sans-serif!important;
}
#buddyBrowserCloseHelp strong{display:block!important;font-size:20px!important;margin:0 28px 12px 0!important}
#buddyBrowserCloseHelp p{margin:10px 0!important}
#buddyBrowserCloseHelp kbd{display:inline-block!important;padding:3px 7px!important;border:1px solid #cbd5e1!important;border-radius:5px!important;background:#f8fafc!important;font-weight:700!important}
#buddyBrowserCloseHelp .buddy-close-help-dismiss{position:absolute!important;right:12px!important;top:10px!important;border:0!important;background:transparent!important;font-size:24px!important;cursor:pointer!important}
#buddyBrowserCloseHelp .buddy-close-help-ok{margin-top:8px!important;padding:9px 20px!important;border:0!important;border-radius:8px!important;background:#2454e8!important;color:#fff!important;cursor:pointer!important}


/* V203.1 — red toolbar close button intentionally removed from the UI */
#topCloseButton,
.lekho-top-close-button,
body.lekho-desktop-app #topCloseButton,
body.lekho-desktop-app .actions #topCloseButton {
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}


/* V203.8 — Android horizontal toolbox always stays inside the viewport */
@media (max-width: 900px) {
  .tools.lekho-floating-tools:not(.is-vertical) {
    box-sizing: border-box !important;
    width: max-content !important;
    max-width: calc(100vw - 12px) !important;
    min-width: 0 !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 1px !important;
    padding: 3px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .tools.lekho-floating-tools:not(.is-vertical)::-webkit-scrollbar {
    display: none !important;
  }
  .tools.lekho-floating-tools:not(.is-vertical) .tool {
    box-sizing: border-box !important;
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 21px !important;
    max-width: 32px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 2px !important;
  }
  .tools.lekho-floating-tools:not(.is-vertical) .tool svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 100% !important;
  }
  .tools.lekho-floating-tools:not(.is-vertical) .sep {
    flex: 0 0 1px !important;
    width: 1px !important;
    margin: 0 1px !important;
  }
  .tools.lekho-floating-tools:not(.is-vertical) .lekho-tools-grip,
  .tools.lekho-floating-tools:not(.is-vertical) .lekho-tools-orient {
    flex: 0 0 26px !important;
    width: 26px !important;
    min-width: 26px !important;
    height: 28px !important;
  }
}
@media (max-width: 420px) {
  .tools.lekho-floating-tools:not(.is-vertical) {
    max-width: calc(100vw - 8px) !important;
    gap: 0 !important;
    padding: 2px !important;
  }
  .tools.lekho-floating-tools:not(.is-vertical) .tool {
    min-width: 19px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 1px !important;
  }
  .tools.lekho-floating-tools:not(.is-vertical) .tool svg {
    width: 15px !important;
    height: 15px !important;
  }
  .tools.lekho-floating-tools:not(.is-vertical) .sep {
    display: none !important;
  }
}


/* V203.9 — Android vertical toolbox stays fully within the visible screen */
@media (max-width: 900px) {
  .tools.lekho-floating-tools.is-vertical {
    box-sizing: border-box !important;
    position: fixed !important;
    left: max(6px, env(safe-area-inset-left)) !important;
    right: auto !important;
    top: max(6px, env(safe-area-inset-top)) !important;
    bottom: max(6px, env(safe-area-inset-bottom)) !important;
    width: min(58px, calc(100vw - 12px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 12px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    padding: 4px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .tools.lekho-floating-tools.is-vertical::-webkit-scrollbar {
    display: none !important;
  }
  .tools.lekho-floating-tools.is-vertical .tool {
    box-sizing: border-box !important;
    flex: 0 0 32px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 2px !important;
    justify-content: center !important;
  }
  .tools.lekho-floating-tools.is-vertical .tool svg {
    width: 17px !important;
    height: 17px !important;
    max-width: 100% !important;
  }
  .tools.lekho-floating-tools.is-vertical .sep {
    flex: 0 0 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 1px !important;
    min-height: 1px !important;
    margin: 1px 0 !important;
  }
  .tools.lekho-floating-tools.is-vertical .lekho-tools-grip,
  .tools.lekho-floating-tools.is-vertical .lekho-tools-orient {
    box-sizing: border-box !important;
    flex: 0 0 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
  }
}
@media (max-width: 420px) {
  .tools.lekho-floating-tools.is-vertical {
    left: max(4px, env(safe-area-inset-left)) !important;
    top: max(4px, env(safe-area-inset-top)) !important;
    bottom: max(4px, env(safe-area-inset-bottom)) !important;
    width: min(52px, calc(100vw - 8px)) !important;
    max-width: calc(100vw - 8px) !important;
    padding: 3px !important;
    gap: 2px !important;
  }
  .tools.lekho-floating-tools.is-vertical .tool {
    flex-basis: 29px !important;
    height: 29px !important;
    min-height: 29px !important;
  }
  .tools.lekho-floating-tools.is-vertical .tool svg {
    width: 15px !important;
    height: 15px !important;
  }
}


/* V204.0 — slightly smaller toolbar glyphs; preserve touch targets */
@media (max-width: 900px) {
  .tools .tool svg,.tools.lekho-floating-tools .tool svg {
    width:14px!important;height:14px!important;max-width:100%!important;max-height:100%!important;
  }
}
@media (max-width: 420px) {
  .tools .tool svg,.tools.lekho-floating-tools .tool svg {width:13px!important;height:13px!important;}
}


/* V2042: Full-screen toolbox docks to the left in portrait and bottom-center in landscape. */
body.presenting .tools.lekho-floating-tools{
  position:fixed!important;
  z-index:10080!important;
  box-sizing:border-box!important;
  margin:0!important;
  max-width:calc(100vw - 20px)!important;
  max-height:calc(100vh - 20px)!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-width:none!important;
}
body.presenting .tools.lekho-floating-tools::-webkit-scrollbar{display:none!important}
@media (orientation:portrait){
  body.presenting .tools.lekho-floating-tools{
    left:10px!important;right:auto!important;top:50%!important;bottom:auto!important;
    transform:translateY(-50%)!important;
    width:max-content!important;max-width:76px!important;
    max-height:calc(100vh - 24px)!important;
    flex-direction:column!important;flex-wrap:nowrap!important;
    align-items:stretch!important;justify-content:center!important;
    overflow-x:hidden!important;overflow-y:auto!important;
  }
  body.presenting .tools.lekho-floating-tools .sep{width:100%!important;height:1px!important;min-height:1px!important;margin:3px 0!important}
}
@media (orientation:landscape){
  body.presenting .tools.lekho-floating-tools{
    left:50%!important;right:auto!important;top:auto!important;bottom:12px!important;
    transform:translateX(-50%)!important;
    width:max-content!important;max-width:calc(100vw - 20px)!important;
    max-height:64px!important;
    flex-direction:row!important;flex-wrap:nowrap!important;
    align-items:center!important;justify-content:center!important;
    overflow-x:auto!important;overflow-y:hidden!important;
  }
  body.presenting .tools.lekho-floating-tools .sep{width:1px!important;height:22px!important;min-height:22px!important;margin:0 2px!important}
}
