/* New session route + the shared composer (items #3519, #3618, Plan #3333).
   Per-view stylesheet, the routed-view convention: loaded from index.html
   after tasks.css so it inherits the entry's token palette. Everything here
   is .mm-sessions* / .mm-ns-* (the route) or .mm-cx-* (the composer, which
   also renders inside the session panel); the sidebar Sessions block and the
   roster chevrons live in chat.css beside the other .mm-roster-* rules.
   Tokens only — no colour here is not one of the entry's own, so both
   themes follow the app. */

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

/* -- the slim header --------------------------------------------------------- */
/* What this is, and the folder the session will run in — beside the name,
   on the left (#3645); the right side holds nothing. The composer's chips
   carry every other choice. */
.mm-ns-head {
  display: flex; align-items: center; gap: 10px; flex: none;
  height: 48px; padding: 0 20px; box-sizing: border-box;
  border-bottom: 1px solid var(--border-soft); background: var(--panel);
}
.mm-ns-name { font-size: 14px; font-weight: 650; }
.mm-ns-space { flex: 1; }
.mm-ns-repo {
  display: inline-flex; align-items: center; gap: 6px; max-width: 460px;
  border: 1px solid var(--border); border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-size: 12.5px;
  padding: 4px 10px; cursor: pointer;
}
.mm-ns-repo:hover { border-color: var(--accent); }
/* A role picked in the composer: the pill names it and opens nothing. */
.mm-ns-repo.mm-ns-role { cursor: default; }
.mm-ns-repo.mm-ns-role:hover { border-color: var(--border); }
.mm-ns-repo-name { flex: none; font-weight: 600; }
/* "· +2 folders" (#3641): the rest of the workspace's set rides the tooltip. */
.mm-ns-repo-more { flex: none; color: var(--text-dim); }
/* The folder menu's full paths (#6477): read and copy, never pick. */
.mm-ns-repo-menu-path {
  padding: 6px 12px; font-size: 11.5px; color: var(--text-dim);
  word-break: break-all; user-select: text;
}

/* -- the stage --------------------------------------------------------------- */
/* The composer sits in the middle of the canvas, the way a first message
   should: the question, the box, and what is up next underneath. */
.mm-ns-stage {
  flex: 1; min-height: 0; overflow: auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px; padding: 40px 20px;
}
.mm-ns-title {
  font-size: 22px; font-weight: 650; letter-spacing: -.01em; margin: 0;
  text-align: center;
}
/* 740 since the Who chip (2026-09-10): five chips and Send on one line.
   Narrower, the chip names ellipsize instead of wrapping (#5994). */
.mm-ns-composer, .mm-ns-upnext, .mm-ns-requests {
  width: 100%; max-width: 740px;
}

/* -- up next ----------------------------------------------------------------- */
.mm-ns-upnext { display: flex; flex-direction: column; gap: 8px; }
.mm-ns-upnext-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim);
}
.mm-ns-rule { flex: 1; height: 1px; background: var(--border-soft); }
.mm-ns-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-ns-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--text);
  font: inherit; font-size: 12.5px; padding: 5px 10px; cursor: pointer;
}
.mm-ns-chip:hover { border-color: var(--accent); }
.mm-ns-chip.more { border-color: transparent; color: var(--accent-ink); }
.mm-ns-chip-id { flex: none; font-weight: 600; }
.mm-ns-chip-title {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-ns-chip-verb { flex: none; font-size: 11px; color: var(--text-dim); }

/* -- the composer ------------------------------------------------------------ */
/* One card: attachments above, the box, the chip row. The SAME component
   renders the running session's reply box (.mm-cx.live), which is why every
   rule here is on .mm-cx rather than on the route.
   The controls are two quiet clusters on one row — attach and the
   engine · account chip on the left, model · effort · mode beside Send on
   the right — text buttons with no edges of their own; hover and the
   card's own frame do the work. */
.mm-cx {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--panel); padding: 12px 12px 8px 14px;
  box-shadow: var(--elev-1), var(--edge-hi);
}
.mm-cx-input {
  width: 100%; box-sizing: border-box; min-height: 48px; max-height: 40vh; resize: none; overflow-y: auto;
  border: 0; background: none; color: var(--text);
  font: inherit; font-size: 14px; line-height: 1.45; padding: 4px 2px;
}
.mm-cx.live .mm-cx-input { min-height: 40px; }
.mm-cx-input:focus { outline: none; }
.mm-cx-input::placeholder { color: var(--text-dim); }
.mm-cx-attached[hidden], .mm-cx-foot[hidden] { display: none; }
.mm-cx-attached { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-cx-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel-2); font-size: 12.5px; padding: 4px 8px;
}
.mm-cx-chip-id { flex: none; font-weight: 600; }
.mm-cx-chip-title {
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-cx-chip-stage {
  flex: none; font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 0 6px;
}
.mm-cx-chip-x {
  border: 0; background: none; color: var(--text-dim);
  font: inherit; cursor: pointer; padding: 0 2px;
}
.mm-cx-chip-x:hover { color: var(--text); }

.mm-cx-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mm-cx-space { flex: 1; }
.mm-cx-plus {
  width: 28px; height: 28px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: none;
  color: var(--muted); font: inherit; font-size: 17px; line-height: 1;
  cursor: pointer;
}
.mm-cx-plus:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.mm-cx-chip-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 28px;
  border: 0; border-radius: 6px; background: none;
  color: var(--muted); font: inherit; font-size: 12.5px; padding: 0 6px;
  cursor: pointer;
}
.mm-cx-chip-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.mm-cx-chip-btn:disabled { cursor: default; }
/* #3702: an option value with the adapter's own one-liner under its name. */
.mm-cx-opt { display: flex; flex-direction: column; gap: 2px; }
.mm-cx-opt-hint { font-size: 11.5px; color: var(--text-dim); }
.mm-cx-chip-btn.engine { color: var(--text); position: relative; overflow: hidden; }
/* The Who chip (2026-09-10): the engineer or a role, its ground dim beside it. */
.mm-cx-chip-btn.who { color: var(--text); }
.mm-cx-chip-btn.who .mm-cx-chip-name { font-weight: 500; }
/* A head inside the Who menu ("Who", "Roles"), the small caps the Up next
   head uses. */
