/* Compact task tools share the existing application toolbar. */
.taskContextUi .appToolbar { gap:6px; }
.taskContextUi .toolbarSpacer { display:none; }
.taskContextUi .toolbarProjectState { display:none; }
.taskBar { display:flex; align-items:center; gap:8px; min-width:80px; flex:1 1 auto; overflow-x:auto; scrollbar-width:thin; padding:2px 0; }
.taskTabs { display:flex; align-items:center; gap:3px; flex:0 0 auto; }
.taskButton { display:flex; align-items:center; justify-content:center; flex:0 0 36px; width:36px; height:36px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--text-secondary); font-family:inherit; cursor:pointer; }
.taskButton[hidden] { display:none; }
.taskButton:hover:not(:disabled),.taskButton[aria-pressed="true"] { background:var(--bg-elevated); color:var(--text-main); }
.taskButton[aria-pressed="true"] { box-shadow:inset 0 -3px var(--accent); }
.taskButton:disabled { opacity:.45; cursor:not-allowed; }
.taskButton:focus-visible { outline:2px solid var(--accent-border); outline-offset:-2px; }
.taskButtonLabel { display:none; }
.taskSymbol { font:700 17px/1 ui-sans-serif,Arial,sans-serif; text-align:center; }
#taskCommon { flex:0 0 auto; border-left:1px solid var(--border-soft); padding-left:8px; }
#taskCommon .commonMarks { border:0; margin:0; padding:0; }
#taskCommon .sectionLabel { display:none; }
#taskCommon .commonMarksRow { display:flex; margin:0; gap:3px; }
.reworkUi #taskCommon .colorBtn { display:flex; align-items:center; justify-content:center; width:36px; min-width:36px; min-height:36px; height:36px; padding:0; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--text-secondary); }
.reworkUi #taskCommon .colorBtn::before,.reworkUi #taskCommon .colorBtn::after { display:none; }
.reworkUi #taskCommon .colorBtn[aria-pressed="true"] { box-shadow:inset 0 -3px var(--marker-color); background:var(--bg-elevated); }
.taskTooltip { position:fixed; z-index:10000; max-width:min(280px,calc(100vw - 16px)); padding:9px 12px; border:1px solid var(--border-main); border-radius:8px; background:var(--bg-elevated); color:var(--text-main); box-shadow:0 4px 18px #0003; font-family:inherit; font-size:12px; line-height:1.5; pointer-events:none; }
.taskTooltip[hidden] { display:none; }
@media(min-width:768px) {
  .taskContextUi .toolbarBrand { min-width:0; padding-right:6px; }
  .taskContextUi .toolbarGroup { flex:0 0 auto; }
}
@media(min-width:768px) and (max-width:1399px) {
  .taskContextUi .toolbarBrandCopy { display:none; }
  .taskContextUi .toolbarBrandMark { display:grid; }
  .taskContextUi .portalReturnButton span { display:none; }
  .taskContextUi .portalReturnButton { width:36px; min-width:36px; padding:0; }
  .taskContextUi .toolbarTextBtn span { display:none; }
  .taskContextUi #saveProjectBtn,.taskContextUi #cloudProjectsBtn,.taskContextUi #openExportDialogBtn { width:36px; min-width:36px; padding:0; }
  .taskContextUi .themePicker { width:36px; min-width:36px; padding:0; justify-content:center; }
  .taskContextUi .themePickerSelect { position:absolute; inset:0; width:100%; opacity:0; }
}
@media(min-width:768px) and (max-width:1800px) {
  .taskContextUi.hasCloudEditorBar .cloudEditorBar { min-width:84px; flex:0 0 auto; padding:3px; }
  .taskContextUi.hasCloudEditorBar .cloudEditorActions .btn { width:36px; min-width:36px; padding:0; }
  .taskContextUi.hasCloudEditorBar .cloudEditorActions .btn span { display:none; }
}
.contextEditor .modeSwitch,.contextEditor > #mainEditorTitle,.contextEditor #palette > .paletteGroup > summary { display:none!important; }
.contextEditor #palette { gap:0; }
.contextEditor #palette > .paletteGroup { background:transparent; }
.contextEditor .paletteGroupItems { padding:0; }
.contextEditor #palette .colorBtn { min-height:38px; }
.contextEditor #palette .colorBtn span { text-align:left; font-weight:600; padding-right:10px; }
.contextEditor #newMarkTypeBtn { margin-top:8px; }
.contextEditor #inlinePresetBox { margin:12px 0; padding:0; background:transparent; box-shadow:none; }
.contextEditor #inlinePresetMeta { display:none; }
.contextEditor .presetGrid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.contextEditor .presetBtn { min-height:34px; white-space:normal; }
.contextEditor .presetGrid.componentPresetGrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.contextEditor #newText { min-height:64px; max-height:150px; }
.contextEditor #editorStateHint { font-size:11px; line-height:1.4; }
.contextEditor .multiModeBox { background:transparent; border:0; padding:8px 0; margin:8px 0; box-shadow:none; }
.contextEditor .multiModeBox > .presetHint { display:none; }
.contextDetails { border-top:1px solid var(--border-soft); margin-top:4px; }
.contextDetails > summary { padding:12px 0; color:var(--text-secondary); font-size:13px; font-weight:600; cursor:pointer; }
.contextDetails > summary:focus-visible { outline:2px solid var(--accent-border); }
.contextDetails[open] { padding-bottom:12px; }
.contextDetails .markAppearance { margin:0; padding:0; border:0; background:transparent; }
.contextEditor .taskColorSettings .markAppearance { border:0; padding:0; margin:8px 0; background:transparent; }
.contextEditor .taskColorSettings .markColorSwatches { display:none; }
.contextEditor .editorActions { margin:8px 0; }
.contextEditor .editorActions .subtle,.contextEditor .annotationModeBadge { display:none; }
.reworkUi .contextEditor > .field:first-of-type { margin-top:0; }
body.phoneViewerMode .taskBar { display:none!important; }

.contextEditor #inlinePresetBox > label { display:none; }
.contextEditor #contextPresetDetails #inlinePresetBox { margin:0; }
.taskSymbol .uiIcon { width:18px; height:18px; display:block; }

@media(max-width:767px) { .taskBar { display:none!important; } }
@media(min-width:1400px) { .taskContextUi #saveProjectBtn { width:auto; min-width:max-content; flex:0 0 auto; } }

.taskBar [data-tooltip]::after { display:none; }
@media(min-width:768px) {
  .taskContextUi .toolbarBrand { flex:0 0 auto; }
  .taskContextUi .portalReturnButton span,.taskContextUi #cloudProjectsBtn span,.taskContextUi #openExportDialogBtn span { display:none; }
  .taskContextUi .portalReturnButton,.taskContextUi #cloudProjectsBtn,.taskContextUi #openExportDialogBtn { width:36px; min-width:36px; padding:0; }
  .taskContextUi .themePicker { width:36px; min-width:36px; padding:0; justify-content:center; }
  .taskContextUi .themePickerSelect { position:absolute; inset:0; width:100%; opacity:0; }
}
@media(min-width:768px) and (max-width:1399px) {
  .taskContextUi #saveProjectBtn span { display:none; }
}

@media(min-width:768px) { body.taskContextUi { --toolbar-height:60px; } }

.taskScrollButton { flex:0 0 22px; width:22px; height:36px; padding:0; border:0; border-radius:6px; background:var(--bg-elevated); color:var(--text-main); font-size:24px; cursor:pointer; }
.taskScrollButton[hidden] { display:none; }
.taskScrollButton:focus-visible { outline:2px solid var(--accent-border); }
@media(max-width:767px) { .taskScrollButton { display:none; } }

/* Fixed icon boxes override legacy full-width colour-label spans. */
.taskContextUi .taskSymbol,
.taskContextUi #taskCommon .colorBtn .taskSymbol { display:grid; place-items:center; flex:0 0 20px; width:20px; height:20px; min-width:20px; padding:0; margin:0; overflow:visible; line-height:0; }
.taskContextUi .taskSymbol .markerIcon { display:block; width:20px; height:20px; margin:0; vertical-align:0; }
.markerIcon { fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.taskScrollButton { display:grid; place-items:center; }
.reworkUi .componentPreset { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.reworkUi .componentPreset .componentPresetLabel { flex:1 1 auto; min-width:0; text-align:left; }
.reworkUi .componentPreset .markerIcon { display:block; flex:0 0 18px; width:18px; height:18px; }
.reworkUi .sidebar .layerNameButton { display:flex; align-items:center; gap:6px; }
.reworkUi .sidebar .layerNameButton .markerIcon { display:block; flex:0 0 18px; width:18px; height:18px; }
.reworkUi .sidebar .layerNameLabel { min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:1.35; }

/* The semantic icon also carries the layer colour, leaving room for the name. */
.reworkUi .sidebar .layerRow { grid-template-columns:28px 28px minmax(0,1fr); }
.reworkUi .sidebar .layerRow > .layerDot { display:none; }
.reworkUi .sidebar .layerNameButton .markerIcon { color:var(--layer-icon-color); }

/* Shared semantic colour: toolbar, layer list and common marks use the same source. */
.taskContextUi .taskButton .markerIcon { color:var(--task-color,var(--text-secondary)); }
.taskContextUi .taskButton[aria-pressed="true"] { box-shadow:inset 0 -3px var(--task-color,var(--accent)); background-color:color-mix(in srgb,var(--task-color,var(--text-secondary)) 12%,var(--bg-sidebar)); }
.taskContextUi #taskCommon .colorBtn .markerIcon { color:var(--marker-color); }
/* The note tool uses the same quiet neutral tone as other white toolbar icons.
   Its semantic color still controls saved notes, presets and the active stripe. */
.taskContextUi .taskButton[data-task="custom"] .markerIcon { color:var(--text-secondary); }
.taskContextUi #taskCommon .colorBtn[aria-pressed="true"] { box-shadow:inset 0 -3px var(--marker-color); background-color:color-mix(in srgb,var(--marker-color) 12%,var(--bg-sidebar)); }
@media(min-width:768px) { .taskContextUi .toolbarImageDivider { display:block; } }
.taskContextUi .appRail { padding-inline:4px; }
.taskContextUi .appRail .railButton[data-panel="markup"] span { font-size:10px; }

/* Product artwork is kept in full colour in both themes. */
.boardMarkerLogo { display:block; object-fit:contain; filter:none; }
.taskContextUi .toolbarBrandMark { background:transparent; border:0; box-shadow:none; }
.toolbarBrandMark .boardMarkerLogo { width:36px; height:36px; }
.phoneViewerWelcomeIcon .boardMarkerLogo { width:100%; height:100%; }
.emptyIcon.boardMarkerLogo { margin-inline:auto; }
.phoneViewerWelcomeIcon { background:transparent; border:0; box-shadow:none; }

/* Keep helper copy separate from the next control or content group. */
.taskContextUi { --panel-copy-gap:12px; }
.taskContextUi :is(.sidebar .card,.reworkInspector .card,dialog) :is(.subtle,.hint,.presetHint,.editorStateHint) { margin-block:var(--panel-copy-gap); }
.taskContextUi :is(.sidebar .card,.reworkInspector .card,dialog) :is(.subtle,.hint,.presetHint,.editorStateHint):last-child { margin-bottom:0; }
.taskContextUi .elementList { margin-top:var(--panel-copy-gap); }
/* The legend already uses grid gap; do not add paragraph/field margins to it. */
.taskContextUi .sidebar #legendCard { gap:var(--panel-copy-gap); }
.taskContextUi .sidebar #legendCard > :is(.subtle,.field,.toggleRow,.cardTitle) { margin-block:0; }
.taskContextUi .signalSuggestions:empty { display:none; }
.taskContextUi .signalSuggestions { row-gap:8px; }
.taskContextUi #signalSuggestions > .subtle { margin:0; }

/* Common marks are the same toolbar controls, not palette tiles. */
.taskContextUi #taskCommon .colorBtn:disabled { opacity:.45; cursor:not-allowed; }
.taskContextUi .taskButton > .markerIcon { width:20px; height:20px; }
