/* Agent session panel (item #3344). Loaded by index.html, item.html and
   session.html — the same view mounts in the routed chat entry and in its
   own pop-out window, so one stylesheet serves both.

   Class prefix is `.mm-sp-` (session PANEL), deliberately not `.mm-session-`:
   sessionsnav's sidebar rows already own `.mm-session-row/-dot/-main/-sub/
   -acts/-pin/-archive` in chat.css, and a shared prefix would have made
   every rule here a guessing game about which surface it lands on.

   Every color is a token from chat.css / app.css (--panel, --panel-2,
   --border, --text, --text-dim, --accent, --accent-ink, --accent-fill,
   --on-accent, --ok, --warn, --warn-soft, --danger, --danger-soft), so
   light and dark both follow the entry's theme without a second palette. */

/* -- page ------------------------------------------------------------------- */
/* In the pop-out #mm-session is the whole window below the 38px titlebar
   (item.css's trick); in-app the view is mounted into #mm-chat and the
   chat entry owns the height. */
#mm-session { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mm-sp {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; height: 100%;
}
.mm-sp-state, .mm-sp-notice {
  padding: 32px 24px; color: var(--text-dim); font-size: 13px;
  text-align: center; display: flex; flex-direction: column; gap: 10px;
  align-items: center;
}
.mm-sp-state p, .mm-sp-notice p { margin: 0; max-width: 46ch; line-height: 1.5; }

/* -- header ----------------------------------------------------------------- */
.mm-sp-head {
  flex: 0 0 auto; padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border); background: var(--panel);
  position: sticky; top: 0; z-index: 2;
}
/* One row (#3656): the body column is the flexible element — the title
   gets the room — and the meter, primary and ⋯ centre on its two-row
   block. The 12ch floor keeps a dozen characters of title at 480px; the
   pill and ⋯ are flex: none so the title is never the only thing that
   shrinks. */