.pop .mm-cx-pop-head {
  padding: 6px 12px 2px; font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-dim);
}
.mm-cx-chip-btn.engine .mm-cx-chip-name { font-weight: 500; }
/* #3643: the plan limit closest to exhaustion, as a 2 px sliver on the
   chip's bottom edge — usageLevel-classed, the name on the SLIVER's own
   title (the chip's title is the not-ready reason, and a disabled chip
   shows no tooltip). Tokens only, no literal colour. */
.mm-cx-chip-sliver {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--border); pointer-events: auto;
}
.mm-cx-chip-sliver-fill { display: block; height: 100%; background: var(--accent-fill); }
.mm-cx-chip-sliver.warn .mm-cx-chip-sliver-fill { background: var(--warn); }
.mm-cx-chip-sliver.danger .mm-cx-chip-sliver-fill { background: var(--danger); }
/* #3637's Brief replies, as the engine popover's last row (#3645): the
   toggle with the appended line beside it, dim. */
.mm-cx-brief {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
  width: 100%; max-width: 34ch; box-sizing: border-box; text-align: left;
  border: 0; background: none; color: var(--text); font: inherit; font-size: 12.5px;
  padding: 6px 12px; cursor: pointer; border-radius: 6px;
}
.mm-cx-brief:hover, .mm-cx-brief:focus-visible { background: var(--panel-2); outline: none; }
.mm-cx-brief-mark { flex: none; width: 1em; color: var(--accent); }
.mm-cx-brief.on .mm-cx-brief-name { color: var(--accent); }
.mm-cx-brief-name { flex: none; font-weight: 600; }
.mm-cx-brief-line { flex: 1 1 100%; color: var(--text-dim); font-size: 11.5px; line-height: 1.4; }
.mm-cx-chip-btn.engine.off { box-shadow: inset 0 0 0 1px var(--warn); }
/* #6475: a mode that runs tools without asking wears the warning colour. */
.mm-cx-chip-btn.full-access { color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.mm-cx-chip-name { flex: none; }
.mm-cx-chip-sub { color: var(--text-dim); }
.mm-cx-caret { flex: none; font-size: 10px; color: var(--text-dim); }
.mm-cx-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--ok);
}
.mm-cx-dot.warn { background: none; border: 1.5px solid var(--text-dim); }
.mm-cx-dot.off { background: var(--text-dim); }
.mm-cx-send {
  width: 32px; height: 32px; flex: none; margin-left: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  background: var(--accent-fill); color: var(--on-accent);
  font: inherit; font-size: 15px; cursor: pointer;
}
.mm-cx-send:disabled { opacity: .45; cursor: default; }
/* #5994 (F49): the new-session row stays on one line. Rather than every
   name shrinking in proportion (which crushes "Engineer" or "High" to a
   letter), chips and names grow from zero in equal shares up to their own
   width: a short one gets all of its text, and the long ones split what is
   left, ending in an ellipsis (each name carries its full text as a title).
   +, the dots, carets and Send keep flex: none. The spacer grows only after
   every chip is whole. Scoped to the new-session view: the live session
   composer can sit in a narrow pop-out, where wrapping is the better
   failure. (0,2,0) beats .mm-cx-chip-name { flex: none }. */
