counterparts 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/docs/module-map.md +3 -2
  3. package/package.json +1 -1
  4. package/src/adapters/claude-code/NOTES.md +16 -0
  5. package/src/adapters/claude-code/doctor.ts +146 -0
  6. package/src/adapters/claude-code/hooks.ts +31 -3
  7. package/src/adapters/claude-code/transcript.ts +7 -0
  8. package/src/adapters/cli/CONTRACT.md +11 -0
  9. package/src/adapters/cli/INTERFACE-GAPS.md +16 -0
  10. package/src/adapters/cli/NOTES.md +25 -0
  11. package/src/adapters/cli/commands.ts +173 -4
  12. package/src/adapters/cli/dream-core.ts +126 -0
  13. package/src/adapters/cli/help.ts +17 -0
  14. package/src/adapters/cli/mechanisms.ts +169 -101
  15. package/src/adapters/dashboard/CONTRACT.md +5 -0
  16. package/src/adapters/dashboard/INTERFACE-GAPS.md +12 -0
  17. package/src/adapters/dashboard/NOTES.md +38 -0
  18. package/src/adapters/dashboard/registries.ts +31 -1
  19. package/src/adapters/dashboard/web/README.md +45 -16
  20. package/src/adapters/dashboard/web/app.html +2 -0
  21. package/src/adapters/dashboard/web/flow.ts +12 -0
  22. package/src/adapters/dashboard/web/lanes.ts +141 -0
  23. package/src/adapters/dashboard/web/mechanisms/association/index.js +1 -2
  24. package/src/adapters/dashboard/web/mechanisms/consolidation/index.js +8 -5
  25. package/src/adapters/dashboard/web/mechanisms/consolidation/panel.js +7 -7
  26. package/src/adapters/dashboard/web/mechanisms/decay/index.js +1 -2
  27. package/src/adapters/dashboard/web/mechanisms/dreaming/index.js +19 -0
  28. package/src/adapters/dashboard/web/mechanisms/emotional/index.js +1 -2
  29. package/src/adapters/dashboard/web/mechanisms/episodic-semantic/index.js +4 -5
  30. package/src/adapters/dashboard/web/mechanisms/index.js +5 -3
  31. package/src/adapters/dashboard/web/mechanisms/interference/index.js +1 -2
  32. package/src/adapters/dashboard/web/mechanisms/prospective/index.js +1 -2
  33. package/src/adapters/dashboard/web/mechanisms/reconsolidation/index.js +1 -2
  34. package/src/adapters/dashboard/web/mechanisms/regions.js +1 -1
  35. package/src/adapters/dashboard/web/mechanisms/retrieval/index.js +1 -2
  36. package/src/adapters/dashboard/web/mechanisms/salience/index.js +1 -2
  37. package/src/adapters/dashboard/web/mechanisms/schema/index.js +1 -2
  38. package/src/adapters/dashboard/web/narrate.ts +68 -13
  39. package/src/adapters/dashboard/web/pages/home/home.css +29 -13
  40. package/src/adapters/dashboard/web/pages/home/index.js +2 -0
  41. package/src/adapters/dashboard/web/pages/home/sections/explorer.js +22 -7
  42. package/src/adapters/dashboard/web/pages/home/sections/hero.js +15 -3
  43. package/src/adapters/dashboard/web/pages/home/sections/live-activity.js +15 -9
  44. package/src/adapters/dashboard/web/pages/home/sections/recent-chapters.js +6 -2
  45. package/src/adapters/dashboard/web/pages/home/sections/tiles.js +35 -18
  46. package/src/adapters/dashboard/web/pages/memories/index.js +30 -36
  47. package/src/adapters/dashboard/web/pages/memories/memories.css +97 -72
  48. package/src/adapters/dashboard/web/pages/memories/row.js +51 -0
  49. package/src/adapters/dashboard/web/pages/memories/sections/feel.js +176 -0
  50. package/src/adapters/dashboard/web/pages/memories/sections/hold.js +67 -0
  51. package/src/adapters/dashboard/web/pages/memories/sections/list.js +65 -43
  52. package/src/adapters/dashboard/web/pages/memories/sections/search.js +26 -23
  53. package/src/adapters/dashboard/web/pages/memories/state.js +12 -5
  54. package/src/adapters/dashboard/web/pages/self/index.js +4 -2
  55. package/src/adapters/dashboard/web/pages/self/sections/dreams.js +76 -0
  56. package/src/adapters/dashboard/web/pages/self/sections/journal.js +1 -1
  57. package/src/adapters/dashboard/web/pages/self/sections/page.js +1 -1
  58. package/src/adapters/dashboard/web/pages/self/sections/settling.js +50 -20
  59. package/src/adapters/dashboard/web/pages/self/sections/wake.js +1 -1
  60. package/src/adapters/dashboard/web/pages/self/self.css +23 -20
  61. package/src/adapters/dashboard/web/pages/self/state.js +0 -2
  62. package/src/adapters/dashboard/web/server.ts +9 -0
  63. package/src/adapters/dashboard/web/shared/memory-marks.css +17 -0
  64. package/src/adapters/dashboard/web/shared/memory-marks.js +81 -0
  65. package/src/adapters/dashboard/web/shared/memory-modal.js +240 -62
  66. package/src/adapters/dashboard/web/shared/modal.css +67 -0
  67. package/src/adapters/dashboard/web/shared/tip.js +1 -1
  68. package/src/adapters/dashboard/web/shared/widgets/feed.css +4 -0
  69. package/src/adapters/dashboard/web/shared/widgets/feed.js +56 -14
  70. package/src/adapters/dashboard/web/shared/widgets/light.css +1 -0
  71. package/src/adapters/dashboard/web/shared/widgets/light.js +7 -5
  72. package/src/adapters/dashboard/web/shared/widgets/tips.css +19 -0
  73. package/src/adapters/dashboard/web/{pages/self → shared/widgets}/tips.js +15 -9
  74. package/src/adapters/dashboard/web/views/activity.ts +18 -2
  75. package/src/adapters/dashboard/web/views/archive-words.ts +27 -10
  76. package/src/adapters/dashboard/web/views/dreams.ts +199 -0
  77. package/src/adapters/dashboard/web/views/mechanism-panel.ts +116 -35
  78. package/src/adapters/dashboard/web/views/mechanisms.ts +81 -326
  79. package/src/adapters/dashboard/web/views/memories.ts +245 -43
  80. package/src/adapters/dashboard/web/views/memory-words.ts +133 -0
  81. package/src/adapters/dashboard/web/views/memory.ts +215 -7
  82. package/src/adapters/dashboard/web/views/mind.ts +133 -57
  83. package/src/adapters/dashboard/web/views/overview.ts +80 -42
  84. package/src/adapters/dashboard/web/views/search.ts +35 -1
  85. package/src/adapters/dashboard/web/views/shared.ts +14 -0
  86. package/src/adapters/dashboard/web/views.ts +2 -0
  87. package/src/adapters/fired.ts +85 -5
  88. package/src/adapters/mcp/NOTES.md +11 -0
  89. package/src/adapters/mcp/server.ts +90 -1
  90. package/src/adapters/mcp/tools.ts +129 -1
  91. package/src/adapters/mechanism-evidence.ts +465 -0
  92. package/src/core/counterpart.ts +113 -4
  93. package/src/core/dream/CONTRACT.md +143 -0
  94. package/src/core/dream/INTERFACE-GAPS.md +24 -0
  95. package/src/core/dream/NOTES.md +84 -0
  96. package/src/core/dream/index.ts +1067 -0
  97. package/src/core/dream/mark.ts +14 -0
  98. package/src/core/dream/tunables.ts +56 -0
  99. package/src/core/physics/CONTRACT.md +92 -24
  100. package/src/core/physics/NOTES.md +139 -0
  101. package/src/core/physics/index.ts +345 -68
  102. package/src/core/recall/NOTES.md +16 -0
  103. package/src/core/recall/index.ts +9 -2
  104. package/src/core/remember/CONTRACT.md +5 -0
  105. package/src/core/remember/spans.ts +11 -1
  106. package/src/core/self/CONTRACT.md +3 -0
  107. package/src/core/self/INTERFACE-GAPS.md +7 -0
  108. package/src/core/self/NOTES.md +30 -0
  109. package/src/core/self/identity.ts +95 -5
  110. package/src/core/self/index.ts +17 -0
  111. package/src/core/self/tunables.ts +17 -0
  112. package/src/core/sleep/CONTRACT.md +17 -1
  113. package/src/core/sleep/INTERFACE-GAPS.md +19 -0
  114. package/src/core/sleep/NOTES.md +36 -0
  115. package/src/core/sleep/consolidate.ts +149 -96
  116. package/src/core/sleep/decay.ts +11 -0
  117. package/src/core/sleep/index.ts +4 -1
  118. package/src/core/sleep/tunables.ts +9 -0
  119. package/src/core/sleep/types.ts +17 -0
  120. package/src/core/sleep/upgrade.ts +168 -0
  121. package/src/core/store/CONTRACT.md +12 -0
  122. package/src/core/store/NOTES.md +48 -0
  123. package/src/core/store/index.ts +610 -8
  124. package/src/core/store/operational.ts +314 -3
  125. package/src/core/store/owner-op-seam.ts +79 -1
  126. package/src/core/types.ts +28 -0
  127. package/src/adapters/dashboard/web/pages/memories/sections/constellation.js +0 -178
  128. package/src/adapters/dashboard/web/pages/memories/sections/kinds.js +0 -42
