/* PowerPoint Studio + shared cross-app/result-picker styles.
   Reuses the Studio design tokens (--st-*) defined in studio.css. */

/* --- shared bits used by both new apps --- */
.st-btn.ghost { background: transparent; border-color: var(--st-line); color: var(--st-ink-soft); }
.st-btn.ghost:hover { background: var(--st-line-soft); color: var(--st-ink); }
.st-ai-hint { font-size: 12px; color: var(--st-ink-soft); margin: 4px 0 8px; line-height: 1.5; }

.ca-bar { display: flex; flex-wrap: wrap; gap: 6px; }

/* result picker (platform/result-picker.js) */
.rp { display: flex; flex-direction: column; gap: 10px; }
.rp-head { display: flex; gap: 8px; }
.rp-search { flex: 1; border: 1px solid var(--st-line); border-radius: 7px; padding: 8px 10px; background: var(--st-bg); color: var(--st-ink); }
.rp-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-facet { border: 1px solid var(--st-line); border-radius: 6px; padding: 5px 8px; background: var(--st-panel); color: var(--st-ink); font-size: 12px; }
.rp-body { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.3fr); gap: 12px; }
.rp-list { max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.rp-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--st-line); border-radius: 9px; cursor: pointer; background: var(--st-panel); }
.rp-item:hover { background: var(--st-line-soft); }
.rp-item.sel { border-color: var(--st-accent); box-shadow: 0 0 0 1px var(--st-accent) inset; }
.rp-item-main { flex: 1; min-width: 0; }
.rp-item-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-item-sub { font-size: 11px; color: var(--st-ink-soft); }
.rp-item-type { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--st-ink-soft); border: 1px solid var(--st-line); border-radius: 999px; padding: 1px 7px; }
.rp-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--st-ink-soft); }
.rp-dot.ok { background: var(--st-ok); } .rp-dot.warn { background: var(--st-warn); }
.rp-dot.bad { background: var(--st-bad); } .rp-dot.review { background: var(--st-review); } .rp-dot.muted { background: var(--st-ink-soft); }
.rp-right { display: flex; flex-direction: column; gap: 8px; }
.rp-preview { border: 1px solid var(--st-line); border-radius: 10px; padding: 10px; min-height: 140px; background: var(--st-panel); overflow: auto; max-height: 320px; }
.rp-preview-empty { color: var(--st-ink-soft); text-align: center; padding: 40px 0; }
.rp-fig svg { max-width: 100%; height: auto; }
.rp-text { font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.rp-json { font-size: 11px; white-space: pre-wrap; }
.rp-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.rp-table th, .rp-table td { border: 1px solid var(--st-line); padding: 4px 7px; text-align: left; }
.rp-table-more { font-size: 11px; color: var(--st-ink-soft); margin-top: 4px; }
.rp-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.rp-meta-row { display: flex; justify-content: space-between; }
.rp-meta-row span { color: var(--st-ink-soft); }
.rp-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--st-line); padding-top: 8px; }
.rp-mode-wrap { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--st-ink-soft); }
.rp-mode { border: 1px solid var(--st-line); border-radius: 6px; padding: 5px 8px; background: var(--st-panel); color: var(--st-ink); }
.rp-insert { background: var(--st-accent); color: #fff; border: 0; border-radius: 7px; padding: 7px 16px; font-weight: 600; cursor: pointer; }
.rp-empty { color: var(--st-ink-soft); padding: 24px; text-align: center; }

/* PowerPoint materials modal: single-row footer (Close left, actions right) */
.ps-materials-modal .hs-materials-foot {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

/* --- PowerPoint Studio editor --- */
.ps-office-root .studio {
  --ps-orange: #d24726;
  --ps-orange-dark: #a9361d;
  --ps-ribbon-hover: #f5e9e5;
  background: #e7e9ee;
}
.ps-office-root .st-toolbar { display: none; }
.ps-office-root .st-brand { min-width: 168px; }
.ps-office-root .st-body { position: relative; }
.ps-office-root .st-sidebar { display: none; }
.ps-office-root .st-sidebar-wrap { display: none; }
.ps-office-root .st-center { position: relative; min-width: 0; }
.ps-office-root .st-workspace {
  padding: 0;
  overflow: hidden;
  background: #eef1f6;
}
.ps-office-root .st-card {
  border: 1px solid #e1e3e8;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 32, 45, .04);
}
.ps-office-root .st-ai {
  position: absolute;
  right: 22px;
  bottom: 92px;
  z-index: 40;
  flex: none;
  width: 0;
  height: 0;
  min-width: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(18, 28, 45, .24);
  transition: opacity .16s ease, transform .16s ease;
  opacity: 0;
  transform: translateY(8px) scale(.98);
  pointer-events: none;
}
.ps-office-root .studio.ai-open .st-ai {
  width: 360px;
  height: min(500px, calc(100% - 112px));
  flex-basis: auto;
  border: 1px solid var(--st-line);
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.ps-office-root .st-ai-head {
  padding: 8px 10px;
  color: #fff;
  background: linear-gradient(135deg, #3aa6a0, #2f6bff);
}
.ps-office-root .st-ai-body { padding: 10px; }
.ps-office-root .st-ai-msgs { gap: 6px; }
.ps-office-root .st-ai-msg {
  border-radius: 7px;
  padding: 7px 9px;
}
.ps-office-root .rs-ai-chat {
  margin: 8px 0;
  gap: 6px;
}
.ps-office-root .rs-ai-msg {
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
}
.ps-office-root .rs-ai-controls { gap: 6px; margin-top: 8px; }
.ps-office-root .rs-ai-suggestions {
  gap: 5px;
  margin-top: 7px;
}
.ps-ai-quick {
  display: flex;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--st-line);
}

.ps-editor {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  color: #242832;
  background: #e7e9ee;
  container-name: ppt-ribbon;
  container-type: inline-size;
  overflow: visible;
}
.ps-deckbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ps-objbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; background: var(--st-panel); border: 1px solid var(--st-line); border-radius: 9px; }
.ps-objbar-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--st-ink-soft); margin-right: 2px; }
.ps-objbar-sep { width: 1px; align-self: stretch; background: var(--st-line); margin: 0 4px; }
.st-color { width: 38px; height: 28px; padding: 0; border: 1px solid var(--st-line); border-radius: 6px; background: var(--st-bg); cursor: pointer; }