.mm-ns-composer .mm-cx-row { flex-wrap: nowrap; }
.mm-ns-composer .mm-cx-space { flex: .001 1 0; }
.mm-ns-composer .mm-cx-chip-btn { flex: 1 1 0; min-width: 0; max-width: max-content; }
.mm-ns-composer .mm-cx-chip-name, .mm-ns-composer .mm-cx-chip-sub {
  flex: 1 1 0; min-width: 0; max-width: max-content;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.mm-cx-foot { display: flex; flex-direction: column; gap: 4px; }
.mm-cx-line.hint { color: var(--muted); }
.mm-cx-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.mm-cx-link:hover { color: var(--accent-ink); text-decoration: underline; }
.mm-cx-link:disabled { opacity: .55; cursor: default; }
.mm-cx-line { color: var(--text-dim); font-size: 12.5px; }
.mm-cx-line.warn { color: var(--warn); }
.mm-cx-line.error { color: var(--danger); }

/* The post-start fallback: the session is already running, so this is a
   card inside the composer, never a modal. */
.mm-cx-fallback {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--warn); border-radius: 10px;
  padding: 10px 12px; margin-top: 4px;
}
.mm-cx-fallback-head { font-weight: 650; font-size: 13px; }
.mm-cx-fallback p { margin: 0; font-size: 12.5px; }
.mm-cx-fallback .muted { color: var(--text-dim); }
.mm-cx-fallback-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* -- completions (#3650) ------------------------------------------------------ */
/* ONE list, two row shapes, IN FLOW inside the card above the box (never
   absolute: the New session stage scrolls only toward its end, so a list
   rising above the card would be clipped at the stage's top edge). The
   card grows and the stage scrolls, exactly as the attach row does. A
   command row is glyph · name · hint · source tag; a task row is id ·
   title · stage. Focus stays in the textarea; .active is the highlight. */
.mm-cp {
  margin: 0 0 6px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel); overflow: hidden;
}
.mm-cp[hidden] { display: none; }
.mm-cp-list { max-height: min(40vh, 320px); overflow-y: auto; display: flex; flex-direction: column; }
.mm-cp-list[hidden] { display: none; }
.mm-cp-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 12px; border: 0; background: none; color: var(--text);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.mm-cp-row.active, .mm-cp-row:hover { background: var(--panel-2); }
.mm-cp-glyph {
  flex: none; width: 14px; height: 14px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px;
  color: var(--text-dim); background: var(--panel-2);
}
.mm-cp-name { flex: none; font-weight: 600; }
.mm-cp-hint {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text-dim);
}
.mm-cp-tag { flex: none; font-size: 11px; color: var(--text-dim); }
.mm-cp-id { flex: none; font-weight: 600; }
.mm-cp-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text);
}
.mm-cp-stage { flex: none; font-size: 11px; color: var(--text-dim); }
.mm-cp-status { padding: 8px 12px; font-size: 12px; color: var(--text-dim); }
.mm-cp-status[hidden] { display: none; }

/* The engine menu (#3777): two zones in one .pop. The pop's own overflow
   is turned off by the modifier class and the SCROLL zone takes it, so the
   PIN zone (Add account…, Engines & accounts…) stays visible at every
   popover height — inside both of .pop's max-height bounds (app.css:
   min(340px, 100vh - 16px)) — and never below the fold. A modifier class,
   not a dom.js change. */
.pop.mm-cx-engine-pop {
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  min-width: 260px;
}
.mm-cx-pop-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 6px; }
.mm-cx-pop-pin {
  flex: none; padding: 6px; border-top: 1px solid var(--border-soft);
  background: var(--panel);
}
.mm-cx-pop-pin .pop-item { font-size: 12.5px; }
.mm-cx-pop-add { color: var(--accent); }
.mm-cx-menu-head {
  padding: 6px 10px 4px; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-dim);
}
.mm-cx-menu-fix { padding: 2px 10px 6px; font-size: 12px; color: var(--warn); }
/* One account's radio row: the name, then the worst-window sliver and its
   percent on the right — or "Sign in" for a signed-out account. The meters
   themselves live on the Engines & accounts page. */