@@ -11,8 +11,6 @@ export const ui = {
11
11
  day: null,
12
12
  /** Expanded chapters, as `<row id>:<chapter number>`. */
13
13
  chapters: new Set(),
14
- /** Open `?` tips, by name. */
15
- tips: new Set(),
16
14
  /** The wake's full text is showing. */
17
15
  wake: false,
18
16
  /** Which count's list is open above the chart: "core" | "guarded" | "contested" | null. */
@@ -79,6 +79,7 @@ import type { ActionContext } from "./actions.js";
79
79
  import { firedPanel } from "./fired.js";
80
80
  import { mechanismPanel } from "./views/mechanism-panel.js";
81
81
  import { mechanismsView } from "./views/mechanisms.js";
82
+ import { DREAM_LIMIT, dreamsView } from "./views/dreams.js";
82
83
  import { resolveStatic } from "./static.js";
83
84
  import {
84
85
  activityView,
@@ -257,6 +258,13 @@ export function router(
257
258
  state: q.get("state"),
258
259
  kind: q.get("kind"),
259
260
  band: q.get("band"),
261
+ core: q.get("core") === "1",
262
+ journal: q.get("journal") === "1",
263
+ hold: q.get("hold"),
264
+ feeling: q.get("feeling"),
265
+ whose: q.get("whose"),
266
+ feelingCore: q.get("feelingCore"),
267
+ sort: q.get("sort"),
260
268
  offset: intParam(url, "offset", 0),
261
269
  limit: intParam(url, "limit", 50),
262
270
  }));
@@ -270,6 +278,7 @@ export function router(
270
278
  return json(searchView(src, url.searchParams.get("q") ?? "", intParam(url, "limit", 25)));
271
279
  }
272
280
  if (path === "/api/mind") return json(mindView(src));
281
+ if (path === "/api/dreams") return json(dreamsView(src, intParam(url, "limit", DREAM_LIMIT)));
273
282
  if (path === "/api/flow") return json(flowView(src, intParam(url, "limit", 24)));
