/* Memory-only layout: no legacy global styles or workbench theme. */
.memory-scene {
  position: fixed;
  inset: 0;
  z-index: 800;
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}
.memory-scene[data-zone="sky"] {
  background: var(--paper);
  color: #254562;
}
.memory-scene[data-zone="sea"] {
  background: var(--paper);
  color: var(--ink);
}
.memory-scene > header {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 12px 12px;
}
.memory-scene h1 {
  font-size: 18px;
  text-align: center;
}
.memory-scene button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 10px;
}
.memory-scene button:disabled {
  opacity: 0.4;
}
.memory-scene button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.memory-scene > [data-status] {
  font-size: 12px;
  text-align: center;
  min-height: 18px;
}
.memory-scene main {
  max-width: 900px;
  margin: auto;
  padding: 8px 18px 32px;
}
.memory-portal {
  position: relative;
  height: min(75dvh, 800px);
  min-height: 450px;
  animation: memory-enter 0.6s ease both;
}
.memory-scene .realm {
  position: absolute;
  inset: 0;
  font-size: 22px !important;
}
.memory-scene .realm small {
  display: block;
  font-size: 12px;
  margin-top: 12px;
  opacity: 0.7;
}
.memory-scene .realm-stars {
  clip-path: polygon(0 0, 100% 0, 100% 31%, 66% 38%, 45% 37%, 23% 30%, 0 38%);
  background: radial-gradient(ellipse at top, #e9e6ef, #efedf2) !important;
}
.memory-scene .realm-stars span {
  position: absolute;
  top: 14%;
  left: 30%;
}
.memory-scene .realm-sky {
  clip-path: polygon(
    0 39%,
    23% 31%,
    44% 39%,
    43% 53%,
    57% 71%,
    50% 100%,
    0 100%
  );
  background: linear-gradient(120deg, #e3edf1, #eaf1f4) !important;
  color: #254563 !important;
}
.memory-scene .realm-sky span {
  position: absolute;
  top: 62%;
  left: 8%;
}
.memory-scene .realm-sea {
  clip-path: polygon(
    46% 40%,
    67% 40%,
    100% 33%,
    100% 100%,
    53% 100%,
    60% 71%,
    47% 52%
  );
  background: linear-gradient(140deg, #e0eae7, #edf2ef) !important;
}
.memory-scene .realm-sea span {
  position: absolute;
  top: 65%;
  right: 6%;
}
.memory-river {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.memory-river path {
  fill: none;
  stroke: #ceeaf5b3;
  stroke-width: 1.5;
  stroke-dasharray: 5 2;
  animation: river-flow 20s linear infinite;
}
.memory-anchors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 26px 0;
}
.memory-anchor {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #e5c883 !important;
  min-height: 110px;
}
.memory-anchor > span {
  font-size: 48px;
  text-shadow: 0 0 25px #ecd48760;
}
.memory-anchor.moon > span {
  font-size: 68px;
  color: #e6ecff;
}
.memory-anchor small {
  font-size: 12px;
  color: #c2cee4;
}
.memory-legend {
  font-size: 11px;
  text-align: center;
  opacity: 0.75;
  margin: 16px 0 32px;
}
.memory-lights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 14px;
  min-height: 250px;
}
.memory-light {
  font-size: 28px !important;
  align-self: start;
  transform: translateY(var(--light-shift));
  text-shadow: 0 0 18px currentColor;
}
.memory-light.gold {
  color: #dfbd70;
}
.memory-light.purple {
  color: #ba9adf;
}
.memory-light.mint {
  color: #2b978b;
}
.memory-light.rose {
  color: #b46b93;
}
.memory-empty {
  grid-column: 1/-1;
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
  align-self: center;
}
.memory-card-mask {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #393d4238;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.memory-card {
  width: min(600px, 100%);
  max-height: 85dvh;
  overflow: auto;
  box-sizing: border-box;
  padding: 20px 24px;
  border: 0;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 50px #393d421c;
  animation: memory-enter 0.18s ease both;
}
.memory-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.memory-card h2 {
  font-size: 16px;
  margin: 0;
  overflow-wrap: anywhere;
}
.memory-card [data-status] {
  font-size: 12px;
  color: #ccb674;
  min-height: 16px;
}
.memory-text {
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 15px;
  min-height: 90px;
  padding: 18px 0;
  overflow-wrap: anywhere;
  cursor: text;
}
.memory-card label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  margin: 12px 0;
}
.memory-card input,
.memory-card textarea,
.memory-card select {
  border: 0;
  background: transparent;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 0;
  font: inherit;
  outline-offset: 4px;
}
.memory-card textarea {
  min-height: 160px;
  font-size: 15px;
  line-height: 1.9;
  resize: vertical;
}
.memory-card select {
  background: var(--paper);
}
.memory-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.memory-card summary {
  list-style: none;
  padding: 10px;
  cursor: pointer;
}
.memory-policy {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 0 !important;
}
.memory-policy span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #555c70;
}
.memory-policy.policy-recall span {
  background: #d7c596;
  box-shadow: 0 0 10px #dbbc7255;
}
.memory-policy.policy-always span {
  background: #bd8e37;
  box-shadow: 0 0 14px #e4b45c80;
}
.memory-policy small,
.memory-append,
.memory-revision {
  font-size: 11px;
  opacity: 0.75;
  line-height: 1.7;
}
.ocean-nav,
.ocean-paging,
.person-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ocean-nav [aria-pressed="true"] {
  color: #e6c77e;
}
.ocean-graph {
  height: min(68dvh, 650px);
  min-height: 360px;
  position: relative;
}
.ocean-graph svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ocean-graph line {
  stroke: #9ba9a0;
  stroke-width: 0.25;
}
.ocean-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #e0e8e5;
  border-radius: 50%;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  font-size: 12px;
  text-align: center;
}
.ocean-person {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 11px !important;
  max-width: 88px;
  overflow-wrap: anywhere;
  background: var(--paper) !important;
  border-radius: 50%;
  min-width: 44px;
  min-height: 44px;
}
.ocean-list {
  height: auto;
  display: grid;
  gap: 8px;
}
.ocean-person-row {
  text-align: left;
}
.ocean-event {
  display: block;
  text-align: left;
  white-space: pre-wrap;
  font-size: 13px !important;
  line-height: 1.7;
  width: 100%;
}
.memory-card [data-person-view] p small {
  display: block;
  opacity: 0.65;
  font-size: 11px;
}
.memory-card [data-person-view] p span {
  display: block;
  margin-top: 5px;
  line-height: 1.8;
  white-space: pre-wrap;
}
@keyframes memory-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes river-flow {
  to {
    stroke-dashoffset: -70;
  }
}