.mm-cx-acct { gap: 8px; }
.mm-cx-acct-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-cx-acct-usage { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.mm-cx-acct-sliver {
  display: inline-block; width: 40px; height: 4px; border-radius: 2px;
  background: var(--border); overflow: hidden;
}
.mm-cx-acct-sliver-fill { display: block; height: 100%; background: var(--accent-fill); }
.mm-cx-acct-sliver.warn .mm-cx-acct-sliver-fill { background: var(--warn); }
.mm-cx-acct-sliver.danger .mm-cx-acct-sliver-fill { background: var(--danger); }
.mm-cx-acct-pct {
  font-size: 10.5px; min-width: 28px; text-align: right; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--text-dim);
}
.mm-cx-acct-pct.warn { color: var(--warn); }
.mm-cx-acct-pct.danger { color: var(--danger); }
.mm-cx-acct-signin { flex: none; font-size: 11.5px; color: var(--accent); }
.mm-cx-acct:disabled { opacity: .55; cursor: default; }

/* -- presets (#3915) -------------------------------------------------------- */
/* The preset chip is a plain option chip with a small star when a different
   preset is suggested. */
.mm-cx-chip-star { flex: none; color: var(--accent); font-size: 11px; }
/* A preset row in the two-zone menu: a radio row like the account row, with a
   grip and Edit/Remove that surface on hover. */
.mm-cx-preset-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  text-align: left; cursor: pointer;
}
.mm-cx-preset-label { flex: 1; min-width: 0; }
.mm-cx-preset-name {
  display: block;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-cx-preset-id {
  display: block; overflow: hidden; text-overflow: ellipsis;
  font-size: 10.5px; color: var(--text-dim);
}
.mm-cx-preset-row.error {
  color: var(--danger); cursor: default;
}
.mm-cx-preset-row.error .mm-cx-preset-name { text-decoration: none; }
.mm-cx-preset-row[aria-disabled="true"] { cursor: default; }
.mm-cx-preset-tag {
  flex: none; font-size: 10.5px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 0 6px;
}
.mm-cx-preset-tag.suggested { color: var(--accent); border-color: var(--accent); }
.mm-cx-preset-grip {
  flex: none; color: var(--text-dim); cursor: grab; opacity: 0; font-size: 12px;
  line-height: 1; user-select: none;
}
.mm-cx-preset-row:hover .mm-cx-preset-grip,
.mm-cx-preset-row:focus-within .mm-cx-preset-grip { opacity: .7; }
.mm-cx-preset-grip:active { cursor: grabbing; }
.mm-cx-preset-row.dragging { opacity: .6; }
.mm-cx-preset-more { flex: none; display: inline-flex; gap: 2px; opacity: 0; }
.mm-cx-preset-row:hover .mm-cx-preset-more,
.mm-cx-preset-row:focus-within .mm-cx-preset-more { opacity: 1; }
.mm-cx-preset-act {
  border: 0; background: none; color: var(--text-dim); cursor: pointer;
  font: inherit; font-size: 12px; padding: 0 3px; border-radius: 4px;
}
.mm-cx-preset-act:hover { color: var(--text); background: var(--panel-2); }
/* The New / Edit preset sheet: a two-column Model / Effort grid. */
.mm-preset-field { display: flex; flex-direction: column; min-width: 0; gap: 4px; margin-bottom: 12px; }
.mm-preset-field.hidden { display: none; }
.mm-preset-label { font-size: 12px; color: var(--text-dim); }
.mm-preset-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.mm-preset-grid .mm-preset-field { margin-bottom: 12px; }
.mm-preset-name, .mm-preset-model, .mm-preset-effort {
  min-width: 0;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2);
  color: var(--text); font: inherit; font-size: 13px; padding: 6px 8px;
}
.mm-preset-note { font-size: 12px; color: var(--text-dim); overflow-wrap: anywhere; }
@media (max-width: 480px) { .mm-preset-grid { grid-template-columns: minmax(0, 1fr); } }
.mm-preset-scales { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.mm-preset-scale { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.mm-preset-remove { color: var(--danger); }

/* -- the honest browser notice ---------------------------------------------- */
.mm-sessions-notice {
  max-width: 560px; margin: 60px auto; text-align: center;
  color: var(--text-dim); font-size: 13.5px;
}
.mm-sessions-download {
  display: inline-block; margin-top: 10px; color: var(--accent);
  text-decoration: none; font-size: 13px;
}
.mm-sessions-download:hover { text-decoration: underline; }
.mm-sessions-empty { color: var(--text-dim); font-size: 12.5px; padding: 6px 2px; }

/* -- blocks (the Requests list) ---------------------------------------------- */
.mm-sessions-block { margin: 0 0 22px; }
.mm-sessions-block-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); padding: 0 2px 6px;
}
.mm-sessions-count {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0 6px; font-size: 11px;
}
.mm-sessions-note { color: var(--text-dim); text-transform: none; letter-spacing: 0; }
.mm-sessions-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 8px; font-size: 13px;
}
.mm-sessions-row:hover { background: var(--panel-2); }
.mm-sessions-verb {
  flex: none; font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 0 6px;
}
.mm-sessions-age { flex: none; color: var(--text-dim); font-size: 12px; }