274
283
  if (path === "/api/node") {
275
284
  const key = url.searchParams.get("key") ?? "";
@@ -0,0 +1,17 @@
1
+ /* The marks a memory carries anywhere it is shown (`memory-marks.js`): its
2
+ kind's icon, feeling dots, the one quiet strength meter, and the badges for
3
+ special cases. The memories tab's rows and the memory card both use these. */
4
+ .kic{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;
5
+ vertical-align:-2px;flex:none}
6
+ .kic .f{fill:currentColor;stroke:none}
7
+ .kmark{display:inline-flex;align-items:center}
8
+ .fdots{display:inline-flex;gap:3px;align-items:center}
9
+ .fdots i{display:block;width:8px;height:8px;border-radius:50%}
10
+ .smeter{display:inline-block;width:34px;height:4px;border-radius:2px;background:var(--deep);
11
+ border:1px solid rgba(0,229,255,.1);overflow:hidden;vertical-align:middle}
12
+ .smeter span{display:block;height:100%;background:rgba(0,229,255,.55);border-radius:2px}
13
+ .mbadge{display:inline-flex;align-items:center;gap:3px;font-size:11.5px;line-height:1.3;color:var(--dim);
14
+ border:1px solid var(--border);border-radius:9px;padding:1px 7px;white-space:nowrap}
15
+ .mbadge.core{color:#e8dcff;border-color:rgba(179,136,255,.45)}
16
+ .mbadge.lock{color:var(--amber);border-color:rgba(255,215,64,.35);padding:1px 5px}
17
+ .mbadge.journal{color:var(--purple);border-color:rgba(179,136,255,.3)}
@@ -0,0 +1,81 @@
1
+ /* The small marks a memory carries wherever it is shown — its kind (an icon and
2
+ a colour), how firmly it is held (a brightness level and one quiet meter),
3
+ its feelings (coloured dots) and its special cases (★ core, a lock for
4
+ protected, "journal"). The memories tab's rows and the memory card both draw
5
+ from here, so a kind looks the same in a chip, a row and a card.
6
+ (2026-09-26: an experiment — change freely.) */
7
+ import { esc } from "./dom.js";
8
+
9
+ const svg = (paths) =>
10
+ '<svg class="kic" viewBox="0 0 16 16" aria-hidden="true" focusable="false">' + paths + "</svg>";
11
+
12
+ /** Each kind: the words, a colour, and a 16px line icon drawn in currentColor. */
13
+ export const KINDS = {
14
+ self: { label: "about me", colour: "#b388ff",
15
+ icon: svg('<circle cx="8" cy="8" r="5.5"/><circle cx="8" cy="8" r="1.8" class="f"/>') },
16
+ person: { label: "people", colour: "#ffb74d",
17
+ icon: svg('<circle cx="8" cy="5.2" r="2.6"/><path d="M3 14c.6-3 2.6-4.6 5-4.6s4.4 1.6 5 4.6"/>') },
18
+ entity: { label: "things", colour: "#4dd9ec",
19
+ icon: svg('<path d="M8 2 13.5 5v6L8 14 2.5 11V5z"/><path d="M2.5 5 8 8l5.5-3M8 8v6"/>') },
20
+ skill: { label: "skills", colour: "#26c6a6",
21
+ icon: svg('<path d="M9.2 1.8 3.8 9h4l-1 5.2L12.2 7h-4z"/>') },
22
+ place: { label: "places", colour: "#9ccc65",
23
+ icon: svg('<path d="M8 14.3s4.6-4.3 4.6-7.8a4.6 4.6 0 1 0-9.2 0c0 3.5 4.6 7.8 4.6 7.8z"/><circle cx="8" cy="6.4" r="1.6"/>') },
24
+ fact: { label: "facts", colour: "#82b1ff",
25
+ icon: svg('<rect x="3" y="2" width="10" height="12" rx="1.5"/><path d="M5.5 5.5h5M5.5 8h5M5.5 10.5h3"/>') },
26
+ };
27
+
28
+ export function kindOf(kind) {
29
+ return KINDS[kind] || { label: String(kind || "?"), colour: "#8a95a3", icon: svg('<circle cx="8" cy="8" r="4"/>') };
30
+ }
31
+
32
+ /** The kind's icon in its colour, optionally with its word. */
33
+ export function kindMark(kind, withLabel) {
34
+ const k = kindOf(kind);
35
+ return '<span class="kmark" style="color:' + k.colour + '">' + k.icon + "</span>" +
36
+ (withLabel ? '<span class="klabel">' + esc(k.label) + "</span>" : "");
37
+ }
38
+
39
+ /** The six cores of the feelings wheel (`core/feelings-wheel.ts`), each a colour. */
40
+ export const FEELING_COLOURS = {
41
+ happy: "#ffd740", sad: "#64b5f6", fear: "#ffa45c", anger: "#ff6b6b", surprise: "#d59cf0", disgust: "#8bd17c",
42
+ };
43
+
44
+ /** One dot per feeling, its word on hover. Empty string when there are none. */
45
+ export function feelingDots(feelings) {
46
+ if (!feelings || feelings.length === 0) return "";
47
+ const words = feelings.map((f) => f.word).join(", ");
48
+ return '<span class="fdots" title="' + esc("felt: " + words) + '" aria-label="' + esc("felt: " + words) + '">' +
49
+ feelings.map((f) => '<i style="background:' + (FEELING_COLOURS[f.core] || "#8a95a3") + '"></i>').join("") + "</span>";
50
+ }
51
+
52
+ /** Brightness 1 (dim, still readable) … 5 (bright), from strength 0…1. */
53
+ export function litLevel(strength) {
54
+ const s = Math.max(0, Math.min(1, Number(strength) || 0));
55
+ return s < 0.2 ? 1 : s < 0.4 ? 2 : s < 0.6 ? 3 : s < 0.8 ? 4 : 5;
56
+ }
57
+
58
+ /** The one quiet meter: how firmly it is held. */
59
+ export function strengthMeter(strength) {
60
+ const pct = Math.round(Math.max(0, Math.min(1, Number(strength) || 0)) * 100);
61
+ return '<span class="smeter" title="held firmly — grows when used, fades when not (' + pct + '%)" role="img" aria-label="held ' +
62
+ pct + '%"><span style="width:' + pct + '%"></span></span>';
63
+ }
64
+
65
+ /** The special cases only: ★ core, a lock for protected, journal. */
66
+ export function badges(r) {
67
+ return (r.core ? '<span class="mbadge core" title="in the core: part of who I am">★ core</span>' : "") +
68
+ (r.protected ? '<span class="mbadge lock" title="protected: nothing can revise it">' + LOCK + "</span>" : "") +
69
+ (r.journal ? '<span class="mbadge journal" title="a journal chapter, kept as written — not scored">journal</span>' : "");
70
+ }
71
+
72
+ const LOCK = '<svg class="kic" viewBox="0 0 16 16" aria-label="protected"><rect x="3.5" y="7" width="9" height="7" rx="1.3"/>' +
73
+ '<path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2"/></svg>';
74
+
75
+ /** `2026-09-26` → `26 Sep 2026`; anything else as it came. */
76
+ export function shortDate(iso) {
77
+ const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(String(iso || ""));
78
+ if (!m) return String(iso || "");
79
+ const mon = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][Number(m[2]) - 1];
80
+ return Number(m[3]) + " " + mon + " " + m[1];
81
+ }
@@ -1,11 +1,19 @@
1
1
  /* One memory, opened — from any row, dot or reference on any page. Resolved at
2
- the moment it is opened, so a memory that left the store says so. */
2
+ the moment it is opened, so a memory that left the store says so.
3
+
4
+ Top to bottom (2026-09-26, an experiment): the title and the words; how
5
+ strong it is and where it heads if unused; why it mattered; the days it was
6
+ used; its standing in plain words; its feelings; what it is linked to; its
7
+ versions; a few small chips (model, the date it is about, when it was
8
+ recorded); and a "details" fold with the raw numbers. A part with nothing in
9
+ it is left out. */
3
10
  import { act, resultHtml } from "./actions.js";
4
11
  import { api, fail } from "./api.js";
5
12
  import { emptyBox } from "./absence.js";
6
13
  import { esc } from "./dom.js";
7
14
  import { headline, n2, n3, said } from "./format.js";
8
- import { openModal, section } from "./modal.js";
15
+ import { FEELING_COLOURS, kindMark, kindOf, shortDate } from "./memory-marks.js";
16
+ import { openModal } from "./modal.js";
9
17
  import { confirmTyped } from "./widgets/confirm.js";
10
18
 
11
19
  export async function openMemory(id) {
@@ -17,70 +25,240 @@ export async function openMemory(id) {
17
25
  emptyBox(d.absence || "[no longer at this address]",
18
26
  "Ids are resolved at the moment a page is drawn, so a memory that has left the store stops resolving immediately."));
19
27
  }
28
+ openModal(memoryCard(d));
29
+ }
30
+
31
+ /** The card's markup — pure, from the `/api/memory` payload. */
32
+ export function memoryCard(d) {
33
+ const k = kindOf(d.kind);
34
+ const title = d.title ? esc(d.title) : d.confidential ? said(d.text, true) : esc(headline(d.shownText || d.text));
35
+ return '<div class="mc' + (d.archived ? " mc-arch" : "") + '">' +
36
+ '<h3 class="mc-title">' + kindMark(d.kind, false) + "<span>" + title + "</span></h3>" +
37
+ '<div class="mc-kind">' + esc(k.label) + (d.askedFor ? " · you asked for " + esc(d.askedFor) + ", which forwards here" : "") + "</div>" +
38
+ (d.archived ? '<div class="mc-archived">Archived — ' + esc(d.archivedWords || d.archived) + ". Kept, not deleted.</div>" : "") +
39
+ "<div class='body'>" + (d.confidential ? '<span class="withheld">' + esc(d.text) + "</span>" : esc(d.shownText || d.text)) + "</div>" +
40
+ (d.journal
41
+ ? '<p class="mc-note">A journal entry, not a memory: the account memories are made from. It sits outside every sleep phase, and nothing here decays.</p>'
42
+ : "") +
43
+ part("How strong", curvePart(d)) +
44
+ part("Why it mattered", fingerprint(d)) +
45
+ part("Use", usePart(d)) +
46
+ part("Standing", standing(d)) +
47
+ part("Feelings", feelingsPart(d)) +
48
+ part("Linked memories", linked(d)) +
49
+ part("Versions", versions(d)) +
50
+ chips(d) +
51
+ footer(d) +
52
+ "</div>";
53
+ }
54
+
55
+ /** A titled part, or nothing at all when it has nothing in it. */
56
+ function part(title, body) {
57
+ return body ? '<section class="mc-part"><h4>' + esc(title) + "</h4>" + body + "</section>" : "";
58
+ }
59
+
60
+ const pct = (x) => Math.round(Math.max(0, Math.min(1, Number(x) || 0)) * 100) + "%";
61
+
62
+ // ── how strong: so far, and ahead if unused ────────────────────────────────
63
+
64
+ function curvePart(d) {
65
+ if (!d.curve) return d.curveNote && !d.journal ? '<p class="mc-line">' + esc(d.curveNote) + ".</p>" : "";
66
+ const c = d.curve;
67
+ const W = 520, H = 120, L = 8, R = 8, T = 10, B = 20;
68
+ const span = Math.max(1, c.to - c.from);
69
+ const x = (day) => L + ((day - c.from) / span) * (W - L - R);
70
+ const y = (s) => T + (1 - Math.max(0, Math.min(1, s))) * (H - T - B);
71
+ const path = (pts) => pts.map((q, i) => (i === 0 ? "M" : "L") + x(q[0]).toFixed(1) + " " + y(q[1]).toFixed(1)).join(" ");
72
+ const past = c.points.filter((q) => q[0] <= c.day);
73
+ const ahead = c.points.filter((q) => q[0] >= c.day);
74
+ const now = (c.points.find((q) => q[0] === c.day) || [c.day, d.strength])[1];
75
+ let svg = '<svg class="mc-curve" viewBox="0 0 ' + W + " " + H + '" preserveAspectRatio="none" role="img" aria-label="strength so far, and ahead if unused">' +
76
+ '<line class="mc-guide" x1="' + L + '" x2="' + (W - R) + '" y1="' + y(c.archiveLine) + '" y2="' + y(c.archiveLine) + '"/>' +
77
+ '<line class="mc-today" x1="' + x(c.day) + '" x2="' + x(c.day) + '" y1="' + T + '" y2="' + (H - B) + '"/>';
78
+ if (past.length > 1) svg += '<path d="' + path(past) + '" class="mc-past"/>';
79
+ if (ahead.length > 1) svg += '<path d="' + path(ahead) + '" class="mc-ahead"/>';
80
+ svg += '<circle cx="' + x(c.day) + '" cy="' + y(now) + '" r="4" class="mc-now"/></svg>';
81
+ const axis = '<div class="mc-axis">' + (c.from === c.day
82
+ ? "<span>today, day " + c.day + "</span>"
83
+ : "<span>last used, day " + c.from + "</span><span>today</span>") + "<span>day " + c.to + "</span></div>";
84
+ const words = "Held " + pct(now) + " now" + (c.from < c.day ? ", fading since it was last used" : "") + ". " + (c.archiveDay !== null
85
+ ? "Unused, it falls to the let-go line around lived day " + c.archiveDay + "."
86
+ : now < c.archiveLine ? "It is already under the let-go line." : "Unused, it stays above the let-go line for the next " + (c.to - c.day) + " lived days.");
87
+ return svg + axis + '<p class="mc-line">' + esc(words) +
88
+ ' <span class="mc-dim">Solid is what happened; dashed is where it heads if nobody uses it; the faint line is where it could be let go.</span></p>';
89
+ }
90
+
91
+ // ── why it mattered: a four-part fingerprint ────────────────────────────────
92
+
93
+ function fingerprint(d) {
94
+ if (d.journal || d.chapter) return "";
95
+ const s = d.salience;
96
+ const parts = [["relevance", s.relevance], ["feeling", s.emotional], ["changes what I expect", s.predictive], ["novelty", s.novelty]];
97
+ if (parts.every(([, v]) => !v)) return "";
98
+ return '<div class="mc-print">' + parts.map(([label, v]) => {
99
+ const blind = v === null;
100
+ return '<div class="mc-pbar" title="' + esc(label + ": " + (blind ? "not measured (nothing to compare it with yet)" : n2(v))) + '">' +
101
+ '<span class="mc-plabel">' + esc(label) + (blind ? ' <span class="mc-dim">· not measured</span>' : "") + "</span>" +
102
+ '<span class="mc-ptrack' + (blind ? " blind" : "") + '"><span style="width:' + (blind ? 0 : Math.round(Math.max(0, Math.min(1, v)) * 100)) + '%"></span></span>' +
103
+ "</div>";
104
+ }).join("") + "</div>";
105
+ }
106
+
107
+ // ── use: a strip of lived days, a dot on each day it was used ─────────────
108
+
109
+ function usePart(d) {
110
+ if (d.journal || d.chapter) return "";
111
+ const p = d.promotion;
112
+ if (d.uses === 0 && d.useDays.length === 0 && !p.byUse) return "";
113
+ const last = d.day;
114
+ const first = Math.max(d.bornDay, last - 59);
115
+ const used = new Set(d.useDays);
116
+ if (d.uses > 0) used.add(d.lastUsedDay);
117
+ let cells = "";
118
+ for (let day = first; day <= last; day++) {
119
+ const cls = "mc-cell" + (used.has(day) ? " used" : "") + (day === d.bornDay ? " born" : "") + (day === last ? " today" : "");
120
+ cells += '<i class="' + cls + '" title="lived day ' + day + (day === d.bornDay ? " — born" : "") + (used.has(day) ? " — used" : "") + '"></i>';
121
+ }
122
+ const shown = [...used].filter((x) => x >= first).length;
123
+ const lines = [];
124
+ if (d.uses > 0) {
125
+ lines.push("Used " + d.uses + "× over " + d.reinforcedDays + (d.reinforcedDays === 1 ? " separate day" : " separate days") +
126
+ ", last on lived day " + d.lastUsedDay + ".");
127
+ if (shown < d.reinforcedDays) lines.push("The log shows " + shown + " of those days; it keeps only so much.");
128
+ } else lines.push("Not used yet.");
129
+ if (p.byUse) {
130
+ const more = Math.max(0, p.required - p.days);
131
+ lines.push("Coming back on " + p.required + " separate days over " + p.needSpan + " makes it core" +
132
+ (more ? " — " + more + " more to go." : p.span < p.needSpan ? " — it needs to keep coming back a little longer." : "."));
133
+ }
134
+ return '<div class="mc-strip" role="img" aria-label="lived days, a dot on each day it was used">' +
135
+ (first > d.bornDay ? '<span class="mc-more">…</span>' : "") + cells + "</div>" +
136
+ '<div class="mc-axis"><span>' + (first === d.bornDay ? "born, day " + first : "day " + first) + "</span><span>today, day " + last + "</span></div>" +
137
+ '<p class="mc-line">' + esc(lines.join(" ")) + "</p>";
138
+ }
139
+
140
+ // ── standing, in plain words ────────────────────────────────────────────────
141
+
142
+ function standing(d) {
143
+ const out = [];
144
+ if (d.promoted) out.push('<span class="mbadge core">★ core</span><span>part of who I am</span>');
145
+ if (d.protected) out.push('<span class="mbadge lock">locked</span><span>protected — nothing can revise it</span>');
146
+ else if (!d.journal && !d.chapter) {
147
+ out.push("<span>revisable — a strong enough correction can change it" +
148
+ (d.pressure > 0 ? '<span class="mc-dim"> · under some pressure now (' + n2(d.pressure) + (d.bar === null ? "" : " of a bar of " + n2(d.bar)) + ")</span>" : "") +
149
+ "</span>");
150
+ }
151
+ if (d.chapter) out.push('<span class="mbadge journal">journal</span><span>a journal chapter, kept as written — not scored</span>');
152
+ return out.length ? '<ul class="mc-list">' + out.map((x) => "<li>" + x + "</li>").join("") + "</ul>" : "";
153
+ }
154
+
155
+ // ── feelings ────────────────────────────────────────────────────────────────
156
+
157
+ function feelingsPart(d) {
158
+ // Emotion part A (#244): feeling now holds a memory higher and slows its fading.
159
+ const held = d.intensity > 0 && !d.confidential
160
+ ? '<p class="mc-dim">Feeling holds it higher and slows its fading (intensity ' + n2(d.intensity) + ").</p>"
161
+ : "";
162
+ if (!d.feelings || d.feelings.length === 0) return held;
163
+ return '<ul class="mc-list">' + d.feelings.map((f) =>
164
+ '<li><i class="mc-fdot" style="background:' + (FEELING_COLOURS[f.core] || "#8a95a3") + '"></i><span>' +
165
+ (f.whose === "owner" ? "you felt " : f.whose === "self" ? "I felt " : esc(f.whose) + " felt ") + "<b>" + esc(f.word) + "</b>" +
166
+ '<span class="mc-dim"> · ' + esc(f.core) + (f.carriedBy ? " — " + esc(f.carriedBy) : "") + "</span></span></li>").join("") + "</ul>" + held;
167
+ }
168
+
169
+ // ── linked memories ────────────────────────────────────────────────────────
170
+
171
+ function ref(id, text, confidential, role) {
172
+ return '<div class="ref" role="button" tabindex="0" onclick="openMemory(\'' + esc(id) + '\')" ' +
173
+ "onkeydown=\"if(event.key==='Enter')openMemory('" + esc(id) + "')\">" +
174
+ (role ? '<span class="role">' + role + "</span>" : "") + said(text, confidential) + "</div>";
175
+ }
176
+
177
+ function linked(d) {
178
+ const around = d.points.filter((p) => p.role === "hangs on" || p.role === "grounded in")
179
+ .map((p) => ref(p.id, p.text, false, esc(p.role)));
180
+ const wired = d.edges.slice().sort((a, b) => b.weight - a.weight).map((e) =>
181
+ ref(e.id, e.text, e.confidential, '<span class="mc-wbar" title="wired together: ' + n2(e.weight) + '"><span style="width:' +
182
+ Math.round(Math.max(0, Math.min(1, e.weight)) * 100) + '%"></span></span>'));
183
+ const all = around.concat(wired);
184
+ return all.length ? '<div class="mc-refs">' + all.join("") + "</div>" : "";
185
+ }
186
+
187
+ // ── versions: one line of its lineage ──────────────────────────────────────
188
+
189
+ const REL = {
190
+ replaced: "replaced this older memory",
191
+ corrects: "corrects (the other stays as it was)",
192
+ revised: "rewritten in place",
193
+ became: "replaced by this newer memory",
194
+ };
195
+
196
+ function versions(d) {
197
+ if (!d.timeline || d.timeline.length === 0) return "";
198
+ const steps = d.timeline.map((s) => {
199
+ const when = s.day === null ? "" : "day " + s.day;
200
+ const head = '<span class="mc-vrel">' + esc(REL[s.rel] || s.rel) + "</span>" +
201
+ (when ? '<span class="mc-dim"> · ' + esc(when) + "</span>" : "") +
202
+ (s.reason && s.rel !== "corrects" ? '<span class="mc-dim"> · ' + esc(String(s.reason).replace(/-/g, " ")) + "</span>" : "");
203
+ const body = s.id ? ref(s.id, s.text, s.confidential, "") : "";
204
+ return '<li class="mc-v mc-v-' + s.rel + '"><i class="mc-vdot"></i><div>' + head + body + "</div></li>";
205
+ });
206
+ const nowAt = d.timeline.some((s) => s.rel === "became") ? "" :
207
+ '<li class="mc-v mc-v-now"><i class="mc-vdot"></i><div><span class="mc-vrel">this memory, as it stands</span>' +
208
+ '<span class="mc-dim"> · revision ' + esc(String(d.revision)) + "</span></div></li>";
209
+ return '<ol class="mc-versions">' + steps.join("") + nowAt + "</ol>";
210
+ }
211
+
212
+ // ── small chips ────────────────────────────────────────────────────────────
213
+
214
+ function chips(d) {
215
+ const c = [];
216
+ if (d.writtenDate) {
217
+ c.push('<span class="mc-chip dated" title="' + (d.chapter ? "the day its journal chapter names" : "the date written at the front of the memory") +
218
+ '">' + esc(shortDate(d.writtenDate)) + "</span>");
219
+ }
220
+ if (d.model) c.push('<span class="mc-chip model" title="the model that wrote these words">' + esc(d.model) + "</span>");
221
+ if (d.eventDate) c.push('<span class="mc-chip" title="the date this memory is about">about ' + esc(d.eventDate) + "</span>");
222
+ if (d.happenedOn) c.push('<span class="mc-chip" title="when it happened">happened ' + esc(d.happenedOn) + "</span>");
223
+ if (d.learnedOn && d.learnedOn !== "—") {
224
+ c.push('<span class="mc-chip" title="the calendar day it entered the store (on a migrated or seeded store, the day of the import)">recorded ' +
225
+ esc(d.learnedOn) + "</span>");
226
+ }
227
+ c.push('<span class="mc-chip" title="the lived day it was born">lived day ' + esc(String(d.bornDay)) + "</span>");
228
+ for (const p of d.prospective || []) {
229
+ c.push('<span class="mc-chip" title="a reminder it holds">reminder ' + esc(p.date) + " · " + esc(p.state) + "</span>");
230
+ }
231
+ return '<div class="mc-chips">' + c.join("") + "</div>";
232
+ }
233
+
234
+ // ── the details fold, and the two buttons ──────────────────────────────────
235
+
236
+ function footer(d) {
20
237
  const kv = (k, v) => '<div class="k">' + esc(k) + '</div><div class="v">' + v + "</div>";
21
238
  const s = d.salience;
22
- openModal(
23
- "<h3>" + (d.title ? esc(d.title) : d.confidential ? said(d.text, true) : esc(headline(d.text))) + "</h3>" +
24
- "<div class='sub'><span>" + esc(d.id) + "</span>" +
25
- (d.askedFor ? "<span>you asked for " + esc(d.askedFor) + ", which forwards here</span>" : "") +
26
- "<span class='path'>rev " + esc(String(d.revision)) + " · " + esc(d.contentHash || "—") + "</span>" +
239
+ const raw = '<div class="kv">' +
240
+ kv("id", esc(d.id)) +
241
+ kv("record", "rev " + esc(String(d.revision)) + " · " + esc(d.contentHash || "—")) +
242
+ kv("band", esc(d.band) + " <span class='mc-dim'>(recorded " + esc(d.recordedBand) + ")</span>") +
243
+ kv("strength", n3(d.strength) + " <span class='mc-dim'>· repetition " + n3(d.repetition) + "</span>") +
244
+ kv("salience", n3(s.combined) + " <span class='mc-dim'>relevance " + n2(s.relevance) + " · emotional " + n2(s.emotional) +
245
+ " · predictive " + n2(s.predictive) + " · novelty " + (s.novelty === null ? "blind" : n2(s.novelty)) +
246
+ (s.claimed === null ? "" : " · claimed floor " + n2(s.claimed)) + "</span>") +
247
+ (d.feelingsLine || d.intensity > 0 ? kv("feelings", esc(d.feelingsLine || "none recorded") + " <span class='mc-dim'>· intensity " + n2(d.intensity) + "</span>") : "") +
248
+ kv("lived", "born day " + d.bornDay + " · used " + d.uses + "× over " + d.reinforcedDays + " days · last used day " + d.lastUsedDay) +
249
+ kv("standing", (d.consolidated ? "consolidated" : "not consolidated") + " · " + (d.promoted ? "promoted" : "not promoted") +
250
+ " · " + (d.protected ? "protected" : "revisable") + " · pressure " + n3(d.pressure) + (d.bar === null ? "" : " / bar " + n3(d.bar))) +
251
+ (d.createdAt ? kv("written", esc(new Date(d.createdAt).toISOString())) : "") +
252
+ (d.archived ? kv("archived", esc(d.archived)) : "") +
253
+ d.points.map((p) => kv(p.role, esc(p.id))).join("") +
254
+ d.removal.map((r) => kv("removal", esc(r.stage) + " by " + esc(r.actor) + " — " + esc(r.reason || "no reason recorded"))).join("") +
255
+ "</div>";
256
+ return '<div class="mc-foot">' +
257
+ '<details class="mc-details"><summary>details</summary>' + raw + "</details>" +
258
+ '<div class="mc-buttons">' +
27
259
  "<button class='copy' data-id=\"" + esc(d.id) + "\" onclick=\"copyId(this)\">copy id</button>" +
28
260
  "<button class='copy act-danger' data-id=\"" + esc(d.id) + "\" onclick=\"removeMemory(this)\">remove…</button>" +
29
- "</div>" +
30
- "<div id='remove-out'></div>" +
31
- "<div class='body'>" + (d.confidential ? '<span class="withheld">' + esc(d.text) + "</span>" : esc(d.text)) + "</div>" +
32
- (d.journal
33
- ? "<p style='color:var(--purple);font-size:11px;line-height:1.7;margin:-4px 0 14px'>" +
34
- "This is a journal entry, not a memory. It is the account a memory was made from, it sits outside " +
35
- "every sleep phase, and the physics below is recorded but never acted on — nothing here decays.</p>"
36
- : "") +
37
- '<div class="kv">' +
38
- kv("kind", esc(d.kind)) +
39
- kv("band", esc(d.band) + " <span style='color:var(--faint)'>(recorded " + esc(d.recordedBand) + ")</span>") +
40
- kv("strength", n3(d.strength) + " <span style='color:var(--faint)'>· repetition " + n3(d.repetition) + "</span>") +
41
- kv("salience", n3(s.combined) + " <span style='color:var(--faint)'>relevance " + n2(s.relevance) +
42
- " · emotional " + n2(s.emotional) + " · predictive " + n2(s.predictive) +
43
- (s.novelty === null ? " · <span style='color:var(--amber)'>novelty blind (no schema context existed)</span>" : " · novelty " + n2(s.novelty)) +
44
- (s.claimed === null ? "" : " · claimed floor " + n2(s.claimed)) + "</span>") +
45
- kv("feelings", d.confidential
46
- ? "<span class='withheld'>withheld with the words</span>"
47
- : d.feelings
48
- ? esc(d.feelings) + " <span style='color:var(--faint)'>· intensity " + n2(d.intensity) +
49
- " — holds it higher and slows its fading</span>"
50
- : d.intensity > 0
51
- ? "<span style='color:var(--dim)'>none recorded</span> <span style='color:var(--faint)'>· emotional score " + n2(d.intensity) +
52
- " holds it higher and slows its fading</span>"
53
- : "<span style='color:var(--dim)'>(none recorded)</span>") +
54
- kv("lived", "born day " + d.bornDay + " · used " + d.uses + "× over " + d.reinforcedDays +
55
- " separate days · last used day " + d.lastUsedDay) +
56
- kv("recorded", esc(d.learnedOn) + (d.happenedOn ? " · happened " + esc(d.happenedOn) : "") +
57
- "<span style='color:var(--faint)'> — the calendar day this entered the store; " +
58
- "on a migrated or seeded store, the day of the import</span>") +
59
- kv("standing", (d.consolidated ? "consolidated" : "not yet consolidated") + " · " +
60
- (d.promoted ? "promoted into identity" : "not promoted") + " · " +
61
- (d.protected ? "<span style='color:var(--amber)'>PROTECTED — no revision path reaches it</span>" : "revisable")) +
62
- kv("pressure", d.pressure === 0
63
- ? "<span style='color:var(--dim)'>(none yet) — nothing has argued with it</span>"
64
- : n3(d.pressure) + (d.bar === null ? "" : " against a bar of " + n3(d.bar))) +
65
- (d.archived ? kv("archived", "<span style='color:var(--amber)'>" + esc(d.archived) + "</span>") : "") +
66
- "</div>" +
67
- section("Wired together with", d.edges.map((e) =>
68
- "<div class='ref' onclick=\"openMemory('" + e.id + "')\"><span class='role'>" + n2(e.weight) + "</span>" +
69
- said(e.text, e.confidential) + "</div>").join(""),
70
- "(none yet) — it fires with nothing.") +
71
- section("What it points at, resolved just now", d.points.map((p) =>
72
- "<div class='ref' onclick=\"openMemory('" + p.id + "')\"><span class='role'>" + esc(p.role) + "</span>" +
73
- esc(p.text) + "</div>").join(""), "(none yet) — it points at nothing.") +
74
- section("Version history", d.versions.map((v) =>
75
- "<div class='ref'><span class='role'>v" + v.seq + " · " + esc(v.reason) + " · day " + v.day + "</span>" +
76
- esc(v.became) + "</div>").join(""), "(none yet) — it has never been revised.") +
77
- section("Looks ahead to", d.prospective.map((p) =>
78
- "<div class='ref'><span class='role'>" + esc(p.date) + " (" + esc(p.precision) + ")</span>" +
79
- esc(p.state) + ", fired " + p.fires + "×</div>").join(""), "(none yet) — it holds no intention.") +
80
- (d.removal.length === 0 ? "" : section("Removal record", d.removal.map((r) =>
81
- "<div class='ref'><span class='role'>" + esc(r.stage) + "</span>by " + esc(r.actor) +
82
- " — " + esc(r.reason || "no reason recorded") + "</div>").join(""), ""))
83
- );
261
+ "</div></div><div id='remove-out'></div>";
84
262
  }