.ps-deck-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  background: #f8f8fa;
  border-bottom: 1px solid #d9dce3;
  overflow-x: auto;
}
.ps-deck-tabs-label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-right: 5px;
  padding-right: 10px;
  border-right: 1px solid #d9dce3;
  color: #555b68;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.ps-deck-tabs-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  color: #fff;
  background: var(--ps-orange);
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(80, 26, 12, .2);
}
.ps-deck-tab {
  flex: 0 0 auto;
  max-width: 190px;
  min-width: 92px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #656b77;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-deck-tab:hover { background: #eceef2; color: #242832; }
.ps-deck-tab.active {
  background: #fff;
  border-color: #d8dbe2;
  color: #20242d;
  box-shadow: 0 1px 2px rgba(25, 32, 45, .06);
}
.ps-deck-tab.add {
  min-width: 28px;
  width: 28px;
  padding-inline: 0;
  color: #6b7280;
  font-size: 16px;
}

.ps-office-root .ps-ribbon {
  flex: 0 0 auto;
  height: auto;
  color: #242832;
  background: #ffffff;
  border-bottom: 1px solid #cfd3db;
  box-shadow: 0 2px 5px rgba(25, 32, 45, .07);
  position: relative;
  z-index: 40;
  overflow: visible;
}
.ps-office-root .ps-ribbon-tabs {
  display: flex;
  align-items: center;
  align-self: auto;
  height: 29px;
  min-height: 29px;
  padding: 0 10px;
  border-bottom: 1px solid #e4e6ea;
}
.ps-ribbon-quick {
  display: flex;
  gap: 2px;
  margin-right: 8px;
  padding-right: 8px;
  border-right: 1px solid #e0e2e7;
}
.ps-ribbon-quick-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  color: #555c68;
  font-size: 15px;
}
.ps-ribbon-quick-btn:hover:not(:disabled) { background: #eceef2; color: #20242d; }
.ps-ribbon-quick-btn:disabled { opacity: .32; }
.ps-office-root .ps-ribbon-tabset {
  display: flex;
  height: 100%;
  align-self: stretch;
  align-items: stretch;
  gap: 2px;
}
.ps-office-root .ps-ribbon-tabs .ps-ribbon-tab {
  position: relative;
  height: 28px;
  padding: 4px 11px 3px;
  border: 0;
  border-radius: 0;
  color: #565c68;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}
.ps-office-root .ps-ribbon-tabs .ps-ribbon-tab:hover { background: #f3f3f5; color: #20242d; }
.ps-office-root .ps-ribbon-tabs .ps-ribbon-tab.active {
  color: var(--ps-orange-dark);
  background: transparent;
}
.ps-office-root .ps-ribbon-tabs .ps-ribbon-tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--ps-orange);
}
.ps-ribbon-context {
  min-width: 0;
  margin-left: auto;
  padding-left: 18px;
  color: #3d424c;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-ribbon-context-label {
  margin-right: 7px;
  color: #9297a2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ps-office-root .ps-ribbon-body {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 53px;
  min-height: 53px;
  padding: 3px 8px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  color: #242832;
  background: #fff;
  scrollbar-width: thin;
}
.ps-ribbon-group {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1px;
  min-width: 90px;
  padding: 0 8px;
  border-right: 1px solid #e1e3e8;
}
.ps-ribbon-group:first-child { padding-left: 0; }
.ps-ribbon-group:last-child { border-right: 0; }
.ps-ribbon-group.custom { min-width: 250px; }
.ps-ribbon-items {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 21px);
  grid-auto-columns: max-content;
  align-content: start;
  gap: 1px 4px;
}
.ps-ribbon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  min-width: 0;
  padding: 1px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #303540;
  background: transparent;
  font-size: 10.5px;
  line-height: 1.1;
}
.ps-ribbon-btn:hover {
  background: var(--ps-ribbon-hover);
  border-color: #ead0c8;
}
.ps-ribbon-btn.active {
  background: #f5e3de;
  border-color: #dc9e8d;
  color: var(--ps-orange-dark);
}
.ps-ribbon-btn.big {
  grid-row: span 2;
  width: 51px;
  height: 43px;
  padding: 3px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 2px;
}
.ps-ribbon-btn.primary {
  color: #fff;
  background: var(--ps-orange);
  border-color: var(--ps-orange);
}
.ps-ribbon-btn.primary:hover { background: var(--ps-orange-dark); border-color: var(--ps-orange-dark); }
.ps-ribbon-btn.ai { color: #176d68; background: #e8f4f2; border-color: #cae5e1; }
.ps-ribbon-btn.danger { color: var(--st-bad); }
.ps-ribbon-btn.disabled {
  opacity: .42;
  cursor: default;
}
.ps-canvas.ps-arming,
.ps-canvas.ps-arming .ps-block {
  cursor: crosshair;
}
.ps-draw-preview {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  border: 1.5px dashed var(--st-accent);
  background: color-mix(in srgb, var(--st-accent) 8%, transparent);
  border-radius: 3px;
}
.ps-draw-preview.ellipse { border-radius: 50%; }
.ps-draw-preview.line {
  border: 0;
  background: transparent;
  border-top: 2px solid var(--st-accent);
  border-radius: 0;
}
.ps-ribbon-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  min-width: 16px;
  height: 16px;
  font-weight: 800;
  line-height: 1;
}
.ps-ribbon-btn.big .ps-ribbon-icon {
  width: 18px;
  height: 18px;
  font-size: 15px;
}
.ps-ribbon-text {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-ribbon-btn.big .ps-ribbon-text {
  max-width: 48px;
  white-space: nowrap;
  line-height: 1;
}
.ps-ribbon-label {
  color: #888e99;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .02em;
  text-align: center;
  white-space: nowrap;
}
.ps-ribbon-name {
  display: flex;
  align-items: center;
  width: 230px;
  min-height: 42px;
}

.ps-editor-main {
  display: grid;
  grid-template-columns: var(--ps-rail-w, 124px) 5px minmax(0, 1fr);
  gap: 0;
  flex: 1;
  min-height: 0;
}
.ps-rail-resizer {
  width: 5px; cursor: col-resize; background: transparent; z-index: 2;
}
.ps-rail-resizer:hover,
.ps-rail-resizer.is-dragging {
  background: color-mix(in srgb, var(--st-accent, #2f6bff) 35%, transparent);
}
.ps-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  padding: 10px 8px 12px;
  background: #f5f5f7;
  border-right: 1px solid #cfd3da;
}
.ps-thumb {
  position: relative;
  border: 2px solid #d0d3da;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  aspect-ratio: 16/9;
  flex: 0 0 auto;
  box-shadow: 0 2px 5px rgba(25, 32, 45, .08);
}
.ps-thumb:hover { border-color: #aeb3be; }
.ps-thumb.active {
  border-color: var(--ps-orange);
  box-shadow: 0 0 0 1px var(--ps-orange), 0 3px 8px rgba(112, 41, 22, .13);
}
.ps-thumb-n { position: absolute; top: 3px; left: 4px; z-index: 2; font-size: 10px; font-weight: 700; color: var(--st-ink-soft); background: rgba(255,255,255,.7); border-radius: 3px; padding: 0 3px; }
.ps-thumb-canvas { position: absolute; inset: 0; pointer-events: none; }
.ps-thumb-canvas .ps-canvas { width: 100%; height: 100%; pointer-events: none; }
.ps-thumb-canvas .ps-block,
.ps-thumb-canvas .js-plotly-plot,
.ps-thumb-canvas svg,
.ps-thumb-canvas img { pointer-events: none; }

.ps-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  position: relative;
  z-index: 0;
  min-width: 0;
  min-height: 0;
  padding: 14px 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.42), transparent 42%),
    #d9dce2;
}
.ps-canvas-wrap { width: min(100%, 1200px); }
.ps-canvas { position: relative; width: 100%; aspect-ratio: 16/9; container-type: size; border: 1px solid rgba(20,30,50,.18); border-radius: 4px; overflow: hidden; box-shadow: 0 10px 30px rgba(18, 28, 45, .18); }
.ps-band { position: absolute; left: 0; top: 0; width: 100%; height: 16%; z-index: 0; pointer-events: none; }
.ps-block { position: absolute; padding: 4px; overflow: visible; box-sizing: border-box; cursor: move; border: 1px solid transparent; touch-action: none; user-select: none; -webkit-user-select: none; z-index: 1; }
.ps-block:hover { border-color: color-mix(in srgb, var(--st-accent) 40%, transparent); }
.ps-block.sel { border-color: var(--st-accent); box-shadow: 0 0 0 1px var(--st-accent); }
.ps-block.locked { cursor: default; }
/* The lock is a hint for the block under the pointer, not decoration: shown
   on every master shape it littered each slide and every thumbnail with
   padlocks. */