/* -- work picker additions (session mode) ------------------------------------ */
.mm-wp-plan {
  flex: none; font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent); padding: 1px 6px;
}
/* #3618: the workspace's own up-next rows lead; "My work" follows a head. */
.mm-wp-head {
  padding: 8px 6px 4px; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-dim);
}

/* -- archive confirm --------------------------------------------------------- */
/* The confirm sheets are the shared modal's body: same inset as .modal-body
   (app.css), so the text lines up under the title instead of hugging the
   card's edge, and the buttons sit in a spaced row rather than the corner. */
.modal-card > .mm-sessions-confirm { padding: 14px 20px 18px; }
.mm-sessions-confirm { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.45; }
.mm-sessions-confirm p { margin: 0; }
.mm-sessions-confirm .muted { color: var(--text-dim); font-size: 12.5px; }
.mm-sessions-confirm-status { color: var(--text-dim); font-size: 12.5px; min-height: 1em; }
.mm-sessions-confirm-status:empty { display: none; }
.mm-sessions-confirm-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* -- requests (#3343) -------------------------------------------------------- */
/* The only block on this route waiting on a person. Absent entirely without
   the desktop bridge, and absent when there is nothing pending — an empty
   block would be a standing reminder of a thing that is not happening. */
.mm-requests .mm-sessions-block-head { color: var(--accent); }
.mm-request-row { align-items: center; gap: 8px; }
.mm-request-who { flex: none; font-weight: 600; color: var(--text); }
.mm-request-note {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text-dim);
}
.mm-request-row .mm-card { flex: 1; min-width: 0; }

/* -- the terminal row's own menu (#3637) ------------------------------------- */
/* Continue, and the link to the session this one was continued in. Sized and
   revealed exactly like the pin and archive buttons it sits beside
   (css/chat.css), which keep their own affordances. */
.mm-session-more {
  width: 18px; height: 18px; border: 0; border-radius: 5px;
  background: none; color: var(--text-dim); font: inherit; font-size: 12px;
  line-height: 1; cursor: pointer;
}
.mm-session-more:hover { background: var(--panel-2); color: var(--text); }

/* -- persona-agent approvals (#4084) ---------------------------------------- */
/* The owner's block: a teammate's ask waiting on them, and a parked tool
   call under a running one. Shared with Settings ▸ Agents; absent when
   nothing waits, like the Requests block above it. */
.mm-agent-approvals .mm-sessions-block-head { color: var(--accent); }
.mm-agent-approval {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 10px;
  margin-bottom: 8px; background: var(--panel);
}
.mm-agent-approval-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mm-agent-approval-what { color: var(--text-dim); }
.mm-agent-approval-preview {
  color: var(--text); font-size: 13px; line-height: 1.4; white-space: pre-wrap;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.mm-agent-approval-line, .mm-agent-action-line { color: var(--text-dim); font-size: 11.5px; }
.mm-agent-approval-acts { display: flex; justify-content: flex-end; gap: 8px; }
.mm-agent-action {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 6px 0 0; border-top: 1px dashed var(--border-soft);
}
.mm-agent-action-what { flex: 1; min-width: 0; font-size: 12.5px; }
.mm-agent-action .mm-agent-approval-acts { flex: none; }
.mm-agent-approvals-status { padding: 8px 12px; color: var(--muted); }
.mm-agent-approvals-status.error { color: var(--danger); }
.mm-agent-approvals-status .btn { margin-left: 8px; }
.mm-agent-approval.compact { margin: 0; border-radius: 8px; }
.mm-agent-approval button:disabled { cursor: wait; opacity: .55; }
.mm-agent-approval-acts .btn { min-height: 36px; }
.mm-act-approval-wrap { display: grid; gap: 6px; padding: 8px 0; }
.mm-act-approval-wrap > .mm-wschip { justify-self: start; }
@media (max-width: 520px) {
  .mm-agent-approval-head { flex-wrap: wrap; }
  .mm-agent-approval-acts { display: grid; grid-template-columns: 1fr 1fr; }
}
