/* Reading surface: raw text stays primary; provenance and technical fields remain available. */
body.fusion .sidebar-memory-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:22px; }
body.fusion .sidebar-memory-heading h3 { font-size:20px; margin:0; font-weight:550; }
body.fusion .sidebar-memory-heading p { margin:6px 0 0; }
body.fusion .sidebar-memory-heading button { flex:none; }
.record-filters { display:flex; gap:12px; align-items:end; margin:0 0 12px; }
.record-filters label { display:flex; flex-direction:column; gap:7px; min-width:0; }
.record-filters label > span { font-size:12px; color:var(--muted); }
.record-filters .record-search { flex:1; }
body.fusion .record-filters input, body.fusion .record-filters select { margin:0; min-height:42px; width:100%; }
body.fusion #memories { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
body.fusion #memories .record-card { border:1px solid var(--line); border-radius:8px; background:#fbfcfa; padding:0; overflow:hidden; }
body.fusion .record-open { display:block; width:100%; height:auto; padding:22px; background:transparent; color:var(--text); text-align:left; border:0; border-radius:0; }
body.fusion .record-open:hover { background:#eff3ed; }
.record-open:focus-visible, .record-object-link:focus-visible { outline:2px solid #50735c; outline-offset:-3px; }
.record-card-top, .record-card-bottom { display:flex; justify-content:space-between; align-items:start; gap:12px; font-size:12px; color:var(--muted); flex-wrap:wrap; }
.record-card-top > span { color:#416c56; }
.record-excerpt { display:block; font-size:15px; line-height:1.85; margin:16px 0 20px; white-space:pre-wrap; overflow-wrap:anywhere; font-weight:400; }
.record-card-bottom > span:last-child { color:#416c56; }
.record-tags { display:flex; flex-wrap:wrap; gap:6px; padding:0 22px 18px; }
.record-tags span { max-width:100%; font-size:11px; color:var(--muted); background:#edf1eb; border-radius:3px; padding:3px 7px; overflow-wrap:anywhere; }
.record-pagination { display:flex; justify-content:center; gap:12px; margin:22px 0; }
.record-empty { grid-column:1/-1; padding:30px 0; color:var(--muted); line-height:1.7; }
body.fusion #memory-reader-dialog { width:min(850px,calc(100vw - 40px)); padding:0; max-height:88dvh; overflow-y:auto; overscroll-behavior:contain; }
.record-dialog-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; position:sticky; top:0; z-index:1; padding:18px 30px; background:var(--bg); border-bottom:1px solid var(--line); }
body.fusion .record-dialog-heading h2 { font-size:18px; margin:0; overflow-wrap:anywhere; }
body.fusion .record-dialog-heading button { flex:none; }
#memory-reader-body { padding:28px 32px 36px; min-width:0; }
.record-current { padding:0 0 18px; }
.record-eyebrow, .record-date { font-size:12px; color:var(--muted); line-height:1.7; }
body.fusion .record-prose { font-size:16px; line-height:1.95; font-weight:400; white-space:pre-wrap; overflow-wrap:anywhere; margin:18px 0; }
.record-date { margin-top:22px; }
.record-technical { font-size:12px; line-height:1.8; color:var(--muted); padding:12px 0; overflow-wrap:anywhere; }
.record-technical summary { cursor:pointer; }
.record-section { border-top:1px solid var(--line); padding-top:24px; margin-top:20px; }
body.fusion .record-section h3, body.fusion .record-linked-version h3 { font-size:16px; font-weight:550; margin:0 0 16px; }
.record-revision { border:1px solid var(--line); border-radius:6px; padding:16px; margin-top:12px; }
.record-revision > summary { cursor:pointer; font-size:14px; line-height:1.6; }
.record-revision summary time { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.record-revision-reason { font-size:14px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.record-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.record-comparison section { min-width:0; padding:14px; background:#f0f3ee; border-radius:5px; }
.record-comparison h4 { font-size:12px; color:var(--muted); margin:0; }
body.fusion .record-comparison .record-prose { font-size:14px; line-height:1.85; }
.record-notice, .record-linked-version { background:#eef2e9; border-left:3px solid #91aa87; padding:14px 18px; font-size:13px; line-height:1.8; overflow-wrap:anywhere; }
.record-linked-version { margin:0 0 28px; }
body.fusion .record-object-link { display:flex; flex-direction:column; align-items:start; width:100%; gap:6px; margin-top:10px; padding:16px; background:#eff3ed; color:var(--text); text-align:left; border:1px solid var(--line); border-radius:5px; overflow-wrap:anywhere; }
.record-object-link span { font-size:12px; color:var(--muted); }
.object-story-section { border-block:1px solid var(--line); padding:20px 0; margin:20px 0; }
.object-story-section h4 { margin:0 0 12px; font-size:15px; font-weight:550; }
.object-story-reason { white-space:pre-wrap; overflow-wrap:anywhere; font-size:15px; line-height:1.9; }
.object-story-note { background:#eef2e9; padding:12px; font-size:12px; line-height:1.7; }
#world-player-panel { margin-top:28px; padding:18px; line-height:1.7; }
#world-player-secret { padding:14px 0; }
.world-player-row { display:flex; justify-content:space-between; gap:16px; align-items:center; border-bottom:1px solid var(--line); padding:12px 0; overflow-wrap:anywhere; }
body.fusion.fusion-timeline #memories { display:block; }
body.fusion.fusion-timeline #memories .record-card { margin-bottom:16px; overflow:visible; }
@media (max-width:700px) {
  .record-filters { flex-wrap:wrap; gap:10px; }
  .record-filters .record-search { flex-basis:100%; }
  .record-filters label:not(.record-search) { flex:1; }
  body.fusion #memories { grid-template-columns:minmax(0,1fr); gap:12px; }
  body.fusion .record-open { padding:18px; }
  .record-tags { padding:0 18px 16px; }
  body.fusion #memory-reader-dialog { inset:auto 0 0; margin:0; width:100%; max-width:none; max-height:94dvh; border-radius:12px 12px 0 0; }
  .record-dialog-heading { padding:14px 18px; }
  #memory-reader-body { padding:20px 18px calc(28px + env(safe-area-inset-bottom,0px)); }
  .record-comparison { grid-template-columns:minmax(0,1fr); }
  body.fusion .sidebar-memory-heading { align-items:start; gap:10px; }
  body.fusion .sidebar-memory-heading h3 { font-size:18px; }
}