.ps-block.locked::after { content: "🔒"; position: absolute; top: 2px; left: 2px; font-size: 10px; opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.ps-block.locked:hover::after,
.ps-block.locked.sel::after { opacity: .65; }
.ps-thumb .ps-block.locked::after,
.ps-thumb-canvas .ps-block.locked::after,
.ps-present .ps-block.locked::after { display: none; }
.ps-canvas.ps-dragging { cursor: grabbing; user-select: none; }
.ps-canvas.ps-dragging .ps-block { transition: none; }
.ps-block-text { width: 100%; height: 100%; white-space: pre-wrap; overflow: hidden; line-height: 1.25; user-select: text; -webkit-user-select: text; cursor: text; }
.ps-canvas.ps-dragging .ps-block-text { user-select: none; -webkit-user-select: none; cursor: move; }
.ps-block-text.editing { overflow: hidden; outline: 2px solid var(--st-accent); outline-offset: 1px; cursor: text; background: color-mix(in srgb, var(--st-accent) 6%, transparent); user-select: text; }
.ps-block-shape { pointer-events: auto; }
.ps-block-line { pointer-events: auto; display: block; }
.ps-block > .ps-block-img,
.ps-block > .ps-block-fig,
.ps-block > .ps-block-fig svg,
.ps-block > .ps-block-table,
.ps-block > .ps-block-ph { pointer-events: auto; user-select: none; -webkit-user-drag: none; }

/* selection handles */
.ps-handle { position: absolute; width: 11px; height: 11px; background: #fff; border: 1.5px solid var(--st-accent); border-radius: 2px; z-index: 5; box-shadow: 0 1px 3px rgba(0,0,0,.2); touch-action: none; }
.ps-h-nw { left: -6px; top: -6px; cursor: nwse-resize; }
.ps-h-ne { right: -6px; top: -6px; cursor: nesw-resize; }
.ps-h-sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.ps-h-se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.ps-rotate { left: 50%; top: -22px; transform: translateX(-50%); border-radius: 50%; background: var(--st-accent); cursor: grab; }
.ps-rotate::before { content: ""; position: absolute; left: 50%; top: 10px; width: 1px; height: 12px; background: var(--st-accent); }
.ps-block-fig { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
.ps-block-fig svg { width: 100%; height: 100%; max-width: 100%; max-height: 100%; }
.ps-block-img { width: 100%; height: 100%; object-fit: contain; }
.ps-block-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #9aa3b2; font-size: 11px; border: 1px dashed #cdd4e2; text-align: center; }
.ps-block-diagram { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: var(--st-ink); }
.ps-block-table { width: 100%; border-collapse: collapse; font-size: 9px; table-layout: fixed; }
.ps-block-table th, .ps-block-table td {
  border: 1px solid #e2e6ee;
  padding: 5px 7px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.28;
  vertical-align: middle;
}
.ps-block-table th { background: rgba(0,0,0,.04); font-weight: 700; }
.ps-block-table tr.zebra td { background: #f4f6fa; }
.ps-block-table.journal { border: 0; }
.ps-block-table.journal th,
.ps-block-table.journal td {
  border: 0;
  border-bottom: 1px solid var(--ps-table-line, #e8ebf0);
  padding: 6px 8px;
  font-variant-numeric: tabular-nums;
}
.ps-block-table.journal th {
  border-bottom: 2px solid var(--ps-table-rule, #0b5e58);
  font-weight: 750;
}
.ps-block-table.journal td.num,
.ps-block-table.scientific td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ps-block-table.journal td.emph,
.ps-block-table.scientific td.emph { font-weight: 750; }
.ps-block-table.scientific { border: 0; }
.ps-block-table.scientific th,
.ps-block-table.scientific td {
  border: 0;
  border-bottom: 1px solid var(--ps-table-line, #e2e8ee);
  padding: 7px 10px;
  font-variant-numeric: tabular-nums;
}
.ps-block-table.scientific th {
  background: var(--ps-table-head, #0b3a66);
  color: var(--ps-table-head-ink, #fff);
  border-bottom: 0;
  font-weight: 700;
  letter-spacing: .01em;
}
.ps-block-table.scientific tbody tr:nth-child(even) td {
  background: var(--ps-table-zebra, #f3f6f8);
}

/* inline table editing (selected/interactive canvas) */
.ps-block > .ps-tbl-edit-wrap { pointer-events: auto; }
.ps-tbl-edit-wrap { width: 100%; height: 100%; overflow: hidden; }
.ps-tbl-editable input.ps-tbl-input {
  width: 100%; min-width: 24px; border: 0; background: transparent;
  font: inherit; color: inherit; padding: 0; outline: none; user-select: text;
}
.ps-tbl-editable input.ps-tbl-input:focus { background: #eef4ff; }
.ps-tbl-head-cell { display: flex; align-items: center; gap: 2px; }
.ps-tbl-head-cell input.ps-tbl-input { font-weight: 700; }
.ps-tbl-tool {
  border: 0; background: transparent; color: #9aa3b2; font-size: 9px; line-height: 1;
  padding: 1px 3px; border-radius: 3px; cursor: pointer; opacity: 0; transition: opacity .12s ease;
}
.ps-tbl-tool:hover { background: #e8eefb; color: #2f6bff; }
.ps-tbl-tool.danger:hover { background: #fde8e8; color: #c0392b; }
.ps-block:hover .ps-tbl-tool { opacity: 1; }
.ps-tbl-rowtool { width: 16px; border: 0 !important; background: transparent !important; padding: 0 !important; text-align: center; }
.ps-tbl-addrow { display: flex; justify-content: flex-start; padding: 1px 0; }
.ps-resize { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; background: var(--st-accent); cursor: nwse-resize; border-radius: 2px 0 6px 0; opacity: 0; }
.ps-block.sel .ps-resize { opacity: 1; }
.ps-link-badge { position: absolute; top: 2px; right: 2px; font-size: 10px; background: rgba(255,255,255,.8); border-radius: 3px; padding: 0 2px; }
.ps-live-source-badge { border: 1px solid rgba(15,23,42,.18); color: #0f766e; cursor: pointer; line-height: 1.2; }
.ps-live-source-badge:hover { background: #ccfbf1; }

.ps-ai-fab {
  position: absolute;
  right: 22px;
  bottom: 45px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  z-index: 45;
  cursor: pointer;
  background: linear-gradient(135deg, #2b9a91, #236ed1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(18, 28, 45, .24);
  transition: transform .12s ease, box-shadow .12s ease;
}

.ps-statusbar {
  flex: 0 0 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 0 10px;
  border-top: 1px solid #cdd1d8;
  color: #505662;
  background: #f8f8fa;
  font-size: 10px;
}
.ps-status-left,
.ps-status-right {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.ps-status-right { margin-left: auto; }
.ps-status-sep {
  width: 1px;
  height: 12px;
  background: #d5d8de;
}
.ps-status-muted { color: #9096a1; }
.ps-status-link {
  padding: 2px 6px;
  border-radius: 4px;
  color: #176d68;
  background: #e7f3f1;
  font: inherit;
}
.ps-status-link:hover { background: #d7ebe8; }
.ps-status-selection {
  max-width: 150px;
  overflow: hidden;
  color: #343943;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-status-zoom {
  color: #6e7480;
  font-weight: 650;
}

@media (max-width: 980px) {
  .ps-ribbon-context { display: none; }
  .ps-deck-tabs-label span:last-child { display: none; }
  .ps-deck-tabs-label { margin-right: 2px; padding-right: 8px; }
  .ps-stage { padding: 20px; }
}

@media (max-height: 680px) {
  .ps-stage { padding-block: 10px; }
}
.ps-ai-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 30px rgba(18, 28, 45, .28);
}
.ps-office-root .studio.ai-open .ps-ai-fab {
  background: linear-gradient(135deg, #2f6bff, #20345f);
}

.ps-tool-page {
  height: 100%;
  overflow: auto;
  padding: 16px;
  background: #eef1f6;
}
.ps-tool-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -16px -16px 14px;
  padding: 10px 16px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--st-line);
  backdrop-filter: blur(min(8px, var(--bs-max-blur, 8px)));
  font-weight: 700;
}

.ps-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ps-tpl { border: 1px solid var(--st-line); border-radius: 9px; padding: 16px 12px; cursor: pointer; background: var(--st-panel); aspect-ratio: 16/10; display: flex; align-items: flex-end; }
.ps-tpl:hover { border-color: var(--st-accent); background: var(--st-line-soft); }
.ps-tpl-name { font-size: 12.5px; font-weight: 600; }

textarea.st-input { width: 100%; resize: vertical; font: inherit; }

/* Project materials page (reuses Report Studio .rs-* picker styles) */
.ps-materials-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 920px;
}
.ps-materials-intro {
  margin: 0 0 4px;
  line-height: 1.5;
  font-size: 13px;
}
.ps-office-root .ps-tool-page .ps-materials-page .rs-scope-bar {
  margin-top: 0;
}

.ps-materials-overlay { z-index: 13000; }

/* Shared canvas engine: marquee select + multi-selection */
.ps-marquee {
  position: absolute; z-index: 40; pointer-events: none;
  border: 1px solid var(--st-accent);
  background: color-mix(in srgb, var(--st-accent) 10%, transparent);
  border-radius: 2px;
}
.ps-block.marquee-hit { border-color: color-mix(in srgb, var(--st-accent) 60%, transparent); }
.ps-block.multi-sel { border-color: var(--st-accent); box-shadow: 0 0 0 1px var(--st-accent); }

/* ==========================================================================
   PowerPoint Studio — format pane, ribbon controls, guides, zoom, slideshow
   ========================================================================== */

/* --- Format pane (the studio inspector) --- */
.ps-office-root .st-inspector {
  padding: 10px 12px 18px;
  background: #f7f8fa;
  border-left: 1px solid #cfd3da;
  overflow-y: auto;
}
.ps-office-root .st-inspector .st-card-title {
  position: sticky;
  top: -10px;
  z-index: 2;
  margin: -10px -12px 8px;
  padding: 9px 12px;
  background: #f7f8fa;
  border-bottom: 1px solid #e2e5ea;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;
}
.ps-office-root .st-inspector .st-card {
  margin-bottom: 8px;
  padding: 9px 10px;
  border: 1px solid #e2e5ea;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}
.ps-office-root .st-inspector .st-input { font-size: 12px; }
.ps-office-root .st-inspector .st-row { font-size: 12px; }
.ps-office-root .st-inspector textarea.st-input { resize: vertical; }
.ps-office-root .st-color {
  width: 30px; height: 22px; padding: 0;
  border: 1px solid #cfd3da; border-radius: 4px;
  background: none; cursor: pointer;
}
.ps-office-root .st-inspector-resizer { width: 5px; cursor: col-resize; }
.ps-office-root .st-inspector-resizer:hover,
.ps-office-root .st-inspector-resizer.is-dragging {
  background: color-mix(in srgb, var(--ps-orange) 45%, transparent);
}

/* --- Ribbon: Font group and custom controls --- */
.ps-rb-font { display: flex; flex-direction: column; gap: 3px; padding: 1px 2px; }
.ps-rb-font-row { display: flex; align-items: center; gap: 3px; }
.ps-rb-mini {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 23px; padding: 0 5px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: #33383f;
  font-size: 12px; line-height: 1; cursor: pointer;
}
.ps-rb-mini:hover:not(:disabled) { background: var(--ps-ribbon-hover); border-color: #e2cdc6; }
.ps-rb-mini.on { background: #f6ddd4; border-color: var(--ps-orange); color: var(--ps-orange-dark); }
.ps-rb-mini:disabled { opacity: .4; cursor: default; }
.ps-rb-divider { width: 1px; height: 16px; margin: 0 3px; background: #d8dade; }
.ps-rb-stack { display: flex; flex-direction: column; gap: 4px; padding: 2px; }
.ps-rb-hint { color: #7b818c; font-size: 10px; }
.ps-rb-input {
  height: 23px; padding: 0 6px;
  border: 1px solid #cfd3da; border-radius: 4px;
  background: #fff; color: #23272e; font-size: 11px;
}
.ps-rb-check { display: flex; align-items: center; gap: 5px; color: #4b5058; font-size: 11px; }
.ps-rb-check input { margin: 0; }
.office-rb-select {
  height: 23px; padding: 0 4px;
  border: 1px solid #cfd3da; border-radius: 4px;
  background: #fff; color: #23272e; font-size: 11px;
}
.office-rb-color {
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px;
  width: 26px; height: 23px; border-radius: 4px; cursor: pointer;
}
.office-rb-color:hover { background: var(--ps-ribbon-hover); }
.office-rb-color-glyph { font-size: 10px; font-weight: 700; line-height: 1; }
.office-rb-color-bar { width: 16px; height: 4px; border-radius: 1px; border: 1px solid rgba(0,0,0,.15); }
.office-rb-color-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* --- Slide rail: drag to reorder, hidden slides --- */
.ps-thumb[draggable="true"] { cursor: grab; }
.ps-thumb.dragging { opacity: .45; cursor: grabbing; }
.ps-thumb.drop-before { box-shadow: 0 -3px 0 -1px var(--ps-orange), 0 2px 5px rgba(25,32,45,.08); }
.ps-thumb.drop-after { box-shadow: 0 3px 0 -1px var(--ps-orange), 0 2px 5px rgba(25,32,45,.08); }
.ps-thumb.hidden-slide { opacity: .5; }
.ps-thumb.hidden-slide::after {
  content: "Hidden";
  position: absolute; right: 3px; bottom: 3px; z-index: 2;
  padding: 0 4px; border-radius: 3px;
  background: rgba(40,44,52,.72); color: #fff;
  font-size: 9px; font-weight: 600;
}
.ps-rail-add {
  flex: 0 0 auto;
  padding: 6px 0;
  border: 1px dashed #b9bec8; border-radius: 4px;
  background: transparent; color: #6b717c;
  font-size: 11px; font-weight: 600; cursor: pointer;
}
.ps-rail-add:hover { border-color: var(--ps-orange); color: var(--ps-orange-dark); background: #fff; }

/* --- Zoom --- */
.ps-zoom { display: flex; align-items: center; gap: 5px; }
.ps-zoom-btn,
.ps-status-btn,
.ps-zoom-label {
  padding: 1px 6px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: #505662;
  font: inherit; cursor: pointer;
}
.ps-zoom-btn:hover,
.ps-status-btn:hover,
.ps-zoom-label:hover { background: #e9eaee; border-color: #d5d8de; }
.ps-status-btn { font-weight: 650; color: #176d68; }
.ps-zoom-label { min-width: 34px; font-weight: 650; text-align: right; }
.ps-zoom-slider { width: 92px; height: 12px; accent-color: var(--ps-orange); cursor: pointer; }

/* A numeric zoom pins the canvas width and lets the stage scroll. */
.ps-stage.ps-zoomed { align-items: flex-start; justify-content: flex-start; }
.ps-stage.ps-zoomed .ps-canvas-wrap { width: var(--ps-zoom-w, 960px); max-width: none; flex: 0 0 auto; margin: auto; }

/* --- Smart alignment guides --- */
.ps-guides { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.ps-guide { position: absolute; background: #ff3ba7; }
.ps-guide.v { top: 0; bottom: 0; width: 1px; margin-left: -0.5px; }
.ps-guide.h { left: 0; right: 0; height: 1px; margin-top: -0.5px; }

/* --- Gridlines (View > Gridlines) --- */
.ps-canvas.ps-grid {
  background-image:
    linear-gradient(to right, rgba(90, 105, 130, .16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(90, 105, 130, .16) 1px, transparent 1px);
  /* The engine snaps to 10 logical units; 960 logical units = 100cqw. */
  background-size: calc(100cqw / 96) calc(100cqw / 96);
}

/* --- Grouped objects --- */
.ps-block.ps-grouped.sel { outline: 1px dashed color-mix(in srgb, var(--st-accent) 70%, transparent); outline-offset: 3px; }

/* --- Text: measured lines, bullets, shape labels --- */
.ps-block-text { display: flex; flex-direction: column; }
.ps-text-line { white-space: pre-wrap; }
.ps-text-bullet { display: inline-block; }
.ps-shape-text {
  position: absolute; inset: 0;
  padding: 4px 6px;
  box-sizing: border-box;
  pointer-events: auto;
}
.ps-block-shape { position: relative; }

/* Deck furniture (footer / date / slide number) sits behind the objects. */
.ps-furniture { z-index: 0; pointer-events: none; white-space: nowrap; }

/* --- Slideshow + presenter view --- */
.ps-show {
  position: fixed; inset: 0; z-index: 100000;
  display: grid;
  grid-template-columns: 1fr 0;
  grid-template-rows: 1fr auto;
  background: #0a0c10;
  color: #e8ebf2;
  font-family: "Segoe UI", Arial, sans-serif;
  cursor: default;
}
.ps-show:focus { outline: none; }
.ps-show-main {
  grid-column: 1; grid-row: 1;
  display: flex; align-items: center; justify-content: center;
  min-width: 0; min-height: 0;
  padding: 12px;
}
.ps-show-frame {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.ps-show-frame svg {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  box-shadow: 0 18px 60px rgba(0,0,0,.6);
}
.ps-show-panel {
  grid-column: 2; grid-row: 1;
  display: none;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 14px;
  background: #14181f;
  border-left: 1px solid #262c36;
  overflow-y: auto;
}
.ps-show.presenter { grid-template-columns: 1fr minmax(280px, 30%); }
.ps-show.presenter .ps-show-panel { display: flex; }
.ps-show-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ps-show-panel-label {
  color: #8b94a6;
  font-size: 10px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
}
.ps-show-timer { color: #fff; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ps-show-next-stage {
  border: 1px solid #262c36; border-radius: 6px;
  background: #0a0c10;
  overflow: hidden;
}
.ps-show-next-stage svg { width: 100%; height: auto; display: block; }
.ps-show-notes {
  flex: 1;
  min-height: 90px;
  padding: 10px;
  border: 1px solid #262c36; border-radius: 6px;
  background: #0f131a;
  color: #cfd6e4;
  font-size: 14px; line-height: 1.6;
  white-space: pre-wrap;
  overflow-y: auto;
}
.ps-show-end { color: #6c7488; font-size: 22px; }
.ps-show-bar {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: #12151b;
  border-top: 1px solid #232935;
  opacity: .25;
  transition: opacity .18s ease;
}
.ps-show-bar:hover, .ps-show:focus-within .ps-show-bar { opacity: 1; }
.ps-show-btn {
  min-width: 30px; padding: 4px 9px;
  border: 1px solid #2b323f; border-radius: 5px;
  background: #1b2029; color: #dce2ee;
  font-size: 13px; cursor: pointer;
}
.ps-show-btn:hover { background: #262d39; border-color: #3a4354; }
.ps-show-btn.wide { font-size: 11px; font-weight: 600; }
.ps-show-bar-sep { flex: 1; }
.ps-show-counter { min-width: 62px; color: #9aa3b6; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
/* B and W blank the screen mid-presentation. */
.ps-show.blank-black .ps-show-main,
.ps-show.blank-white .ps-show-main { visibility: hidden; }
.ps-show.blank-black { background: #000; }
.ps-show.blank-white { background: #fff; }

@media (max-width: 980px) {
  .ps-show.presenter { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto; }
  .ps-show.presenter .ps-show-panel { grid-column: 1; grid-row: 2; border-left: 0; border-top: 1px solid #262c36; max-height: 38vh; }
}

/* --- Generate-deck-with-AI selection modal --- */
.ps-deckplan-modal { max-width: 780px; width: min(94vw, 780px); }
.ps-deckplan-controls {
  display: grid;
  grid-template-columns: 2fr 1.2fr 0.7fr 1.3fr;
  gap: 10px;
  padding: 12px 16px 4px;
}
.ps-deckplan-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
}
.ps-deckplan-toolbar .st-input { max-width: 260px; }
.ps-deckplan-list {
  max-height: 46vh;
  overflow: auto;
  padding: 4px 16px 12px;
}
.ps-deckplan-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line, #e6e8ee);
  cursor: pointer;
}
.ps-deckplan-row:last-child { border-bottom: 0; }
.ps-deckplan-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-deckplan-modal .hs-import-foot .st-field-hint { margin-right: 10px; }

@media (max-width: 720px) {
  .ps-deckplan-controls { grid-template-columns: 1fr; }
}

/* PPT-only search chrome. Do not restyle Word/Excel (.word-fnsearch / .xl-fnsearch). */
.ps-office-ribbon {
  --orb-accent: #c05621;
  --orb-accent-soft: #f5e9e5;
  --orb-accent-dark: #9c4419;
  --office-rb-accent: #c05621;
  --office-rb-accent-dark: #9c4419;
  overflow: visible;
  position: relative;
  z-index: 40;
}
.ps-office-ribbon .office-rb-tabs { overflow: visible; }
.ps-office-ribbon .ppt-fnsearch {
  --fn-accent: #c05621;
  position: relative;
  z-index: 12;
  flex: none;
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* ---- Function / concept search (compact top-right, PowerPoint orange) ---- */
.ps-office-ribbon .ppt-fnsearch-field {
  display: flex; align-items: center; gap: 6px;
  height: 22px; width: 178px; padding: 0 10px 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fn-accent) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--fn-accent) 28%, #cfd3db);
  color: #1f2733;
  box-sizing: border-box;
  cursor: text;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, width .18s ease, color .14s ease;
}
.ps-office-ribbon .ppt-fnsearch-field:hover {
  background: color-mix(in srgb, var(--fn-accent) 16%, #fff);
  border-color: color-mix(in srgb, var(--fn-accent) 42%, #cfd3db);
}
.ps-office-ribbon .ppt-fnsearch.open .ppt-fnsearch-field,
.ps-office-ribbon .ppt-fnsearch-field.on,
.ps-office-ribbon .ppt-fnsearch-field:focus-within {
  background: #fff;
  border-color: var(--fn-accent);
  color: #1f2733;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--fn-accent) 28%, transparent),
    0 8px 22px color-mix(in srgb, var(--fn-accent) 22%, transparent);
}
.ps-office-ribbon .ppt-fnsearch-ic {
  display: inline-flex; align-items: center; justify-content: center;
  color: inherit; opacity: .92; flex: none;
}
.ps-office-ribbon .ppt-fnsearch-ic svg {
  width: 14px; height: 14px; display: block; overflow: visible; stroke-width: 2;
}
.ps-office-ribbon .ppt-fnsearch-input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: transparent; color: inherit;
  font: inherit; font-size: 12px; font-weight: 500; outline: none;
  padding: 0; line-height: 1;
  -webkit-appearance: none; appearance: none;
}
.ps-office-ribbon .ppt-fnsearch-input:focus,
.ps-office-ribbon .ppt-fnsearch-input:focus-visible { outline: none; }
.ps-office-ribbon .ppt-fnsearch-input::-webkit-search-decoration,
.ps-office-ribbon .ppt-fnsearch-input::-webkit-search-cancel-button { display: none; }
.ps-office-ribbon .ppt-fnsearch-input::placeholder { color: #6c7686; font-weight: 500; }
.ps-office-ribbon .ppt-fnsearch.open .ppt-fnsearch-input::placeholder,
.ps-office-ribbon .ppt-fnsearch-field.on .ppt-fnsearch-input::placeholder,
.ps-office-ribbon .ppt-fnsearch-field:focus-within .ppt-fnsearch-input::placeholder {
  color: #6c7686;
}

.ps-office-ribbon .ppt-fnsearch-pop {
  --fn-pop-bg: #ffffff;
  --fn-pop-ink: #1f2733;
  --fn-pop-muted: #5c6573;
  --fn-pop-line: #d7dce6;
  --fn-pop-accent: var(--fn-accent, #c05621);
  --fn-pop-shadow: 0 22px 56px rgba(16, 32, 72, .28), 0 2px 8px rgba(16, 32, 72, .08);
  display: flex;
  flex-direction: column;
  position: absolute; top: calc(100% + 7px); right: 0; left: auto;
  width: min(540px, calc(100cqi - 24px));
  max-width: min(540px, calc(100cqi - 24px));
  max-height: min(420px, 72vh, 72dvh);
  isolation: isolate;
  color-scheme: light;
  background-color: #ffffff;
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--fn-pop-accent) 9%, transparent), transparent 2.4rem);
  color: var(--fn-pop-ink);
  border: 1px solid var(--fn-pop-line);
  border-radius: 14px;
  box-shadow: var(--fn-pop-shadow);
  z-index: 80;
  overflow: hidden;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(.985);
  transform-origin: top right;
  transition: opacity .14s ease, transform .16s ease, visibility 0s linear .16s;
}
.ps-office-ribbon .ppt-fnsearch-pop.on {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity .14s ease, transform .16s ease, visibility 0s;
}
.ps-office-ribbon .ppt-fnsearch-head {
  display: flex; align-items: baseline; gap: 8px; flex: none;
  padding: 10px 14px 8px;
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--fn-pop-line) 85%, transparent);
}
.ps-office-ribbon .ppt-fnsearch-title {
  font-size: 10.5px; font-weight: 800; letter-spacing: .72px;
  text-transform: uppercase; color: var(--fn-pop-muted);
}
.ps-office-ribbon .ppt-fnsearch-count {
  margin-left: auto; font-size: 11px; color: var(--fn-pop-muted);
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.ps-office-ribbon .ppt-fnsearch-pop.is-suggest .ppt-fnsearch-count { display: none; }
.ps-office-ribbon .ppt-fnsearch-list {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 6px;
  padding: 8px; overflow-x: hidden; overflow-y: auto; min-height: 0;
  flex: 1 1 auto;
  background: transparent;
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fn-pop-muted) 45%, transparent) transparent;
}
.ps-office-ribbon .ppt-fnsearch-list::-webkit-scrollbar { width: 8px; height: 8px; }
.ps-office-ribbon .ppt-fnsearch-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--fn-pop-muted) 40%, transparent);
  border-radius: 99px; border: 2px solid transparent; background-clip: padding-box;
}
.ps-office-ribbon .ppt-fnsearch-list.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ps-office-ribbon .ppt-fnsearch-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-width: 0; text-align: left;
  border: 1px solid transparent; background: transparent;
  color: var(--fn-pop-ink); border-radius: 10px;
  padding: 6px 8px; cursor: pointer; min-height: 40px;
  box-sizing: border-box; overflow: hidden;
  font: inherit; appearance: none; -webkit-appearance: none;
  transition: background .08s ease, border-color .08s ease, color .08s ease, box-shadow .08s ease;
}
.ps-office-ribbon .ppt-fnsearch-item:hover {
  background: color-mix(in srgb, var(--fn-pop-accent) 8%, transparent);
  border-color: color-mix(in srgb, var(--fn-pop-accent) 18%, transparent);
}
.ps-office-ribbon .ppt-fnsearch-item.is-active,
.ps-office-ribbon .ppt-fnsearch-item:hover.is-active {
  background: var(--fn-pop-accent);
  border-color: var(--fn-pop-accent);
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--fn-pop-accent) 38%, transparent);
}
.ps-office-ribbon .ppt-fnsearch-item:focus { outline: none; }
.ps-office-ribbon .ppt-fnsearch-item:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--fn-accent) 65%, #fff);
  outline-offset: -2px;
}
.ps-office-ribbon .ppt-fnsearch-item.is-active:focus-visible {
  outline-color: rgba(255,255,255,.72);
}
.ps-office-ribbon .ppt-fnsearch-item-ic {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--fn-pop-accent) 12%, transparent);
  color: var(--fn-pop-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fn-pop-accent) 14%, transparent);
}
.ps-office-ribbon .ppt-fnsearch-item:hover:not(.is-active) .ppt-fnsearch-item-ic {
  background: color-mix(in srgb, var(--fn-pop-accent) 18%, transparent);
}
.ps-office-ribbon .ppt-fnsearch-item.is-active .ppt-fnsearch-item-ic {
  background: rgba(255,255,255,.18); color: #fff; box-shadow: none;
}
.ps-office-ribbon .ppt-fnsearch-item-ic svg { width: 15px; height: 15px; display: block; overflow: visible; }
.ps-office-ribbon .ppt-fnsearch-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.ps-office-ribbon .ppt-fnsearch-item-name {
  font-size: 12.5px; font-weight: 600; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-office-ribbon .ppt-fnsearch-item-hint {
  font-size: 10.5px; color: var(--fn-pop-muted); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-office-ribbon .ppt-fnsearch-item.is-active .ppt-fnsearch-item-hint { color: rgba(255,255,255,.82); }
.ps-office-ribbon .ppt-fnsearch-pop.is-empty {
  background-image: none;
  background-color: #ffffff;
  color: var(--fn-pop-ink);
}
.ps-office-ribbon .ppt-fnsearch-pop.is-empty .ppt-fnsearch-list {
  grid-template-columns: minmax(0, 1fr);
  min-height: 168px;
  background-color: transparent;
}
.ps-office-ribbon .ppt-fnsearch-empty,
.ps-office-ribbon .ppt-fnsearch-miss {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  gap: 8px; padding: 32px 28px 28px; color: var(--fn-pop-muted);
  min-height: 168px; background: transparent;
}
.ps-office-ribbon .ppt-fnsearch-empty-ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fn-pop-accent);
  background: color-mix(in srgb, var(--fn-pop-accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fn-pop-accent) 16%, transparent);
}
.ps-office-ribbon .ppt-fnsearch-empty-ic svg { width: 18px; height: 18px; overflow: visible; }
.ps-office-ribbon .ppt-fnsearch-empty strong,
.ps-office-ribbon .ppt-fnsearch-miss strong {
  color: var(--fn-pop-ink); font-size: 13px; font-weight: 700;
  max-width: min(420px, 100%); overflow-wrap: anywhere;
}
.ps-office-ribbon .ppt-fnsearch-empty p,
.ps-office-ribbon .ppt-fnsearch-miss p { margin: 0; font-size: 12px; line-height: 1.45; max-width: 320px; }
.ps-office-ribbon .ppt-fnsearch-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none;
  padding: 7px 12px 8px;
  border-top: 1px solid var(--fn-pop-line);
  background: color-mix(in srgb, var(--fn-pop-ink) 2.5%, var(--fn-pop-bg));
  font-size: 10.5px; color: var(--fn-pop-muted);
}
.ps-office-ribbon .ppt-fnsearch-k { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ps-office-ribbon .ppt-fnsearch-k kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 16px; padding: 0 5px;
  border-radius: 4px; font: 600 10px/1 ui-sans-serif, system-ui, sans-serif;
  color: var(--fn-pop-ink);
  background: #fff;
  box-shadow: 0 1px 0 rgba(16, 32, 72, .14), inset 0 0 0 1px var(--fn-pop-line);
}
.ps-office-ribbon .ppt-fnsearch-pop:not(.cols-2) .ppt-fnsearch-k-cols,
.ps-office-ribbon .ppt-fnsearch-pop.is-empty .ppt-fnsearch-k-move,
.ps-office-ribbon .ppt-fnsearch-pop.is-empty .ppt-fnsearch-k-cols,
.ps-office-ribbon .ppt-fnsearch-pop.is-empty .ppt-fnsearch-k-open { display: none; }

.dark .ps-office-ribbon .ppt-fnsearch-pop,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-pop {
  --fn-pop-bg: #1c212b;
  --fn-pop-ink: #e8ecf3;
  --fn-pop-muted: #9aa5b5;
  --fn-pop-line: #3a4252;
  --fn-pop-shadow: 0 28px 64px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
  color-scheme: dark;
  background-color: #1c212b;
  color: #e8ecf3;
  border-color: #3a4252;
}
.dark .ps-office-ribbon .ppt-fnsearch-pop.is-empty,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-pop.is-empty {
  background-color: #1c212b;
  background-image: none;
}
.dark .ps-office-ribbon .ppt-fnsearch-field,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-field {
  background: color-mix(in srgb, var(--fn-accent) 18%, #1c212b);
  border-color: color-mix(in srgb, var(--fn-accent) 38%, #3a4252);
  color: #e8ecf3;
}
.dark .ps-office-ribbon .ppt-fnsearch-input::placeholder,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-input::placeholder { color: #9aa5b5; }
.dark .ps-office-ribbon .ppt-fnsearch.open .ppt-fnsearch-field,
.dark .ps-office-ribbon .ppt-fnsearch-field.on,
.dark .ps-office-ribbon .ppt-fnsearch-field:focus-within,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch.open .ppt-fnsearch-field,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-field.on,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-field:focus-within {
  background: #fff;
  color: #1f2733;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--fn-accent) 45%, transparent),
    0 10px 24px rgba(0, 0, 0, .45);
}
.dark .ps-office-ribbon .ppt-fnsearch-item:hover:not(.is-active),
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-item:hover:not(.is-active) {
  background: color-mix(in srgb, var(--fn-pop-accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--fn-pop-accent) 28%, transparent);
}
.dark .ps-office-ribbon .ppt-fnsearch-item-ic,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-item-ic {
  background: color-mix(in srgb, var(--fn-pop-accent) 16%, transparent);
  color: color-mix(in srgb, var(--fn-pop-accent) 70%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fn-pop-accent) 22%, transparent);
}
.dark .ps-office-ribbon .ppt-fnsearch-k kbd,
.window[data-app-color-tone="dark"] .ps-office-ribbon .ppt-fnsearch-k kbd {
  color: #e8ecf3;
  background: #2a3140;
  box-shadow: 0 1px 0 rgba(0,0,0,.4), inset 0 0 0 1px #3a4252;
}
@media (prefers-reduced-motion: reduce) {
  .ps-office-ribbon .ppt-fnsearch-field,
  .ps-office-ribbon .ppt-fnsearch-pop,
  .ps-office-ribbon .ppt-fnsearch-pop.on,
  .ps-office-ribbon .ppt-fnsearch-item { transition: none; transform: none; }
}

@container ppt-ribbon (max-width: 1080px) {
  .ps-office-ribbon .ppt-fnsearch-field { width: 156px; }
}
@container ppt-ribbon (max-width: 920px) {
  .ps-office-ribbon .office-rb-context { display: none; }
  .ps-office-ribbon .ppt-fnsearch-field { width: 138px; padding: 0 8px 0 7px; }
  .ps-office-ribbon .ppt-fnsearch-input { font-size: 11.5px; }
}
@container ppt-ribbon (max-width: 760px) {
  .ps-office-ribbon .ppt-fnsearch-field {
    width: 32px; max-width: 32px; padding: 0; gap: 0;
    justify-content: center; overflow: hidden;
  }
  .ps-office-ribbon .ppt-fnsearch-input {
    width: 0; min-width: 0; padding: 0; opacity: 0; pointer-events: none;
  }
  .ps-office-ribbon .ppt-fnsearch.open .ppt-fnsearch-field,
  .ps-office-ribbon .ppt-fnsearch-field.on,
  .ps-office-ribbon .ppt-fnsearch-field:focus-within {
    width: 158px; max-width: 158px; gap: 6px; padding: 0 10px 0 8px;
    justify-content: flex-start; overflow: visible;
  }
  .ps-office-ribbon .ppt-fnsearch.open .ppt-fnsearch-input,
  .ps-office-ribbon .ppt-fnsearch-field.on .ppt-fnsearch-input,
  .ps-office-ribbon .ppt-fnsearch-field:focus-within .ppt-fnsearch-input {
    width: auto; opacity: 1; pointer-events: auto; flex: 1;
  }
}
@container ppt-ribbon (max-width: 420px) {
  .ps-office-ribbon .ppt-fnsearch-list.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .ps-office-ribbon .ppt-fnsearch-pop.cols-2 .ppt-fnsearch-k-cols { display: none; }
}

/* Beat OS per-window color-theme input/surface !important (PowerPoint only). */
#os .window[data-app-color-theme] .window-body .ps-office-ribbon input.ppt-fnsearch-input:not([type="color"]):not([type="range"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]),
body .window[data-app-color-theme] .window-body .ps-office-ribbon input.ppt-fnsearch-input:not([type="color"]):not([type="range"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]),
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-input,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-input {
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  line-height: 1 !important;
  outline: none !important;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-input::placeholder,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-input::placeholder {
  color: #6c7686 !important;
  opacity: 1;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-pop,
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-pop.is-empty,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-pop,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-pop.is-empty {
  background-color: var(--fn-pop-bg, #fff) !important;
  color: var(--fn-pop-ink, #1f2733) !important;
  border-color: var(--fn-pop-line, #d7dce6) !important;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-head,
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-list,
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-empty,
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-miss,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-head,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-list,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-empty,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-miss {
  background-color: transparent !important;
  color: inherit;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-empty strong,
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-miss strong,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-empty strong,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-miss strong {
  color: var(--fn-pop-ink, #1f2733) !important;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-foot,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-foot {
  background: color-mix(in srgb, var(--fn-pop-ink) 2.5%, var(--fn-pop-bg)) !important;
  color: var(--fn-pop-muted) !important;
  border-top-color: var(--fn-pop-line) !important;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item {
  background: transparent !important;
  color: var(--fn-pop-ink) !important;
  border-color: transparent !important;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item:hover,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item:hover {
  background: color-mix(in srgb, var(--fn-pop-accent) 8%, transparent) !important;
  border-color: color-mix(in srgb, var(--fn-pop-accent) 18%, transparent) !important;
  color: var(--fn-pop-ink) !important;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item.is-active,
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item:hover.is-active,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item.is-active,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item:hover.is-active {
  background: var(--fn-pop-accent) !important;
  border-color: var(--fn-pop-accent) !important;
  color: #fff !important;
}
#os .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item.is-active .ppt-fnsearch-item-hint,
body .window[data-app-color-theme] .window-body .ps-office-ribbon .ppt-fnsearch-item.is-active .ppt-fnsearch-item-hint {
  color: rgba(255,255,255,.82) !important;
}