85
263
 
86
264
  /** The id, on demand — it is how the owner addresses this memory anywhere else
@@ -22,3 +22,70 @@
22
22
  #modal .ref{font-size:11px;padding:6px 0;border-bottom:1px solid var(--border);cursor:pointer;line-height:1.55}
23
23
  #modal .ref:hover{color:var(--cyan)}
24
24
  #modal .ref .role{color:var(--dim);display:inline-block;min-width:118px}
25
+
26
+ /* ── the memory card (`memory-modal.js`; 2026-09-26, an experiment) ── */
27
+ #modal .mc-title{display:flex;align-items:flex-start;gap:8px;color:var(--ink);font-size:16px;line-height:1.4;margin-bottom:2px}
28
+ #modal .mc-title .kmark{padding-top:3px}
29
+ #modal .mc-title .kic{width:16px;height:16px}
30
+ .mc-kind{color:var(--faint);font-size:12px;margin:0 0 12px 24px;overflow-wrap:anywhere}
31
+ .mc-archived{color:var(--amber);font-size:13px;margin:-4px 0 12px;padding:7px 11px;border:1px solid rgba(255,215,64,.25);
32
+ border-radius:var(--radius);background:rgba(255,215,64,.04)}
33
+ .mc-arch .body,.mc-arch .mc-title span{color:var(--dim)}
34
+ .mc-arch .mc-curve,.mc-arch .mc-print,.mc-arch .mc-strip{opacity:.55}
35
+ .mc-note{color:var(--purple);font-size:12.5px;line-height:1.6;margin:-4px 0 14px}
36
+ .mc-part{margin:0 0 14px;min-width:0}
37
+ #modal .mc-part h4{margin:0 0 6px}
38
+ .mc-line{color:var(--ink);font-size:13px;line-height:1.55;margin:6px 0 0}
39
+ .mc-dim{color:var(--dim)}
40
+ .mc-curve{display:block;width:100%;height:120px;background:var(--deep);border:1px solid var(--border);border-radius:var(--radius)}
41
+ .mc-guide{stroke:rgba(255,183,77,.45);stroke-width:1;stroke-dasharray:2 3;vector-effect:non-scaling-stroke}
42
+ .mc-today{stroke:rgba(0,229,255,.25);stroke-width:1;vector-effect:non-scaling-stroke}
43
+ .mc-past{fill:none;stroke:var(--cyan);stroke-width:2;vector-effect:non-scaling-stroke}
44
+ .mc-ahead{fill:none;stroke:var(--cyan);stroke-width:1.5;stroke-dasharray:5 4;opacity:.7;vector-effect:non-scaling-stroke}
45
+ .mc-now{fill:var(--cyan)}
46
+ .mc-axis{display:flex;justify-content:space-between;gap:8px;color:var(--faint);font-size:11.5px;margin-top:3px}
47
+ .mc-print{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8.5rem),1fr));gap:8px 14px}
48
+ .mc-pbar{display:flex;flex-direction:column;gap:4px;min-width:0;cursor:default}
49
+ .mc-plabel{color:var(--dim);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
50
+ .mc-ptrack{display:block;height:6px;border-radius:3px;background:var(--deep);border:1px solid var(--border);overflow:hidden}
51
+ .mc-ptrack span{display:block;height:100%;background:var(--purple);border-radius:3px}
52
+ .mc-ptrack.blind{background:repeating-linear-gradient(135deg,var(--deep) 0 4px,rgba(138,149,163,.18) 4px 6px)}
53
+ .mc-strip{display:flex;gap:2px;align-items:center;flex-wrap:nowrap;overflow:hidden}
54
+ .mc-cell{flex:1 1 0;min-width:2px;max-width:18px;height:16px;border-radius:2px;background:var(--deep);border:1px solid var(--border);position:relative}
55
+ .mc-cell.used::after{content:"";position:absolute;left:50%;top:50%;width:min(8px,90%);aspect-ratio:1;
56
+ transform:translate(-50%,-50%);border-radius:50%;background:var(--cyan)}
57
+ .mc-cell.born{border-color:var(--purple)}
58
+ .mc-cell.today{border-color:var(--cyan)}
59
+ .mc-more{color:var(--faint);font-size:12px;padding-right:2px}
60
+ .mc-list{list-style:none;margin:0;padding:0}
61
+ .mc-list li{font-size:13px;line-height:1.55;color:var(--ink);padding:3px 0;display:flex;gap:8px;align-items:baseline}
62
+ .mc-list li>span:last-child{min-width:0;flex:1}
63
+ .mc-list li>.mbadge{flex:none}
64
+ .mc-list b{font-weight:600}
65
+ .mc-fdot{display:inline-block;width:9px;height:9px;border-radius:50%}
66
+ .mc-refs .ref{font-size:12.5px;display:flex;gap:10px;align-items:baseline}
67
+ #modal .mc-refs .ref .role{min-width:0;flex:none;font-size:11.5px}
68
+ .mc-wbar{display:inline-block;width:40px;height:4px;border-radius:2px;background:var(--deep);overflow:hidden;vertical-align:middle}
69
+ .mc-wbar span{display:block;height:100%;background:rgba(0,229,255,.6)}
70
+ .mc-versions{list-style:none;margin:0 0 0 5px;padding:0;border-left:1px solid var(--glow)}
71
+ .mc-v{position:relative;display:flex;gap:10px;padding:4px 0 6px 12px;font-size:12.5px}
72
+ .mc-v>div{min-width:0;flex:1}
73
+ .mc-vdot{position:absolute;left:-5px;top:9px;width:9px;height:9px;border-radius:50%;background:var(--card);border:2px solid var(--glow)}
74
+ .mc-v-now .mc-vdot{background:var(--cyan);border-color:var(--cyan)}
75
+ .mc-vrel{color:var(--ink)}
76
+ #modal .mc-v .ref{border-bottom:none;padding:2px 0 0}
77
+ .mc-chips{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 12px}
78
+ .mc-chip{font-size:12px;color:var(--dim);border:1px solid var(--border);border-radius:11px;padding:2px 9px;white-space:nowrap}
79
+ .mc-chip.model{color:var(--purple);border-color:rgba(179,136,255,.3);font-family:var(--mono);font-size:11.5px}
80
+ .mc-foot{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:flex-start;justify-content:space-between;border-top:1px solid var(--border);padding-top:10px}
81
+ .mc-details{flex:1 1 16rem;min-width:0}
82
+ .mc-details summary{cursor:pointer;color:var(--dim);font-size:12.5px;min-height:24px}
83
+ #modal .mc-details .kv{margin:8px 0 0}
84
+ .mc-buttons{display:flex;gap:8px}
85
+ #modal .mc-buttons .copy{font-size:11px;padding:4px 10px}
86
+ @media(max-width:640px){
87
+ #modal .mc-details .kv{grid-template-columns:minmax(0,1fr)}
88
+ #modal .mc-details .kv .k{margin-top:6px}
89
+ .mc-kind{margin-left:0}
90
+ #modal .mc-buttons .copy,.mc-details summary{min-height:44px}
91
+ }
@@ -1,4 +1,4 @@
1
- /* The hover tooltip (the constellation uses it). `#tip` lives in the shell. */
1
+ /* The hover tooltip (the memories tab's "How it feels" uses it). `#tip` lives in the shell. */
2
2
  import { $ } from "./dom.js";
3
3
 
4
4
  export function showTip(x, y, html) {
@@ -9,5 +9,9 @@
9
9
  .ev.amber .t{color:var(--amber)}
10
10
  .ev.notable .t{color:#dfe6ee}
11
11
  .ev.calm .t{color:var(--dim)}
12
+ .ev .ev-i{display:inline-block;vertical-align:-2px;margin-right:7px;color:var(--cyan);opacity:.85}
13
+ .ev.calm .ev-i{color:var(--dim)}
14
+ .ev.amber .ev-i{color:var(--amber)}
15
+ .ev .ev-x{color:var(--faint);font-family:var(--mono);font-size:.95em;white-space:nowrap}
12
16
  .ev.flash{animation:evflash 1.8s ease-out}
13
17
  @keyframes evflash{0%{background:rgba(0,229,255,.14)}100%{background:transparent}}