/* PdfStudio chrome — matched to Acrobat Pro DC light theme (scanned on SAM-LAPTOP) */
:root {
  --menu-bg: #fafafa;
  --tab-bg: #eaeaea;
  --tab-active: #ffffff;
  --toolbar-bg: #eeeeee;
  --panel: #f5f5f5;
  --panel-alt: #f0f0f0;
  --border: #d0d0d0;
  --border-dark: #bdbdbd;
  --text: #2c2c2c;
  --muted: #666666;
  --icon: #4a4a4a;
  --accent: #E31C23;
  --blue: #0b6bcb;
  --blue-soft: #e3f0fb;
  --good: #2e7d32;
  --danger: #c62828;
  /* Document well from Acrobat scan ~#6F6F6F; also allow light #DADADA */
  --stage: #6f6f6f;
  --page-shadow: 0 1px 3px rgba(0,0,0,.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Segoe UI Variable", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --fs-menu: 12px;
  --fs-tab: 13px;
  --fs-tool: 11px;
  --fs-ui: 12px;
  --fs-status: 11px;
  --global-h: 48px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--panel);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-ui);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }

.app { display: flex; flex-direction: column; height: 100%; min-height: 0; }

/* 1) Menu bar */
.menubar {
  display: flex; align-items: center;
  height: 24px; padding: 0 4px;
  background: var(--menu-bg);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-menu);
  flex-shrink: 0; user-select: none;
}
.menu-item {
  background: transparent; border: none;
  padding: 2px 10px; min-height: 20px;
  font-size: var(--fs-menu); color: var(--text);
  border-radius: 2px;
}
.menu-item:hover { background: #e5e5e5; }

/* 2) Tab bar — document tabs */
.tabbar {
  display: flex; align-items: stretch;
  height: 34px; background: var(--tab-bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; font-size: var(--fs-tab);
}
.doc-tabs { display: flex; align-items: flex-end; margin-left: 4px; gap: 2px; overflow-x: auto; max-width: min(70vw, 900px); }
.doc-tab {
  display: flex; align-items: center; gap: 8px;
  background: #d8d8d8;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 6px 10px 7px;
  border-radius: 4px 4px 0 0;
  font-size: 12px; min-width: 100px; max-width: 220px;
  cursor: pointer; color: #444;
  overflow: hidden;
}
.doc-tab .doc-tab-name, .doc-tab span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.doc-tab.active {
  background: var(--tab-active);
  color: var(--text);
  font-weight: 600;
  cursor: default;
}
.doc-tab:not(.active):hover { background: #e8e8e8; }
.doc-close {
  border: none; background: transparent; color: var(--muted);
  font-size: 14px; line-height: 1; padding: 0 2px; min-height: auto;
}
.doc-close:hover { color: var(--text); background: #eee; border-radius: 2px; }
.tabbar-right { margin-left: auto; display: flex; align-items: center; padding-right: 8px; }
.find-box {
  display: flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--border-dark);
  border-radius: 3px; padding: 2px 6px; height: 28px;
}
.find-box input {
  border: none; outline: none; background: transparent;
  width: 120px; font-size: 12px;
}
.find-box .ico { width: 14px; height: 14px; color: var(--muted); }
.find-box .find-nav,
.find-box .find-clear {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; padding: 0 6px; font-size: 22px; line-height: 1;
  height: 26px; min-width: 28px; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.find-box .find-nav:hover:not(:disabled),
.find-box .find-clear:hover:not(:disabled) {
  color: var(--text); background: #eee;
}
.find-box .find-nav:disabled,
.find-box .find-clear:disabled {
  opacity: 0.35; cursor: default;
}
.find-box .find-clear { font-size: 16px; font-weight: 700; min-width: 24px; }

/* 3) Global quick tools — wrap on narrow windows so Box Fill / Edit / OCR stay reachable */
.globalbar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0; /* deskparity222 Sam t978: no cluster gaps */
  min-height: var(--global-h);
  height: auto;
  padding: 4px 6px;
  background: var(--toolbar-bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow: visible;
  min-width: 0;
}
.gbar-group {
  display: flex; align-items: center; gap: 0;
  flex-wrap: wrap;
  flex-shrink: 0;
  max-width: 100%;
}
/* Annotate tools: wrap within the cluster; horizontal scroll only as last resort */
.gbar-group.tools-group {
  flex: 1 1 480px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #b0b0b0 transparent;
  padding-bottom: 1px;
}
.gbar-group.tools-group::-webkit-scrollbar { height: 5px; }
.gbar-group.tools-group::-webkit-scrollbar-thumb {
  background: #b0b0b0; border-radius: 3px;
}
.gbar-group.tools-group .icon-btn { flex-shrink: 0; }
.gbar-sep {
  width: 1px; height: 28px; background: var(--border);
  margin: 0 1px; flex-shrink: 0; align-self: center;
}
.gbar-spacer {
  flex: 0 0 0;
  min-width: 0;
  max-width: 4px;
  width: 0;
  height: 0;
  overflow: hidden;
  align-self: stretch;
}
.icon-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; min-width: 26px; height: 36px;
  padding: 0 1px;
  background: transparent; border: 1px solid transparent; border-radius: 3px;
  color: var(--icon); font-size: var(--fs-tool);
}
.icon-btn:hover { background: #e4e4e4; border-color: #d0d0d0; }
.icon-btn.active { background: var(--blue-soft); border-color: #9ec4e8; color: #0a4b8c; }
.icon-btn.flat { min-width: 24px; height: 34px; padding: 0 1px; }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn .txt { font-size: 16px; line-height: 1; font-weight: 500; }
.icon-btn span:not(.txt) { font-size: 9px; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.icon-btn.active span:not(.txt) { color: #0a4b8c; }
.page-indicator {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text); margin: 0 4px;
}
.page-indicator input {
  width: 36px; height: 22px; text-align: center;
  border: 1px solid var(--border-dark); border-radius: 2px; background: #fff;
  font-size: 12px;
}
.zoom-label { font-size: 11px; min-width: 40px; text-align: center; color: var(--muted); }
.appearance { gap: 4px; padding-right: 4px; flex-shrink: 0; }
.appearance label.muted {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--muted);
}
.appearance input[type="color"] {
  width: 22px; height: 22px; padding: 0; border: 1px solid var(--border-dark); background: #fff;
}
.appearance input[type="range"] { width: 70px; }

button.primary {
  background: linear-gradient(#f04752, #d91f2e);
  border: 1px solid #b01522; color: #fff; font-weight: 600;
  border-radius: 3px; padding: 4px 12px; min-height: 26px; font-size: 12px;
}
.sidebar .page-ops button, .rightbar button, .modal button:not(.primary) {
  background: linear-gradient(#fff, #f3f3f3);
  border: 1px solid var(--border-dark);
  border-radius: 3px; padding: 3px 8px; min-height: 24px; font-size: 11px;
}
.sidebar .page-ops button:hover { background: #eee; }

/* Main */
.main {
  flex: 1; display: grid;
  grid-template-columns: 180px 1fr; /* rightbar removed */
  min-height: 0; position: relative;
}
/* deskparity137: collapsed sidebar → viewer gets full 1fr (not 0-width first track) */
.main.sidebar-collapsed { grid-template-columns: 1fr; }
.main.sidebar-collapsed .sidebar { display: none; }
.sidebar, .rightbar {
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow: auto; padding: 0;
  font-size: var(--fs-ui);
}
.rightbar { display: none !important; } /* Objects / Box style panel permanently hidden */
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; font-size: 11px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--border); background: #f0f0f0;
}
.page-ops { padding: 6px 8px; gap: 3px; display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.sidebar-reveal {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  z-index: 5; width: 18px; height: 48px;
  background: var(--toolbar-bg); border: 1px solid var(--border); border-left: none;
  border-radius: 0 3px 3px 0; font-size: 12px; color: var(--muted);
}
.section-title {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin: 8px 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--border);
}

.viewer-wrap {
  overflow: auto; background: var(--stage);
  position: relative; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.page-wrap {
  position: relative; box-shadow: var(--page-shadow);
  background: #fff; line-height: 0;
}
.page-wrap canvas.page { display: block; }
.page-wrap canvas.overlay {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.page-wrap.interactive canvas.overlay { pointer-events: auto; cursor: crosshair; }
.page-wrap.selecting canvas.overlay { cursor: default; }

.thumb {
  display: flex; gap: 6px; align-items: flex-start;
  margin: 6px 8px; padding: 6px; border-radius: 2px;
  border: 1px solid transparent; cursor: pointer; background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.thumb:hover { border-color: var(--blue); }
.thumb.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumb img { width: 48px; border: 1px solid #ddd; }
.thumb[draggable="true"] { cursor: grab; }
.thumb.dragging {
  opacity: 0.45;
  cursor: grabbing;
  border-color: var(--accent);
}
.thumb.drag-over { background: #e8f2fc; }
.thumb.drag-before {
  box-shadow: inset 0 3px 0 0 var(--accent), 0 0 0 1px var(--border);
}
.thumb.drag-after {
  box-shadow: inset 0 -3px 0 0 var(--accent), 0 0 0 1px var(--border);
}
.thumb .meta { font-size: 11px; color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 4px; }
#thumbs.list { padding-bottom: 12px; }
.chip {
  background: #fff; border: 1px solid var(--border); border-radius: 3px;
  padding: 6px; font-size: 11px; display: flex; justify-content: space-between;
  gap: 6px; align-items: center;
}
.hint { font-size: 11px; color: var(--muted); line-height: 1.4; }
.group { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }

.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 22px; padding: 0 10px;
  background: #f0f0f0; border-top: 1px solid var(--border);
  font-size: var(--fs-status); color: var(--muted); flex-shrink: 0;
}
.status-mid { display: flex; align-items: center; gap: 6px; }
.status-mid .dot { opacity: .5; }

.drop-hint {
  position: absolute; inset: 20px;
  border: 2px dashed rgba(255,255,255,.35);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; text-align: center; padding: 24px;
  background: rgba(0,0,0,.06);
}
.drop-hint .inner { color: #f2f2f2; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.drop-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.viewer-wrap.has-doc .drop-hint { display: none; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(80,80,80,.4);
  display: none; align-items: center; justify-content: center; z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: min(460px, 92vw); background: #fff;
  border: 1px solid var(--border-dark); border-radius: 4px;
  padding: 14px 16px; box-shadow: 0 8px 28px rgba(0,0,0,.22);
}
.modal h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.modal .actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.field label { font-size: 11px; color: var(--muted); }
.field textarea, .field input {
  border: 1px solid var(--border-dark); border-radius: 3px; padding: 5px 6px; background: #fff;
}
.sig-pad { width: 100%; height: 150px; border: 1px solid var(--border-dark); border-radius: 3px; background: #fff; touch-action: none; }

.popup-menu {
  position: fixed; z-index: 60; top: 24px; left: 4px;
  background: #fff; border: 1px solid var(--border-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,.18); min-width: 180px; padding: 4px 0;
}
/* deskparity222: popup-menu full labels (no ellipsis truncation) */
.popup-menu button, .popup-menu label.menu-open-label, .popup-menu .menu-open-label {
  display: block; width: max-content; min-width: 100%; text-align: left;
  background: transparent; border: none; padding: 6px 14px; font-size: 12px;
  white-space: nowrap; overflow: visible; text-overflow: clip; max-width: none;
}
.popup-menu button:hover:not(:disabled) { background: #e8f2fc; }
.popup-menu button:disabled { opacity: .45; cursor: default; }
.popup-menu .menu-sep {
  height: 1px; margin: 4px 8px; background: #e0e0e0;
}
.popup-menu .menu-section-label {
  padding: 4px 14px 2px; font-size: 10px; font-weight: 700;
  color: #888; text-transform: uppercase; letter-spacing: .04em;
  user-select: none;
}
/* deskparity222: recent names full — wrap instead of mid-name … */
.popup-menu .menu-recent-list button {
  max-width: min(92vw, 36rem); overflow: visible; text-overflow: clip; white-space: normal;
}
.language-menu {
  min-width: 280px; max-width: 360px; padding: 0;
  display: flex; flex-direction: column; max-height: min(70vh, 480px);
}
.language-menu[hidden] { display: none !important; }
.lang-menu-head {
  padding: 8px 10px 6px; border-bottom: 1px solid #e5e7eb; flex: 0 0 auto;
  background: #f8fafc;
}
.lang-filter {
  width: 100%; box-sizing: border-box; font-size: 12px;
  padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 4px;
}
.lang-menu-list {
  overflow-y: auto; flex: 1 1 auto; padding: 4px 0;
}
.lang-menu-list button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; background: transparent; border: none;
  padding: 6px 14px; font-size: 12px; cursor: pointer;
}
.lang-menu-list button:hover { background: #e8f2fc; }
.lang-menu-list button.active { background: #dbeafe; font-weight: 600; }
.lang-menu-list .lang-native { flex: 1 1 auto; }
.lang-menu-list .lang-en { color: #94a3b8; font-size: 10px; white-space: nowrap; }
.lang-menu-list .lang-pack-miss { color: #b45309; font-size: 9px; margin-left: 4px; }
/* left/top set in JS under the clicked menu-item */

@media (max-width: 1100px) {
  .main { grid-template-columns: 160px 1fr; }
  .rightbar { display: none; }
  .icon-btn span:not(.txt) { display: none; }
  .icon-btn { min-width: 26px; }
}
@media print {
  .menubar, .tabbar, .globalbar, .sidebar, .rightbar, .statusbar, .modal-backdrop, .sidebar-reveal { display: none !important; }
  .main { display: block; }
  .viewer-wrap { padding: 0; background: #fff; }
  .page-wrap { box-shadow: none; break-after: page; }
}

/* HiDPI page canvases: logical CSS size; backing store is denser (see app.js) */
.page-wrap canvas.page,
.page-wrap canvas.overlay {
  image-rendering: auto;
}
.thumb img {
  image-rendering: auto;
}
input, textarea, button, .icon-btn span {
  -webkit-font-smoothing: antialiased;
}

/* Selectable PDF text layer (under overlay; active in Hand tool) */
.page-wrap .textLayer {
  position: absolute;
  left: 0; top: 0;
  overflow: hidden;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
  opacity: 0.25;
  mix-blend-mode: multiply;
}
.page-wrap.selecting .textLayer.selectable {
  pointer-events: auto;
  opacity: 0.2;
  cursor: text;
}
.page-wrap .textLayer span {
  position: absolute;
  white-space: pre;
  color: transparent;
  transform-origin: 0% 0%;
  cursor: text;
}
.page-wrap .textLayer span::selection {
  background: rgba(0, 100, 255, 0.35);
  color: transparent;
}
.page-wrap canvas.overlay { z-index: 3; }
.page-wrap canvas.page { position: relative; z-index: 1; }

.box-props-popover {
  position: fixed;
  z-index: 10050;
  width: 240px;
  max-height: min(72vh, 520px);
  overflow: auto;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,.2);
  padding: 0;
}
.box-props-popover[hidden] { display: none !important; }
.box-props-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  font: 600 13px/1.2 "Segoe UI", system-ui, sans-serif;
  color: #111827;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.box-props-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.box-props-close:hover { background: #f3f4f6; color: #111827; }
.box-style-panel {
  padding: 8px 10px 12px;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.box-style-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
}
.box-style-row input[type="color"] { width: 100%; height: 28px; padding: 0; border: 1px solid var(--border); background: #fff; }
.box-style-row input[type="range"] { width: 100%; }
.box-style-row input[type="checkbox"] { width: auto; }

.box-text-props select,
.box-text-props input[type="number"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 12px;
  background: #fff;
}
.box-text-props[hidden] { display: none !important; }

/* Right-click context menu */
.ctx-menu {
  position: fixed;
  z-index: 10000;
  min-width: 200px;
  max-width: 280px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ctx-menu[hidden] { display: none !important; }
.ctx-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font: 13px/1.3 "Segoe UI", system-ui, sans-serif;
  color: #111827;
  cursor: pointer;
}
.ctx-menu button:hover:not(:disabled) { background: #eff6ff; }
.ctx-menu button:disabled { opacity: .4; cursor: default; }
.ctx-menu .ctx-sep { height: 1px; background: #e5e7eb; margin: 4px 6px; }


/* In-place Edit Text (no modal) */
.page-wrap .inline-text-edit {
  /* deskparity132: editable overlay — solicit typing (no properties popup); opaque enough to see caret */
  position: absolute;
  z-index: 60;
  margin: 0;
  padding: 0 1px;
  border: none;
  border-radius: 0;
  outline: none;
  resize: none; /* fontLocked: never restyle size */
  overflow: hidden;
  box-shadow: none;
  box-sizing: border-box;
  white-space: pre;
  word-break: normal;
  caret-color: #111111;
  background: rgba(255, 255, 255, 0.97);
  opacity: 1;
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}
.page-wrap .inline-text-edit:focus {
  /* invite typing — no style/properties chrome box */
  border: none;
  outline: none;
  box-shadow: none;
  caret-color: #111111;
  opacity: 1;
}
.page-wrap .inline-text-edit.textedit-kb-arm {
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 60 !important;
}

/* In-place Text Box (note) — type on page, no modal */
.page-wrap .inline-note-edit {
  position: absolute;
  z-index: 31;
  margin: 0;
  outline: none;
  resize: none;
  overflow: auto;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.18);
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  caret-color: #111;
  border-radius: 3px;
}
.page-wrap .inline-note-edit:focus {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), 0 2px 12px rgba(15, 23, 42, 0.18);
}



/* Full-page OCR edit mode: clickable word/line boxes over the scan */
.page-wrap .ocr-edit-layer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  line-height: 1;
}
.page-wrap .ocr-edit-layer .ocr-edit-word {
  position: absolute;
  box-sizing: border-box;
  pointer-events: auto;
  cursor: text;
  white-space: pre;
  overflow: hidden;
  color: transparent;
  background: transparent;
  border-radius: 1px;
  transform-origin: 0% 0%;
}
.page-wrap .ocr-edit-layer .ocr-edit-word:hover {
  background: rgba(59, 130, 246, 0.18);
  outline: 1px solid rgba(37, 99, 235, 0.55);
}
.page-wrap.ocr-editing .overlay {
  /* words sit above overlay; empty areas still draw/select via fall-through */
}

/* Hand tool: Acrobat-style drag-to-pan; overlay still hit-tests objects */
.viewer-wrap.tool-pan {
  cursor: grab;
}
.viewer-wrap.tool-pan .page-wrap canvas.overlay {
  cursor: grab;
}
.viewer-wrap.tool-pan.panning {
  cursor: grabbing;
  user-select: none;
}
.viewer-wrap.tool-pan.panning * {
  cursor: grabbing !important;
  user-select: none !important;
}
/* Leaving Hand: never keep grab on viewer / overlay (Select = arrow) */
.viewer-wrap:not(.tool-pan) {
  cursor: default;
}
.viewer-wrap:not(.tool-pan) .page-wrap.selecting canvas.overlay {
  cursor: default;
}

/* —— Membership pay-to-activate (consumer UI) —— */
.license-badge {
  border: 1px solid transparent;
  background: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  margin-right: 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--text);
  align-self: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.license-badge:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  transform: translateY(-0.5px);
}
.license-badge.trial {
  color: #8a5200;
  background: linear-gradient(180deg, #fffaf0, #fff3d6);
  border-color: #ebc97a;
}
.license-badge.ok {
  color: #1b5e20;
  background: linear-gradient(180deg, #f1faf2, #e3f4e5);
  border-color: #9ccc9f;
}
.license-badge.bad {
  color: #b71c1c;
  background: linear-gradient(180deg, #fff5f5, #ffe4e6);
  border-color: #ef9a9a;
}
#helpMenu { left: auto; right: 8px; }

#licenseModal.modal-backdrop {
  background: rgba(28, 28, 32, 0.48);
  backdrop-filter: blur(2px);
}
.license-modal {
  width: min(420px, 92vw);
  padding: 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 18px 48px rgba(0,0,0,.28);
}
.license-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 14px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  border-bottom: 1px solid #efefef;
}
.license-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(160deg, #f04752, #c4121c);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(227, 28, 35, .35);
}
.license-hero-text { min-width: 0; }
.license-modal h2#licenseTitle {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}
.license-tagline {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.license-summary {
  margin: 0;
  padding: 14px 22px 0;
  font-size: 13px;
  line-height: 1.45;
  color: #3a3a3a;
}
.license-modal .license-demo {
  margin: 10px 22px 0;
  color: #8a5200;
  background: #fff8e6;
  border: 1px solid #f0dfa0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}
.license-price-card {
  margin: 14px 22px 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fffbfb, #f7f7f8);
  border: 1px solid #ececec;
  border-radius: 12px;
}
.license-price-label {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.license-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.license-price-amount {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
}
.license-price-unit {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.license-price-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #555;
  line-height: 1.35;
}
.license-facts {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid #ececec;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.license-facts:not([hidden]) { display: grid; }
.license-facts[hidden] { display: none !important; }
.license-facts li {
  display: flex;
  gap: 6px;
  line-height: 1.35;
}
.license-facts li::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin-top: 5px;
  border-radius: 50%;
  background: #d0d0d0;
}
.license-modal .license-error {
  min-height: 0;
  margin: 10px 22px 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.35;
}
.license-modal .license-error:empty { display: none; }
.license-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 22px 8px;
}
.license-modal .license-buy.primary,
#licenseBuy.primary {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #f04752, #d01824);
  box-shadow: 0 6px 16px rgba(227, 28, 35, .28);
}
.license-modal .license-buy.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #f45a64, #c4121c);
}
.license-modal .license-buy.primary:disabled {
  box-shadow: none;
}
.license-modal .license-close {
  width: 100%;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #e0e0e0;
  color: #555;
  font-size: 13px;
  font-weight: 500;
}
.license-modal .license-close:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: #ccc;
}
.license-advanced {
  margin: 4px 22px 18px;
  padding: 0;
  border: none;
  font-size: 12px;
  color: var(--muted);
}
.license-advanced summary {
  cursor: pointer;
  user-select: none;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  color: #888;
  font-size: 11px;
}
.license-advanced summary::-webkit-details-marker { display: none; }
.license-advanced summary::before {
  content: "▸ ";
  color: #bbb;
}
.license-advanced[open] summary::before { content: "▾ "; }
.license-advanced[open] summary { margin-bottom: 8px; color: #666; }
.license-device {
  margin: 0 0 10px;
  font-size: 11px;
  color: #888;
}
.license-device code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  background: #f3f3f3;
  padding: 2px 6px;
  border-radius: 4px;
  color: #555;
}
.license-advanced .field { margin-bottom: 8px; }
.license-advanced .field input {
  border-radius: 8px;
  padding: 8px 10px;
}
.license-advanced .actions {
  justify-content: flex-start;
  margin-top: 0;
}
.license-advanced .actions button {
  border-radius: 8px;
  min-height: 30px;
  padding: 5px 12px;
}

#licenseModal.license-gate {
  z-index: 200;
  background: rgba(28, 28, 32, 0.62);
}
body.license-locked .app > :not(#licenseModal) {
  pointer-events: none;
  user-select: none;
  filter: grayscale(0.15);
}
body.license-locked #licenseModal {
  pointer-events: auto;
  filter: none;
}

.doc-tab.dirty .doc-tab-name { font-style: italic; }
.doc-tab.dirty { border-color: #f59e0b; }

/* Word-style Print dialog */
.modal.print-dialog {
  width: min(860px, 96vw);
  max-height: min(640px, 92vh);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.print-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px 8px; border-bottom: 1px solid #e5e5e5;
  position: relative;
}
.print-dialog-head h2 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; text-align: center; }
/* deskparity156: Cancel / Print live in head on all UIs; X stays desktop-only helper */
.print-dialog-head .ios-print-cancel,
.print-dialog-head .ios-print-go {
  border: 1px solid var(--border-dark, #c8c8c8);
  border-radius: 3px;
  background: #fff;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  min-width: 64px;
}
.print-dialog-head .ios-print-go.primary,
.print-dialog-head .ios-print-go {
  background: var(--accent, #0b57d0);
  border-color: var(--accent, #0b57d0);
  color: #fff;
  font-weight: 600;
}
.print-dialog-head .ios-print-cancel:hover { background: #f5f5f5; }
.print-close {
  border: none; background: transparent; font-size: 20px; line-height: 1;
  color: #666; cursor: pointer; padding: 2px 8px; border-radius: 3px;
  position: absolute; right: 8px; top: 8px;
}
.print-close:hover { background: #f0f0f0; color: #222; }
.ios-print-row-value { display: flex; align-items: center; gap: 4px; width: 100%; }
.ios-print-row-value select { flex: 1; }
.ios-chevron { display: none; }
.ios-stepper { display: inline-flex; align-items: center; gap: 0; }
.ios-stepper-btn {
  width: 26px; height: 26px; border: 1px solid #aaa; border-radius: 3px;
  background: #fff; cursor: pointer; font-size: 14px; line-height: 1;
}
.ios-stepper #printCopies { width: 48px !important; text-align: center; margin: 0 4px; }
.desktop-print-actions { display: flex; align-items: center; }
.print-dialog-body {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(280px, 1fr);
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.print-settings {
  padding: 12px 14px 8px;
  border-right: 1px solid #e8e8e8;
  overflow: auto;
  background: #fafafa;
}
.print-settings .field { margin-bottom: 10px; }
.print-settings select,
.print-settings input[type="text"],
.print-settings input[type="number"] {
  border: 1px solid var(--border-dark); border-radius: 3px;
  padding: 5px 6px; background: #fff; font-size: 12px; width: 100%;
  box-sizing: border-box;
}
.print-row {
  display: flex; align-items: flex-end; gap: 14px; margin-bottom: 10px;
}
.print-copies-field { flex: 0 0 88px; margin-bottom: 0 !important; }
.print-copies-field input { width: 72px; }
.print-check {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #333; user-select: none; cursor: pointer;
  margin: 0 0 4px;
}
.print-pref-pdf { margin-top: 10px; }
.print-fieldset {
  border: 1px solid #e0e0e0; border-radius: 4px;
  padding: 8px 10px 6px; margin: 0 0 10px; background: #fff;
}
.print-fieldset legend {
  font-size: 11px; color: var(--muted); padding: 0 4px;
}
.print-radio {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; margin: 4px 0; cursor: pointer; color: #333;
}
.print-pages-custom { flex-wrap: wrap; }
.print-pages-custom input[type="text"] {
  flex: 1 1 120px; min-width: 100px; margin-left: 4px;
}
.print-pages-custom input[type="text"]:disabled { opacity: .55; background: #f3f3f3; }
.print-preview-pane {
  display: flex; flex-direction: column; background: #e8e8e8;
  min-height: 360px; padding: 12px;
}
.print-preview-frame {
  flex: 1; min-height: 280px; display: flex; align-items: center; justify-content: center;
  background: #d0d0d0; border: 1px solid #bbb; border-radius: 2px;
  position: relative; overflow: hidden;
}
.print-preview-frame img {
  max-width: 92%; max-height: 92%;
  box-shadow: 0 2px 12px rgba(0,0,0,.28);
  background: #fff; display: none;
}
.print-preview-frame img.show { display: block; }
.print-preview-empty {
  position: absolute; color: #666; font-size: 12px; text-align: center; padding: 16px;
}
.print-preview-empty.hidden { display: none; }
.print-preview-nav {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 10px; font-size: 12px; color: #333;
}
.print-preview-nav button {
  width: 28px; height: 28px; border: 1px solid #aaa; border-radius: 3px;
  background: #fff; cursor: pointer; font-size: 16px; line-height: 1;
}
.print-preview-nav button:hover:not(:disabled) { background: #f0f7ff; border-color: #6a9fd8; }
.print-preview-nav button:disabled { opacity: .4; cursor: default; }
.print-dialog-actions {
  margin: 0; padding: 10px 14px 12px;
  border-top: 1px solid #e5e5e5; background: #fff;
}
@media (max-width: 700px) {
  .print-dialog-body { grid-template-columns: 1fr; }
  .print-settings { border-right: none; border-bottom: 1px solid #e8e8e8; max-height: 42vh; }
  .print-preview-pane { min-height: 240px; }
}


/* deskparity109 license remind */
.license-remind-banner {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: #5c3b00;
  background: linear-gradient(180deg, #ffe9a8 0%, #ffd56a 100%);
  border-bottom: 1px solid #e0b84a;
  cursor: pointer;
  z-index: 40;
}
.license-remind-banner.urgent {
  color: #4a1a00;
  background: linear-gradient(180deg, #ffd090 0%, #ffb347 100%);
}
.license-remind-banner.expired {
  color: #fff;
  background: linear-gradient(180deg, #e03131 0%, #c92a2a 100%);
  border-bottom-color: #9b1c1c;
}
body.license-locked .license-remind-banner {
  pointer-events: auto;
}


/* deskparity114: highlight/underline color swatches + measure bar */
.color-swatches {
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.color-swatches .swatch {
  width: 18px; height: 18px; border-radius: 3px; border: 1px solid #64748b;
  padding: 0; cursor: pointer; flex-shrink: 0;
}
.color-swatches .swatch.active {
  outline: 2px solid #2563eb; outline-offset: 1px; border-color: #1e40af;
}
.mark-style-bar, .measure-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 10px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}
.mark-style-bar[hidden], .measure-bar[hidden] { display: none !important; }
.mark-style-label { font-weight: 600; color: #334155; margin-right: 2px; }
.mark-width-wrap { display: inline-flex; align-items: center; gap: 4px; }
.mark-width-wrap input[type="range"] { width: 72px; }
.measure-bar .measure-mode {
  background: #fff; border: 1px solid #cbd5e1; border-radius: 4px;
  /* deskparity127: ~0.8× (was 4px 8px / 28px / 12px) */
  padding: 3px 6px; min-height: 24px; font-size: 10px; cursor: pointer;
}
.measure-bar .measure-mode.active {
  background: #111; color: #fff; border-color: #111; font-weight: 600;
}
.measure-bar .measure-done {
  background: #2563eb; color: #fff; border: none; border-radius: 4px;
  /* deskparity127: ~0.8× (was 4px 10px / 28px) */
  padding: 3px 8px; min-height: 24px; font-weight: 600; cursor: pointer; font-size: 10px;
}
.measure-live { color: #0f172a; font-weight: 600; margin-left: 4px; }
/* deskparity126: ONE compact calibrate row + scale readout + tools below */
.measure-bar {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
}
.measure-calibrate-row {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding-bottom: 4px;
  border-bottom: 1px dashed #cbd5e1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.measure-tools-row {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px; /* deskparity127: was 6px */
  width: 100%;
  min-height: 28px; /* deskparity127: was 34px ~0.8× */
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 6;
}
.measure-scale-readout {
  font-size: 10px; /* deskparity127: slight shrink with row */
  font-weight: 700;
  color: #0f172a;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  border-radius: 4px;
  padding: 2px 5px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.measure-scale-readout.is-empty {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
  font-weight: 600;
}

/* deskparity126: compact Known length ON calibrate row (not a second full-width row) */
.measure-cal-inputs {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  width: auto !important;
  max-width: none;
  padding: 1px 3px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  pointer-events: auto !important;
  touch-action: manipulation;
  position: relative;
  z-index: 5;
  color: #111;
  min-width: 0;
}
.measure-cal-inputs[hidden] { display: none !important; }
.measure-cal-inputs.cal-input-highlight {
  border-color: #f59e0b;
  outline: 2px solid #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}
.measure-cal-label { display: none !important; } /* redundant — removed from DOM */
.measure-cal-length {
  /* deskparity128: ~75% of prior (52/30/16 → 39/22/12) */
  width: 39px; min-width: 36px; min-height: 22px; padding: 1px 3px; font-size: 12px;
  border: 1px solid #64748b; border-radius: 3px;
  color: #111 !important; background: #fff !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.measure-cal-unit {
  /* deskparity128: ~75% with length input */
  min-width: 36px; width: 36px; min-height: 22px; padding: 1px 1px; font-size: 11px;
  border: 1px solid #64748b; border-radius: 4px;
  color: #111 !important; background: #fff !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-appearance: menulist;
  appearance: menulist;
}
.measure-cal-apply {
  background: #0ea5e9; color: #fff; border: none; border-radius: 4px;
  /* deskparity127: ~0.8× with mode buttons (was 4px 8px / 30px / 12px) */
  padding: 3px 6px; min-height: 24px; font-weight: 600; cursor: pointer; font-size: 10px;
  pointer-events: auto !important;
  touch-action: manipulation;
  flex: 0 0 auto;
}
/* Clear moved to gbar #btnClearAnnos (CLR) — keep class inert if leftover */
.measure-cal-clear { display: none !important; }
#calibrateModal.modal-backdrop { display: none !important; z-index: -1 !important; }
/* deskparity126 leftover #measureCancel stay hidden if present */
.measure-bar .measure-cancel,
#measureCancel {
  display: none !important;
}

/* deskparity128: Done = commit/deselect measure handles (stay in Measure) */
.measure-bar .measure-points-done,
#measurePointsDone {
  display: inline-flex;
  align-items: center;
  background: #059669; color: #fff; border: none; border-radius: 4px;
  padding: 3px 6px; min-height: 24px; font-weight: 600; cursor: pointer; font-size: 10px;
}
/* deskparity127: tools-row Clear (measure objects only; keep scale) */
.measure-bar .measure-tools-clear,
#measureClear {
  display: inline-flex;
  align-items: center;
  background: #64748b; color: #fff; border: none; border-radius: 4px;
  padding: 3px 6px; min-height: 24px; font-weight: 600; cursor: pointer; font-size: 10px;
}

#colorLabel { font-size: 11px; color: var(--muted); margin-right: 2px; }
/* deskparity126: remove bottom 1mm=pt live strip under tools row entirely */
.measure-live,
#measureLive {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  font-size: 0 !important;
}


/* deskparity126: Finish button (was Done) — always shown while measure bar open */
.measure-bar .measure-done {
  display: inline-flex;
  align-items: center;
}

/* deskparity126: Measure text button immediately right of Clear; Clear+Measure ≈1.2× */
.gbar-group.zoom-fit-group #btnClearAnnos,
#btnClearAnnos {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 5px 10px;
  min-width: auto;
}
.gbar-group.zoom-fit-group #btnClearAnnos span.txt,
#btnClearAnnos span.txt {
  display: inline !important;
  font-size: 13px;
  line-height: 1;
}
.gbar-group.zoom-fit-group .measure-gbar-btn,
#btnMeasureTool.measure-gbar-btn {
  font-size: 13px; /* was 11px ×1.2 */
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 5px 10px; /* was 4px 8px ×1.2 */
  min-width: auto;
}
.gbar-group.zoom-fit-group .measure-gbar-btn .ico,
#btnMeasureTool .ico { display: none !important; }
.gbar-group.zoom-fit-group .measure-gbar-btn span.txt,
#btnMeasureTool span.txt {
  display: inline !important;
  font-size: 13px;
  line-height: 1;
}

/* deskparity126: Fit ≈1.2× with Clear/Measure */
.gbar-group.zoom-fit-group #btnFit,
#btnFit {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 5px 10px;
  min-width: auto;
}
.gbar-group.zoom-fit-group #btnFit span,
#btnFit span {
  display: inline !important;
  font-size: 13px;
  line-height: 1;
}

/* deskparity222: Office-style text symbols */
.office-text-sym {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; min-height: 16px;
  font-family: "Segoe UI", "Segoe UI Symbol", system-ui, -apple-system, sans-serif;
  font-size: 13px; font-weight: 700; line-height: 1; color: currentColor;
  pointer-events: none;
}
.office-text-sym.office-u u { text-decoration-thickness: 2px; text-underline-offset: 1px; }
.office-text-sym.office-strike s { text-decoration-thickness: 2px; font-size: 11px; font-weight: 700; letter-spacing: -0.02em; }
.office-text-sym.office-edit { gap: 0; }
.office-text-sym.office-edit .ots-letter { font-size: 14px; font-weight: 700; }
.office-text-sym.office-edit .ots-caret {
  font-size: 12px; font-weight: 400; opacity: .85; margin-left: 1px;
  animation: officeCaretBlink 1s step-end infinite;
}
@keyframes officeCaretBlink { 50% { opacity: 0; } }

.box-office-fmt { margin-top: 2px; }
.office-fmt-btn {
  flex: 0 0 auto;
  width: 32px; min-width: 32px; height: 32px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border, #c9ced6);
  border-radius: 4px;
  background: #fff;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px; font-weight: 700; color: #222;
  cursor: pointer; line-height: 1;
}
.office-fmt-btn:hover { background: #f3f4f6; }
.office-fmt-btn[aria-pressed="true"],
.office-fmt-btn.on {
  outline: 2px solid #2b579a;
  background: #e8f0fe;
}
.office-fmt-btn:disabled { opacity: .45; cursor: not-allowed; }
.office-fmt-btn b, .office-fmt-btn i { font-size: 14px; font-weight: 700; }
.office-fmt-btn i { font-style: italic; font-family: Georgia, "Times New Roman", serif; }
.office-fmt-btn.office-font-color {
  width: 32px; flex-direction: column; gap: 1px; padding: 2px 0 3px;
}
.office-fmt-btn.office-font-color .fc-letter {
  font-size: 14px; font-weight: 700; color: #222; line-height: 1;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
.office-fmt-btn.office-font-color .fc-bar {
  display: block; width: 14px; height: 3px; border-radius: 1px;
  background: #111827; border: 0; box-shadow: none; flex: 0 0 auto;
}
.office-fmt-btn.office-omega {
  font-family: "Segoe UI Symbol", "Segoe UI", serif;
  font-size: 15px; font-weight: 600;
}

.symbol-modal { max-width: min(420px, 94vw); }
.symbol-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  max-height: min(50vh, 320px);
  overflow: auto;
  padding: 4px;
  margin: 8px 0 4px;
  border: 1px solid var(--border, #c9ced6);
  border-radius: 6px;
  background: #fafafa;
}
.symbol-grid button.sym-cell {
  width: 100%; aspect-ratio: 1;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #fff;
  font-size: 16px;
  font-family: "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", sans-serif;
  cursor: pointer; line-height: 1;
  color: #111;
}
.symbol-grid button.sym-cell:hover,
.symbol-grid button.sym-cell:focus {
  border-color: #2b579a;
  background: #e8f0fe;
  outline: none;
}
@media (max-width: 420px) {
  .symbol-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* deskparity222-mime */