.mm-sp-head-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mm-sp-head-body {
  flex: 1 1 auto; min-width: 12ch; display: flex; flex-direction: column; gap: 3px;
}
.mm-sp-head-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mm-sp-back {
  background: none; border: 0; color: var(--text-dim); cursor: pointer;
  font-size: 18px; line-height: 1; padding: 0 4px;
}
.mm-sp-back:hover { color: var(--text); }
.mm-sp-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: var(--text-dim);
}
.mm-sp-dot.live { background: var(--ok); }
.mm-sp-dot.idle { background: var(--accent); }
.mm-sp-dot.waiting { background: var(--warn, #d9a441); }
.mm-sp-dot.failed { background: var(--danger, #e5534b); }
.mm-sp-dot.exited { background: var(--text-dim); }
/* The task badge (#3645): the anchor's id, with the same metrics the
   sidebar's badge has in chat.css — written twice on purpose, because this
   sheet may not share a .mm-session-* selector. State-free: the sidebar
   says whether the task is done; the header says which task. A button
   since #3654: it opens the task. */
.mm-sp-id {
  flex: none; font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; line-height: 1.4; letter-spacing: 0;
  color: var(--text-dim); background: var(--panel-2);
  border: 0; border-radius: 4px; padding: 1px 5px; cursor: pointer;
}
.mm-sp-id:hover { color: var(--text); }
/* The title wraps to two lines before it truncates; the full title is its
   tooltip (and the pop-out's window title). */
.mm-sp-title {
  min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal;
}
.mm-sp-waiting {
  flex: none; white-space: nowrap;
  font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px;
  color: var(--warn, #d9a441); background: var(--warn-soft, rgba(217, 164, 65, .14));
}
.mm-sp-menu {
  flex: none; white-space: nowrap;
  background: none; border: 0; color: var(--text-dim); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.mm-sp-menu:hover { color: var(--text); background: var(--panel-2); }
.mm-sp-menu-note {
  padding: 8px 12px; max-width: 34ch; font-size: 11px; line-height: 1.45;
  color: var(--text-dim);
}
/* The facts line (#3656): one dim line under the title, inside the body
   column so it sits under the title in both documents with no padding
   calibration. It ellipsizes from the right — the stage chip and the tools
   warning are first, so they survive a narrow window. */
.mm-sp-facts-line {
  display: block; font-size: 11.5px; color: var(--text-dim); min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mm-sp-facts-sep { margin: 0 3px; }
.mm-sp-facts-engine, .mm-sp-facts-folder { color: var(--muted); font-weight: 500; }
/* The task's stage chip, in .mm-task-chip's tones (tasks.css). */
.mm-sp-facts-stage {
  display: inline-block; border: 1px solid var(--border); border-radius: 999px;
  padding: 0 7px; font-size: 11px; line-height: 1.5;
}
.mm-sp-facts-stage.accent { color: var(--accent-ink); border-color: var(--accent); }
.mm-sp-facts-stage.ok { color: var(--ok); border-color: var(--ok); }
.mm-sp-facts-stage.warn { color: var(--warn); border-color: var(--warn); }
.mm-sp-facts-tools.ok { color: var(--ok); }
.mm-sp-facts-tools.warn { color: var(--warn); }
/* The small primary (#3656). Three classes on purpose: the shared
   .btn.small (app.css) is (0,2,0) and a bare .mm-sp-primary would lose. */
.mm-sp-head-main .btn.mm-sp-primary {
  flex: none; min-height: 26px; padding: 3px 10px; font-size: 12.5px; font-weight: 600;
}
.mm-sp-stop { color: var(--danger); }
/* End session, the ⋯ menu's last row. */
.pop-item.mm-sp-menu-danger { color: var(--danger); }

/* -- plan card -------------------------------------------------------------- */
.mm-sp-plan { flex: 0 0 auto; padding: 0 16px; }
.mm-sp-card {
  margin-top: 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--mm-card, var(--panel-2)); padding: 10px 12px;
}
.mm-sp-card-head {
  font-size: 11px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px;
}
.mm-sp-plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mm-sp-plan-row {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 12px; color: var(--text);
}
.mm-sp-plan-row.completed { color: var(--text-dim); text-decoration: line-through; }
.mm-sp-plan-mark { flex: 0 0 auto; color: var(--text-dim); width: 1em; }
.mm-sp-plan-row.completed .mm-sp-plan-mark { color: var(--ok); }
.mm-sp-plan-row.in_progress .mm-sp-plan-mark { color: var(--accent); }
.mm-sp-plan-text { flex: 1 1 auto; min-width: 0; }
.mm-sp-plan-pri { font-size: 10px; color: var(--text-dim); }

/* -- transcript ------------------------------------------------------------- */
.mm-sp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 16px 4px; }
/* minmax(0, 1fr): a grid item's automatic minimum is its min-content width,
   so without a column template a wide table (or <pre>) would widen the log
   and the whole .mm-sp-body pane would scroll sideways under the header
   (#3655). With it, the overflow scrolls inside the message. */
.mm-sp-log { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.mm-sp-empty { color: var(--text-dim); font-size: 12px; padding: 24px 0; text-align: center; }

.mm-sp-msg { font-size: 13px; line-height: 1.55; color: var(--text); }
.mm-sp-msg.user {
  justify-self: end; max-width: 80%;
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 12px;
}
.mm-sp-prompt-text { white-space: pre-wrap; }
/* #3852: the persona brief — the first turn of a persona session, folded to
   one line the way an activity run is; the whole text one click away. */
.mm-sp-prompt.persona { padding: 4px 8px; }
.mm-sp-brief-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 0; background: none; color: var(--text); font: inherit; font-size: 12px;
  font-weight: 600; text-align: left; cursor: pointer; padding: 2px 4px;
}
.mm-sp-brief-hint { margin-left: auto; font-weight: 400; color: var(--text-dim); font-size: 11px; }
.mm-sp-prompt.persona.open .mm-sp-prompt-text { margin-top: 6px; font-size: 12.5px; }
.mm-sp-queued { margin-top: 4px; font-size: 11px; color: var(--text-dim); }
/* #3653: the lines the page appended under the person's words (the task
   line, the Brief line), dimmed beneath under a label — the same metrics
   sessions.css gives .mm-cx-brief-line. */
.mm-sp-appended { margin-top: 6px; font-size: 11.5px; line-height: 1.4; color: var(--text-dim); }
.mm-sp-appended-label { font-weight: 600; margin-right: 6px; }

.mm-sp-md p { margin: 0 0 8px; }
.mm-sp-md p:last-child { margin-bottom: 0; }
.mm-sp-md h1, .mm-sp-md h2, .mm-sp-md h3 { margin: 12px 0 6px; font-weight: 650; line-height: 1.3; }
.mm-sp-md h1 { font-size: 17px; }
.mm-sp-md h2 { font-size: 15px; }
.mm-sp-md h3 { font-size: 13.5px; }
.mm-sp-md h1:first-child, .mm-sp-md h2:first-child, .mm-sp-md h3:first-child { margin-top: 2px; }
.mm-sp-md ul { margin: 0 0 8px; padding-left: 18px; }
.mm-sp-md code {
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; background: var(--panel-2); border-radius: 4px; padding: 0 3px;
}
.mm-sp-md pre {
  margin: 0 0 8px; padding: 8px 10px; overflow-x: auto;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
}
.mm-sp-md pre code { background: none; padding: 0; }
/* GFM tables (#3655): the wrapper div scrolls, never the page, and the
   <table> keeps its role (display:block would strip it in WebKit). */
.mm-sp-md .mm-md-table { overflow-x: auto; margin: 0 0 8px; }
.mm-sp-md .mm-md-table:last-child { margin-bottom: 0; }
.mm-sp-md table { border-collapse: collapse; font-size: 12.5px; }
.mm-sp-md th, .mm-sp-md td {
  border: 1px solid var(--border); padding: 4px 8px; text-align: left; vertical-align: top;
}
.mm-sp-md th { background: var(--panel-2); font-weight: 650; }
/* Links in a bubble (#3700): the portal's .md a look (app.css:1070) — app.css
   resets every <a> to inherit, and .md is not a class the transcript has.
   The chip rule below wins by specificity, so a #NNN chip stays a chip. */
.mm-sp-md a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent); }
.mm-sp-md a:hover { text-decoration-color: var(--accent-ink); }
/* A #NNN the agent named, resolved (#3654): the badge's own metrics as an
   inline chip — the title is on hover, the click is the panel's door.
   app.css scopes its a.item-ref rule to .md, which the transcript is not. */
.mm-sp-md a.item-ref {
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; line-height: 1.4; letter-spacing: 0;
  color: var(--text-dim); background: var(--panel-2);
  border-radius: 4px; padding: 1px 5px; text-decoration: none; white-space: nowrap;
}
.mm-sp-md a.item-ref:hover { color: var(--text); }

.mm-sp-think { font-size: 12px; color: var(--text-dim); }
.mm-sp-think summary { cursor: pointer; }
.mm-sp-think-body { padding: 6px 0 0 12px; border-left: 2px solid var(--border); margin-top: 6px; }

/* -- the clean view's activity line (#3637) ---------------------------------- */
/* One line per run of tool work, expanding IN PLACE to exactly what the
   verbose transcript shows. Quiet by default: this is the noise the clean
   view exists to fold, and reading it is a choice. */
.mm-sp-activity {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: none; border: 0; padding: 3px 0; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--text-dim); text-align: left;
}
.mm-sp-activity:hover { color: var(--text); }
.mm-sp-activity-mark { flex: none; font-size: 10px; }
.mm-sp-activity-text { flex: 1; min-width: 0; }
.mm-sp-activity-body {
  display: grid; gap: 8px; margin: 4px 0 8px 10px;
  padding-left: 10px; border-left: 2px solid var(--border);
}

/* -- sub-agent groups (#3719) ------------------------------------------------ */
/* Louder than an activity line and quieter than a tool card: a sub-agent is
   its own actor, so its row reads at full text colour and its body is nested
   behind a rule — the same left rule the activity body uses, so one glance
   says "this happened inside something else". */
.mm-sp-subagent-head {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: none; border: 0; padding: 3px 0; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--text); text-align: left;
}
.mm-sp-subagent-head:hover .mm-sp-subagent-text { text-decoration: underline; }
.mm-sp-subagent-mark { flex: none; font-size: 10px; color: var(--text-dim); }
.mm-sp-subagent-glyph { flex: none; color: var(--text-dim); }
.mm-sp-subagent-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-sp-subagent-holds { flex: 1; min-width: 0; color: var(--text-dim); }
.mm-sp-subagent-body {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;
  margin: 4px 0 8px 10px; padding-left: 10px; border-left: 2px solid var(--border);
}

/* -- tool calls ------------------------------------------------------------- */
.mm-sp-tool {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--mm-card, var(--panel-2)); overflow: hidden;
}
.mm-sp-tool.failed { border-color: var(--danger, #e5534b); }
.mm-sp-tool-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; font-size: 12px;
}
.mm-sp-tool-glyph { color: var(--text-dim); }
.mm-sp-tool-title {
  font-weight: 650; color: var(--text); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* #3702: "· Maestro" beside a Maestro tool's sentence. */
.mm-sp-tool-source { color: var(--text-dim); font-weight: 400; flex: none; }
.mm-sp-status {
  font-size: 10px; font-weight: 650; letter-spacing: .03em;
  padding: 1px 7px; border-radius: 999px;
  color: var(--text-dim); background: var(--panel-2); border: 1px solid var(--border);
}
.mm-sp-status.completed { color: var(--ok); }
.mm-sp-status.in_progress { color: var(--accent); }
.mm-sp-status.failed { color: var(--danger, #e5534b); }
.mm-sp-tool-body {
  border-top: 1px solid var(--border); padding: 8px 10px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;   /* see .mm-sp-log */
}
.mm-sp-tool-text { font-size: 12px; }
.mm-sp-more, .mm-sp-honest { font-size: 11px; color: var(--text-dim); }

.mm-sp-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mm-sp-chip {
  font-size: 10px; padding: 1px 7px; border-radius: 999px;
  color: var(--text-dim); background: var(--panel-2); border: 1px solid var(--border);
  max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
button.mm-sp-chip { cursor: pointer; }
button.mm-sp-chip:hover { color: var(--text); }

/* -- diffs ------------------------------------------------------------------ */
.mm-sp-diff { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mm-sp-diff-head {
  padding: 4px 8px; font-size: 11px; color: var(--text-dim);
  background: var(--panel-2); border-bottom: 1px solid var(--border);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-sp-diff-body { overflow-x: auto; }
.mm-sp-diff-row {
  display: flex; gap: 6px; font-size: 11.5px;
  font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre; padding: 0 8px;
}
.mm-sp-diff-row.add { background: rgba(76, 201, 138, .12); }
.mm-sp-diff-row.del { background: rgba(229, 83, 75, .12); }
.mm-sp-diff-row.more { color: var(--text-dim); font-style: italic; padding: 2px 8px; }
.mm-sp-diff-gutter { flex: 0 0 1ch; color: var(--text-dim); }
.mm-sp-diff-text { flex: 1 1 auto; }

/* -- permission cards -------------------------------------------------------- */
.mm-sp-perm {
  border: 1px solid var(--warn, #d9a441); border-radius: 10px;
  background: var(--warn-soft, rgba(217, 164, 65, .10));
  padding: 10px 12px; display: grid; gap: 8px;
}
.mm-sp-perm-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mm-sp-perm-mark {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--on-accent); background: var(--warn, #d9a441);
}
/* #3719: whose request this is, when a sub-agent's tool call named its spawn.
   Dimmed and ahead of the title — the card itself never moves. */
.mm-sp-perm-sub { color: var(--text-dim); flex: none; }
.mm-sp-perm-title { font-weight: 650; color: var(--text); }
.mm-sp-perm-wait { font-size: 11px; color: var(--text-dim); }
.mm-sp-perm-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-sp-perm-opt[data-kind="allow_once"], .mm-sp-perm-opt[data-kind="allow_always"] {
  border-color: var(--ok); color: var(--ok);
}
.mm-sp-perm-opt[data-kind="reject_once"], .mm-sp-perm-opt[data-kind="reject_always"] {
  border-color: var(--danger, #e5534b); color: var(--danger, #e5534b);
}
.mm-sp-perm-done { font-size: 11px; color: var(--text-dim); }

/* -- rules, footer, composer -------------------------------------------------- */
.mm-sp-rule {
  font-size: 11px; color: var(--text-dim); text-align: center;
  padding: 2px 0; border-top: 1px solid var(--border-soft, var(--border));
}
.mm-sp-rule.failed { color: var(--danger, #e5534b); }
/* #3637: whether the engine's memory came along. Never quiet enough to be
   missed — it is the boundary a reader needs. */
.mm-sp-rule.continued { color: var(--text); font-weight: 600; padding: 6px 0; }

.mm-sp-foot {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 2px 16px; min-height: 18px;
}
.mm-sp-jump {
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
  background: var(--panel-2); color: var(--text); font-size: 11px; padding: 2px 10px;
}

/* -- the working line (#3718) ------------------------------------------------- */
/* Pinned in the foot while the host says the turn is running: beacon · what
   the engine is on · how long. It shares the foot's space-between with the
   Jump slot, so working sits left and Jump right when both are there.

   The [hidden] override is REQUIRED, not tidiness: an author `display` beats
   the hidden attribute, so without it "Working" would pin to an ended session
   for good. The repo patches this wherever a hidden node has a display of its
   own (css/sessions.css does it for .mm-cx-foot). */
.mm-sp-working {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  font-size: 11.5px; color: var(--text-dim);
}
.mm-sp-working[hidden] { display: none; }
.mm-sp-work-label {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* The clock never shrinks: the tool sentence is what gives way. */
.mm-sp-work-clock { flex: none; }
/* The beacon breathes on the SAME keyframe shape Mission Control's ops
   beacon uses (css/mission.css), rather than a third animation — and holds
   still for a reader who asked for less motion. */
.mm-sp-beacon {
  display: inline-block; flex: none; width: 7px; height: 7px;
  border-radius: 50%; background: currentColor;
  animation: mm-sp-breathe 2s ease-in-out infinite;
}
@keyframes mm-sp-breathe {
  0%, 100% { opacity: 1; } 50% { opacity: .3; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-sp-beacon { animation: none; }
}

/* -- the context meter and the usage panel (#3618) ---------------------------- */
/* The session's own context window, in the header as a compact pill (the
   full figure is its title, #3656), drawn ONLY when the engine reported
   one. Amber at 80 %, red at 90 % — the app's own tokens, so the
   thresholds read the same in both themes. */
.mm-sp-meter {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 1px solid var(--border); border-radius: 999px;
  background: none; color: var(--text-dim);
  font: inherit; font-size: 11.5px; padding: 2px 7px; cursor: pointer;
}
.mm-sp-meter:hover { border-color: var(--accent); color: var(--text); }
.mm-sp-meter.warn { color: var(--warn); border-color: var(--warn); }
.mm-sp-meter.danger { color: var(--danger); border-color: var(--danger); }
.mm-sp-meter-text { flex: none; }
.mm-sp-bar {
  display: block; width: 36px; height: 4px; flex: none;
  border-radius: 2px; background: var(--border); overflow: hidden;
}
/* Below 560px the pill collapses to its percentage (#3656). */
@media (max-width: 560px) { .mm-sp-head-main .mm-sp-bar { display: none; } }
.mm-sp-bar-fill { display: block; height: 100%; background: var(--accent-fill); }
.mm-sp-bar.warn .mm-sp-bar-fill { background: var(--warn); }
.mm-sp-bar.danger .mm-sp-bar-fill { background: var(--danger); }
.mm-sp-usage-panel {
  display: flex; flex-direction: column; gap: 10px;
  min-width: 300px; max-width: 380px; padding: 6px;
}
.mm-sp-usage-row { display: flex; flex-direction: column; gap: 4px; }
.mm-sp-usage-row .mm-sp-bar { width: 100%; }
.mm-sp-usage-line { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.mm-sp-usage-label { flex: 1; min-width: 0; }
.mm-sp-usage-when { flex: none; color: var(--text-dim); font-size: 11.5px; }
.mm-sp-usage-val { flex: none; color: var(--text-dim); }
.mm-sp-usage-head {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); border-top: 1px solid var(--border-soft); padding-top: 8px;
}
.mm-sp-usage-note { font-size: 11.5px; color: var(--text-dim); }

.mm-sp-composer {
  flex: 0 0 auto; padding: 8px 16px 12px; border-top: 1px solid var(--border);
  background: var(--panel); display: grid; gap: 6px;
}
/* The shared composer inside the panel: no second card frame, the panel's
   own border is the edge. */
.mm-sp-composer .mm-cx { border: 0; padding: 0; background: none; }
.mm-sp-ended {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-dim);
}
.mm-sp-ended-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent); font: inherit; font-weight: 650;
}
.mm-sp-ended-link:hover { text-decoration: underline; }

/* -- confirms ----------------------------------------------------------------- */

/* The panel's confirm sheets (End session, Archive) are the shared modal's
   body: same inset as .modal-body so the text lines up under the title and
   the buttons sit in a spaced row, not the card's corner (#3637 QA). */
.modal-card > .mm-sp-confirm { padding: 14px 20px 18px; }
.mm-sp-confirm { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.45; }
.mm-sp-confirm p { margin: 0; }
.mm-sp-confirm .muted { color: var(--text-dim); font-size: 12.5px; }
.mm-sp-confirm-status { color: var(--text-dim); font-size: 12.5px; }
.mm-sp-confirm-status:empty { display: none; }
.mm-sp-confirm-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