.memory-scene {
  z-index: 40;
  max-width: 760px;
  margin: auto;
  background: var(--paper);
}
.memory-scene > header {
  height: 50px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
  grid-template-columns: 90px 1fr 112px;
  padding: 4px 12px;
}
.memory-scene > header > :last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.memory-header-tools button {
  padding: 6px;
}
.memory-scene h1 {
  margin: 0;
  font-weight: 400;
  font-size: 18px;
}
.memory-scene main {
  max-width: 680px;
}
.memory-card {
  border-radius: 8px 5px 7px 11px;
  border: 0;
}
.memory-card button {
  background: transparent;
  border: 0;
  padding: 8px;
}
.memory-card input,
.memory-card textarea,
.memory-card select {
  border-bottom: 1px solid var(--rule);
}
.memory-card textarea {
  background: repeating-linear-gradient(
    transparent 0 28px,
    #393d4208 29px 30px
  );
}
.memory-search {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  max-width: 680px;
  margin: auto;
}
.memory-search[hidden] {
  display: none;
}
.memory-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
}
.memory-anchor {
  color: #a58b4f !important;
}
.memory-anchor small {
  color: var(--muted);
}
.memory-anchor.moon > span {
  color: #7e8b9c;
}
.memory-disabled-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.memory-policy.policy-manual span {
  background: #afb0aa;
}
.memory-scene .home-icon {
  width: 32px;
  height: 32px;
  padding: 3px;
}
.memory-scene .home-icon svg {
  width: 26px;
  height: 26px;
}
@media (prefers-reduced-motion: reduce) {
  .memory-scene *,
  .memory-card-mask * {
    animation: none !important;
    transition: none !important;
  }
}
html[data-reduced="true"] .memory-scene *,
html[data-reduced="true"] .memory-card-mask * {
  animation: none !important;
  transition: none !important;
}
/* Ocean: quiet scatter, never a tree, orbit or labelled ball graph. */
.relationship-stars {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 48% 44% 10px 10px / 12% 14% 10px 10px;
  background: radial-gradient(
    ellipse at 48% 38%,
    #28354a,
    #1b2537 65%,
    #192333
  );
  touch-action: pan-y;
  min-height: 420px;
  height: min(68dvh, 650px);
}
.relationship-stars .star-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: #d9dedb;
  opacity: 0.35;
  pointer-events: none;
}
.relationship-stars .relationship-center {
  position: absolute;
  left: 50%;
  top: 49%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  fill: #e2c67d;
  stroke: #cbb274;
  stroke-width: 1;
  filter: drop-shadow(0 0 9px #dfc78344);
  animation: relationship-breathe 5s ease-in-out infinite;
  pointer-events: none;
}
.relationship-stars[data-owner="USER"] .relationship-center {
  fill: #a7bc99;
  stroke: #91a686;
  filter: drop-shadow(0 0 9px #a7bc9944);
}
.relationship-center .pencil-echo {
  fill: none;
  stroke: #fff8;
  stroke-width: 0.5;
}
.relationship-stars .relationship-person {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  isolation: isolate;
}
.relationship-person span {
  width: var(--point-size);
  height: var(--point-size);
  background: #deded4;
  border-radius: 45% 55% 48% 52%;
  box-shadow: 0 0 7px 2px #e2d9bc36;
  animation: relationship-glimmer 7s ease-in-out infinite;
  animation-delay: var(--point-delay);
}
.relationship-person.selected span,
.relationship-person:focus-visible span {
  background: #f1d58d;
  box-shadow: 0 0 12px 4px #e2c67d66;
  outline: 1px solid #e8cf9b;
  outline-offset: 5px;
}
.relationship-stars .memory-empty {
  position: absolute;
  bottom: 12%;
  left: 10%;
  right: 10%;
  font-size: 12px;
  color: #d2d6d5;
  text-align: center;
}
.memory-card--person header {
  justify-content: center;
}
.memory-card--person h2 {
  font-size: 18px;
  text-align: center;
}
.memory-card--plain {
  width: min(520px, calc(100vw - 40px));
  height: min(58dvh, 480px);
  max-height: min(58dvh, 480px);
  overflow: auto;
  border-radius: 8px 5px 7px 11px;
  padding: 22px 24px;
}
.memory-card--plain [data-status]:empty {
  display: none;
}
.memory-card--plain .memory-text,
.memory-card--plain .memory-append,
.memory-card--plain textarea {
  font-size: var(--chat-font, 16px);
  line-height: 1.8;
  background: none;
  border: 0;
  overflow-wrap: anywhere;
}
.memory-card--plain textarea {
  min-height: 100px;
  resize: none;
  padding: 8px 0;
  field-sizing: content;
  max-height: none;
  display: block;
}
.memory-card--plain .memory-text {
  padding: 0;
  min-height: 0;
}
.memory-card--plain [data-card-body] {
  min-height: 0;
}
.anchor-editor {
  margin: 0;
}
.star-save {
  position: relative;
  height: 44px;
  margin: 20px 16px 0;
  touch-action: none;
  cursor: grab;
  outline-offset: 8px;
}
.save-track,
.save-trace {
  position: absolute;
  top: 21px;
  right: 0;
  width: 100%;
  height: 0;
  border-top: 1px dashed #a6a69d;
}
.save-trace {
  width: calc(var(--save-progress, 0) * 100%);
  border-top: 1.5px solid #bca157;
}
.save-star {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  font-size: 25px;
  color: #aaa99e;
  line-height: 1.2;
  transition:
    color 0.2s,
    text-shadow 0.2s;
}
.save-star.lit {
  color: #ba9942;
  text-shadow: 0 0 8px #dbc57566;
}
.save-handle {
  position: absolute;
  left: calc((1 - var(--save-progress, 0)) * 100%);
  top: 1px;
  width: 38px;
  height: 38px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border: 1px dashed #a6a69d;
  border-radius: 48% 52% 49% 47%;
  font-size: 26px;
  color: #af934b;
  background: var(--paper);
}
.save-caption {
  display: block;
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  margin-top: 8px;
}
@keyframes relationship-breathe {
  50% {
    opacity: 0.8;
  }
}
@keyframes relationship-glimmer {
  50% {
    opacity: 0.5;
    transform: translateY(-2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .relationship-stars * {
    animation: none !important;
  }
}
html[data-reduced="true"] .relationship-stars * {
  animation: none !important;
}
.star-save[aria-valuenow="0"] .save-handle {
  color: #aaa99e;
}
.memory-text {
  touch-action: manipulation;
}
/* Two paper pages move together, with a strict halfway commit threshold. */
.ocean-carousel{position:relative;width:100%;overflow:hidden;touch-action:pan-y;margin:auto;max-width:640px}
.ocean-strip{display:flex;width:200%;will-change:transform}
.ocean-strip>.relationship-stars{width:50%;flex:0 0 50%;max-width:none;margin:0}
.relationship-stars{background:none;border-radius:0;min-height:360px;height:min(64dvh,600px)}
.relationship-stars .star-dust{fill:#858a8b;opacity:.3}
.relationship-person span{background:#8f9693;box-shadow:0 0 7px 2px #b7bca82b}
.relationship-person.selected span,.relationship-person:focus-visible span{background:#baa05e;box-shadow:0 0 10px 3px #ceb77544;outline-color:#baa05e}
.relationship-stars .memory-empty{color:var(--muted)}
.memory-scene[data-zone=sea] [data-world]{display:flex;flex-direction:column;justify-content:center;min-height:calc(100dvh - 105px)}
@media(prefers-reduced-motion:reduce){.ocean-strip{transition:none!important}}
.memory-history-tools{display:flex;justify-content:center;gap:20px;padding:10px;font-size:12px}
.memory-history-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--thought-font,12.5px);line-height:1.75}
/* Phase 2 settings reuse paper typography; no system-font-only CJK fallback in small notes. */
.memory-settings-page .fineprint,
.memory-retrieval-form .fineprint,
.memory-retrieval-form ~ .fineprint { font-family: inherit; }
.memory-settings-page input,
.memory-retrieval-form input { max-width: 100%; box-sizing: border-box; }
.memory-settings-overview { padding: 0 0 14px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.memory-settings-overview .recall-formal-mode { font-size: 1rem; font-weight: 500; }
.memory-settings-section { padding: 14px 0 18px; border-bottom: 1px solid var(--rule); display: grid; gap: 10px; }
.memory-section-title { font-size: 1rem; font-weight: 500; margin: 0; }
.memory-section-sub { margin: 0; }
.memory-settings-page .form { gap: 14px; }
.memory-settings-page .form label { margin: 0; }
.memory-settings-page .form label.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.memory-toggle-item { padding: 4px 0 8px; border-bottom: 1px dashed #b5b1a64d; display: grid; gap: 2px; }
.memory-toggle-item:last-of-type { border-bottom: 0; padding-bottom: 4px; }
.memory-toggle-item .fineprint { margin: 0; }
.memory-settings-page .memory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 2px; }
.memory-settings-page .memory-actions button { min-height: 44px; flex: 0 0 auto; }
.memory-settings-page .memory-actions .primary { padding: 10px 18px; }
.memory-settings-page .memory-actions .quiet { padding: 10px 4px; }
.memory-sub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.memory-sub-actions button { min-height: 44px; padding-left: 0; }
.memory-settings-page .paper-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.memory-settings-page .paper-fold > summary::after { content: '›'; color: var(--muted); font-size: 1.1em; line-height: 1; transition: transform .18s ease; flex: none; }
.memory-settings-page .paper-fold[open] > summary::after { transform: rotate(90deg); }
.memory-settings-page .paper-fold-body { display: grid; gap: 12px; padding: 6px 0 12px; }
.memory-reviewer-recent { display: grid; gap: 8px; }
.memory-run-item { padding: 6px 0 8px; border-bottom: 1px dashed #b5b1a655; display: grid; gap: 4px; }
.memory-run-item:last-child { border-bottom: 0; }
.memory-run-item .paper-fold { border-bottom: 0; padding: 0; }
.memory-danger-fold,
.memory-check-settings,
.memory-run-fold:last-child,
.memory-settings-page .paper-fold-body > .paper-fold:last-child { border-bottom: 0; }
.memory-check-form .recall-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.memory-check-summary { margin: 2px 0 0; }
@media (max-width: 370px) { .memory-check-form .recall-limits { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .memory-settings-page .paper-fold > summary::after { transition: none; } }
/* Stable paper skies: anchors retain their four established positions. */
.memory-lights{display:block;position:relative;min-height:420px;height:420px;margin:0 auto;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 35% 30%,#dae6f333,transparent 65%)}
.memory-lights .memory-light{position:absolute;display:grid;place-items:center;width:48px;height:48px;padding:0;transform:translate(-50%,-50%);text-shadow:0 0 10px #d8c48366;transition:color .18s,opacity .18s;font-size:27px!important}
.memory-lights .memory-light.selected{color:var(--ink);text-shadow:0 0 12px #ceb475aa}
.memory-relations{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.memory-relations line{stroke:#9f9bad;stroke-width:.28;opacity:.22;transition:opacity .18s;vector-effect:non-scaling-stroke}
.memory-relations line.selected{opacity:.85;stroke:#b59a5e;stroke-width:1.2}
.memory-star-navigation{display:flex;justify-content:space-between;min-height:20px}.memory-star-list{border-top:1px solid #9993;padding:8px 0}.memory-star-list summary{padding:12px;cursor:pointer}.memory-star-list button{display:block;width:100%;text-align:left;overflow-wrap:anywhere;min-height:44px}
.memory-relation-form input:not([type=radio]):not([type=checkbox]),.memory-relation-form textarea{width:100%;max-width:100%;box-sizing:border-box}.memory-relation-form details{max-height:240px;overflow:auto}.memory-relation-form label{display:block;padding:8px 0}.memory-relation-form input[type=radio],.memory-relation-form input[type=checkbox]{width:auto;min-height:24px}.memory-relation-form summary{padding:12px 0}.memory-anchor small{color:var(--ink)}
.memory-lights .memory-empty{position:absolute;inset:35% 12%;text-align:center}
@media(prefers-reduced-motion:reduce){.memory-relations line,.memory-lights .memory-light{transition:none}}
/* Keep the floating pet behind full memory interaction surfaces; its setting is unchanged. */
body:has(.memory-scene,.memory-lake,.memory-todo-stars) #floatingSpark{visibility:hidden;pointer-events:none}
[data-relations] .memory-card-actions small{display:block;color:var(--muted,var(--ink));font-size:12px;line-height:1.6;padding:0 10px 10px;overflow-wrap:anywhere}
/* Checkup issues are a separate, quiet paper star field, never lake review proposals. */
.memory-check-settings{margin-top:20px}.memory-check-form{min-width:0}.memory-check-form input{box-sizing:border-box;max-width:100%}
.memory-todo-stars{position:relative;height:380px;margin:8px 0;background:radial-gradient(ellipse at center,#f1eee580,transparent 70%);border-radius:34% 40% 32% 38%}
.memory-todo-star{position:absolute;transform:translate(-50%,-50%);width:48px;height:48px;border:0!important;background:none!important;color:#467ba5;font-size:28px;cursor:pointer;padding:0!important}
.memory-todo-star.is-done{color:#bd911f;text-shadow:0 0 5px #e4bf5c55}
.memory-todo-star:active{transform:translate(-50%,-50%) scale(.97)}
.memory-todo-star:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.memory-todo-mask{position:fixed;inset:0;z-index:900;background:#383a372b;backdrop-filter:blur(5px);display:flex;justify-content:center;align-items:center;padding:24px 20px}.memory-todo-card{max-width:480px!important;width:100%;max-height:85dvh;overflow:auto;box-sizing:border-box;background:var(--paper)!important;color:var(--ink);animation:memory-enter .18s ease both}.memory-todo-card h2{font-size:17px;font-weight:400}.memory-todo-card textarea,.memory-todo-card input{width:100%;box-sizing:border-box;max-width:100%}.memory-todo-card button{min-height:44px;background:none;border:0;color:inherit;font:inherit;cursor:pointer}.memory-todo-card small{color:var(--muted)}.memory-todo-reference{padding:10px 0;border-bottom:1px solid var(--line,#bbb8aa)}.memory-todo-evidence{line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.memory-todo-actions{display:grid;grid-template-columns:1fr 1fr;gap:4px}.memory-todo-card:focus{outline:none}.memory-todo-card :focus-visible{outline:2px solid var(--ink);outline-offset:2px}
@media(prefers-reduced-motion:reduce){.memory-todo-card{animation:none!important}}
.memory-check-settings .fineprint,[data-memory-todos] .fineprint{font-family:inherit}

.memory-check-schedule{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:.25rem 1rem;margin-block-end:1rem}
.memory-check-next{margin:0;font-size:1.05rem}
.memory-sample-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding-block:.65rem}
.memory-sample-row strong,.memory-sample-row small{display:block}
.memory-sample-row strong{font-weight:500}
.memory-sample-row small{color:var(--muted);margin-block-start:.2rem;line-height:1.5}
.memory-sample-count{display:flex;align-items:center;gap:.4rem}
.memory-sample-count input[type=number]{inline-size:3.5rem;text-align:center}
.memory-todo-card h2{overflow-wrap:anywhere}
.memory-check-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:1rem 2rem;margin:0 0 1.5rem;padding:1rem 0;border-block-end:1px solid var(--line)}
.memory-check-summary dt{font-size:.8rem;color:var(--muted)}
.memory-check-summary dd{margin:.25rem 0 0;color:var(--ink);overflow-wrap:anywhere}
.memory-check-form .recall-limits{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));gap:1rem}
.memory-check-form .memory-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.memory-check-form .memory-actions button,.memory-run-fold>summary{min-height:44px}
.memory-todo-reference p{margin-block:.25rem;overflow-wrap:anywhere}
.memory-todo-card .memory-todo-reference button{display:block;margin-inline-start:auto;text-decoration:underline;text-underline-offset:.25em}
/* Runtime Sky graph; deliberately isolated from Stars, Sea, Lake and todo scenes. */
.memory-scene[data-zone="sky"]{color:var(--ink)}
.memory-scene[data-zone="sky"] .sky-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;font-size:12px;color:var(--muted)}
.memory-scene[data-zone="sky"] .sky-gold{color:#9c7a2f}.memory-scene[data-zone="sky"] .sky-mint{color:#28695f}.memory-scene[data-zone="sky"] .sky-rose{color:#86496a}
.memory-scene[data-zone="sky"] .sky-stage{position:relative;height:clamp(380px,65dvh,760px);border-radius:35% 25% 32% 28%;background:radial-gradient(ellipse at 40% 30%,rgba(227,237,241,.65),transparent 75%)}
.memory-scene[data-zone="sky"] .sky-graph-host{position:absolute;inset:0}
.memory-scene[data-zone="sky"] .sky-graph-canvas{display:block;touch-action:none;cursor:grab;outline-offset:-4px}
.memory-scene[data-zone="sky"] .sky-graph-canvas.is-panning{cursor:grabbing}
.memory-scene[data-zone="sky"] .sky-zoom{position:absolute;right:0;bottom:30px;display:flex;gap:3px;background:var(--paper);border:1px solid var(--line,#d8d7ce);border-radius:14px 11px}
.memory-scene[data-zone="sky"] .sky-zoom button{min-width:44px;min-height:44px;font-size:14px}
.memory-scene[data-zone="sky"] .sky-count{position:absolute;bottom:0;left:0;width:100%;text-align:center;font-size:11px;pointer-events:none;color:var(--muted)}
.memory-scene[data-zone="sky"] .sky-empty{position:absolute;inset:40% 0 auto;text-align:center;pointer-events:none;font-size:14px}
.memory-scene[data-zone="sky"] .sky-search-count{text-align:center;font-size:12px;min-height:18px}
.memory-scene[data-zone="sky"] .sky-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.memory-scene[data-zone="sky"] .sky-card-mask{align-items:end;padding:0;background:rgba(57,61,66,.12)}
.memory-scene[data-zone="sky"] .memory-card{width:100%;max-height:76dvh;border-radius:18px 22px 0 0;padding:18px 22px calc(22px + env(safe-area-inset-bottom));animation:sky-card-open .2s ease-out;overflow:auto;overscroll-behavior:contain}
.memory-scene[data-zone="sky"] .memory-card h2{overflow-wrap:anywhere;font-size:19px;font-weight:400;line-height:1.5}
.memory-scene[data-zone="sky"] .sky-paper-card header h2::before{content:'●';font-size:12px;margin-right:10px;color:#d4ab55}
.memory-scene[data-zone="sky"] .sky-paper-card[data-section="AI_OPINIONS"] header h2::before{color:#3f9d90}
.memory-scene[data-zone="sky"] .sky-paper-card[data-section="USER_OPINIONS"] header h2::before{color:#bb7398}
.memory-scene[data-zone="sky"] .sky-card-meta{font-size:12px;color:var(--muted);margin:0 0 12px}
.memory-scene[data-zone="sky"] .memory-text{font-size:16px;line-height:1.9;overflow-wrap:anywhere}
.memory-scene[data-zone="sky"] .sky-primary{display:flex;gap:10px;margin:14px 0}
.memory-scene[data-zone="sky"] .sky-primary button{flex:1;border:1px solid var(--line,#d8d7ce);border-radius:12px 10px 13px 9px;min-height:44px}
.memory-scene[data-zone="sky"] .sky-card-section{margin-top:16px;border-top:1px solid var(--line,#d8d7ce);padding-top:12px;font-size:13px}
.memory-scene[data-zone="sky"] .sky-card-section h3,.memory-scene[data-zone="sky"] .sky-card-section summary{font-size:14px;font-weight:400;cursor:pointer}
.memory-scene[data-zone="sky"] .sky-policy-options{display:flex;border:1px solid var(--line,#d8d7ce);border-radius:12px;margin-top:10px}
.memory-scene[data-zone="sky"] .sky-policy-options button{flex:1;min-height:44px}.memory-scene[data-zone="sky"] .sky-policy-options [aria-pressed="true"]{background:var(--sage-light,#e2e9de);border-radius:10px}
.memory-scene[data-zone="sky"] .sky-card-danger{border-top:1px dashed var(--line,#d8d7ce);margin-top:24px;padding-top:12px;color:#9a5e5c}
.memory-scene[data-zone="sky"] [hidden]{display:none!important}
@keyframes sky-card-open{from{transform:translateY(16px);opacity:0}to{transform:none;opacity:1}}
@media(min-width:720px){.memory-scene[data-zone="sky"] .sky-card-mask{justify-items:end;align-items:stretch;padding:12px}.memory-scene[data-zone="sky"] .memory-card{width:420px;max-height:calc(100dvh - 24px);border-radius:12px 16px 14px 18px}}
@media(prefers-reduced-motion:reduce){.memory-scene[data-zone="sky"] .memory-card{animation:none}}
/* Human-first recall: one quiet selection row and one independent comparison switch. */
.memory-recall-simple > .paper-choice > summary,
.memory-recall-simple > .memory-shadow-row { min-height: 52px; border-bottom: 1px solid var(--rule); }
.memory-recall-simple > .memory-shadow-row { padding: 4px 0 12px; }
.memory-recall-simple .memory-run-item { min-width: 0; overflow-wrap: anywhere; }
.memory-recall-simple .recall-diagnostics { max-height: 55dvh; overflow-y: auto; overscroll-behavior: contain; }
