.memory-detail-panels {
  width: 100%;
}

.memory-detail-panel#memoryDetailPanelPlot,
.memory-detail-panel#memoryDetailPanelCore,
.memory-detail-panel#memoryDetailPanelGrowth,
.memory-detail-panel#memoryDetailPanelSettings {
  display: block;
  min-height: 184px;
  padding: 0;
  border: 0;
  text-align: left;
}

.memory-detail-panel#memoryDetailPanelPlot[hidden],
.memory-detail-panel#memoryDetailPanelCore[hidden],
.memory-detail-panel#memoryDetailPanelGrowth[hidden],
.memory-detail-panel#memoryDetailPanelSettings[hidden],
.memory-auto-fields[hidden],
.memory-panel-empty[hidden],
.memory-summary-status[hidden],
.memory-requirement-dialog-status[hidden] {
  display: none;
}

.memory-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.memory-panel-heading,
.memory-settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.memory-panel-heading {
  min-height: 58px;
  padding: 9px 2px 10px;
  border-top: 3px double var(--memory-border);
  border-bottom: 1px solid color-mix(in srgb, var(--memory-border) 62%, transparent);
}

.memory-panel-heading div,
.memory-settings-heading div {
  min-width: 0;
}

.memory-panel-heading span,
.memory-settings-heading div > span {
  display: block;
  margin-bottom: 3px;
  color: var(--memory-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.memory-panel-heading h2,
.memory-settings-heading h2 {
  margin: 0;
  color: var(--memory-ink);
  font-family: "Songti SC", SimSun, STSong, serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.memory-panel-heading output,
.memory-settings-heading output {
  flex: 0 0 auto;
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.memory-panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.memory-plot-add {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--memory-ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.memory-plot-add span {
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.memory-plot-add:focus-visible {
  outline: 0;
  color: var(--memory-muted);
  transform: scale(1.12);
}

.memory-plot-list,
.memory-core-list,
.memory-growth-list {
  display: grid;
  gap: 24px;
  padding: 20px 6px 10px;
}

.memory-plot-scene {
  position: relative;
  width: 100%;
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
  isolation: isolate;
}

.memory-plot-scene .memory-paper-layer {
  top: -7px;
  right: -4px;
  bottom: 6px;
  left: -3px;
  transform: rotate(-.8deg);
}

.memory-plot-scene .memory-ticket-wrapper {
  z-index: 1;
}

.memory-plot-ticket,
.memory-core-ticket {
  --memory-plot-divider: 31%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(92px, var(--memory-plot-divider)) minmax(0, 1fr);
  width: 100%;
  min-height: 226px;
  padding: 10px;
  overflow: hidden;
  color: var(--memory-ink);
  background: var(--memory-ticket);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .70),
    inset 0 -1px 0 rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(17px) saturate(100%);
  backdrop-filter: blur(17px) saturate(100%);
  -webkit-mask-image:
    radial-gradient(circle at 0 50%, transparent 5px, #000 5.5px),
    radial-gradient(circle at 100% 50%, transparent 5px, #000 5.5px),
    radial-gradient(circle at var(--memory-plot-divider) 0, transparent 10px, #000 10.5px),
    radial-gradient(circle at var(--memory-plot-divider) 100%, transparent 10px, #000 10.5px);
  -webkit-mask-size: 100% 26px, 100% 26px, 100% 100%, 100% 100%;
  -webkit-mask-repeat: repeat-y, repeat-y, no-repeat, no-repeat;
  -webkit-mask-composite: source-in, source-in, source-in;
  mask-image:
    radial-gradient(circle at 0 50%, transparent 5px, #000 5.5px),
    radial-gradient(circle at 100% 50%, transparent 5px, #000 5.5px),
    radial-gradient(circle at var(--memory-plot-divider) 0, transparent 10px, #000 10.5px),
    radial-gradient(circle at var(--memory-plot-divider) 100%, transparent 10px, #000 10.5px);
  mask-size: 100% 26px, 100% 26px, 100% 100%, 100% 100%;
  mask-repeat: repeat-y, repeat-y, no-repeat, no-repeat;
  mask-composite: intersect;
}

.memory-plot-divider,
.memory-core-divider {
  left: var(--memory-plot-divider);
}

.memory-plot-stub {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px 10px 9px;
  background: color-mix(in srgb, var(--memory-layer) 76%, transparent);
}

.memory-plot-stub > time:first-child {
  display: grid;
  gap: 1px;
  color: var(--memory-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-style: normal;
}

.memory-plot-stub > time:first-child strong {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.memory-plot-stub > time:first-child span {
  color: var(--memory-muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.memory-plot-stub > time:nth-child(2) {
  display: block;
  margin-top: 5px;
  color: var(--memory-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.memory-plot-importance {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 18px;
}

.memory-plot-importance > span:first-child,
.memory-plot-emotion > span {
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.memory-plot-stars {
  overflow: hidden;
  color: var(--memory-ink);
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.memory-plot-emotion {
  display: grid;
  gap: 4px;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--memory-border) 42%, transparent);
}

.memory-plot-emotion strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--memory-ink);
  font-family: "Songti SC", SimSun, serif;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.memory-plot-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 8px 9px 13px;
}

.memory-plot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid color-mix(in srgb, var(--memory-border) 42%, transparent);
  color: var(--memory-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
}

.memory-plot-meta-copy {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-plot-source::before {
  content: "·";
  margin-right: 5px;
}

.memory-plot-edit {
  flex: 0 0 auto;
  padding: 2px 0 2px 8px;
  color: var(--memory-ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
}

.memory-plot-edit:focus-visible {
  outline: 1px solid var(--memory-ink);
  outline-offset: 2px;
}

.memory-plot-body > p {
  margin: 14px 0 16px;
  overflow-wrap: anywhere;
  color: var(--memory-ink);
  font-family: "Songti SC", SimSun, STSong, serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
  white-space: pre-wrap;
}

.memory-plot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin: auto 0 0;
  padding: 11px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--memory-border) 42%, transparent);
  list-style: none;
}

.memory-plot-tags:empty {
  display: none;
}

.memory-plot-tags li {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
}

.memory-core-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 18px 16px 18px 20px;
}

.memory-core-body > p {
  width: 100%;
  margin: 0;
  padding-top: 18px;
  overflow-wrap: anywhere;
  color: var(--memory-ink);
  font-family: "Songti SC", SimSun, STSong, serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.85;
  white-space: pre-wrap;
}

.memory-core-status {
  position: absolute;
  top: 12px;
  right: 54px;
  left: 20px;
  overflow: hidden;
  color: var(--memory-muted);
  border-bottom: 1px solid color-mix(in srgb, var(--memory-border) 58%, transparent);
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-core-ticket[data-status="superseded"],
.memory-core-ticket[data-status="archived"] {
  opacity: .76;
}

.memory-core-ticket[data-status="superseded"] .memory-core-status,
.memory-core-ticket[data-status="archived"] .memory-core-status {
  color: #7a4545;
}

.memory-core-importance {
  padding-bottom: 10px;
}

.memory-core-edit {
  position: absolute;
  top: 12px;
  right: 13px;
  padding: 2px 0 2px 8px;
  color: var(--memory-ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
}

.memory-core-edit:focus-visible {
  outline: 1px solid var(--memory-ink);
  outline-offset: 2px;
}

.memory-panel-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 184px;
  padding: 42px 16px;
  border-bottom: 3px double var(--memory-border);
  color: var(--memory-muted);
  text-align: center;
}

.memory-panel-empty > span {
  color: var(--memory-faint);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.memory-panel-empty strong {
  color: var(--memory-ink);
  font-family: "Songti SC", SimSun, serif;
  font-size: 14px;
}

.memory-panel-empty small {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8px;
  font-weight: 700;
}

.memory-summary-settings {
  display: grid;
  width: 100%;
  border-top: 3px double var(--memory-border);
}

.memory-settings-section {
  display: grid;
  gap: 16px;
  padding: 20px 2px 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--memory-border) 58%, transparent);
}

.memory-settings-section:last-of-type {
  border-bottom: 3px double var(--memory-border);
}

.memory-settings-heading {
  min-height: 32px;
}

.memory-settings-heading h2 {
  font-size: 15px;
}

.memory-switch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 2px;
  color: var(--memory-muted);
  border-top: 1px solid color-mix(in srgb, var(--memory-border) 38%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--memory-border) 38%, transparent);
  cursor: pointer;
}

.memory-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.memory-switch > span {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: 34px;
  height: 18px;
  border: 1px solid var(--memory-border);
  background: transparent;
  transition: background-color .16s ease;
}

.memory-switch > span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: var(--memory-muted);
  transition: left .16s ease, background-color .16s ease;
}

.memory-switch input:checked + span {
  background: var(--memory-tab-active);
}

.memory-switch input:checked + span::after {
  left: 18px;
  background: var(--memory-tab-active-ink);
}

.memory-switch input:focus-visible + span {
  outline: 1px solid var(--memory-ink);
  outline-offset: 3px;
}

.memory-switch b {
  grid-column: 1;
  grid-row: 1;
  color: var(--memory-ink);
  font-family: "Songti SC", SimSun, serif;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.memory-auto-fields {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--memory-border) 38%, transparent);
}

.memory-inline-field,
.memory-manual-row label,
.memory-length-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.memory-auto-fields output {
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  font-weight: 650;
  text-align: right;
}

.memory-summary-settings input[type="number"],
.memory-requirement-dialog textarea {
  color: var(--memory-ink);
  border: 1px solid color-mix(in srgb, var(--memory-border) 72%, transparent);
  border-radius: 0;
  background: color-mix(in srgb, var(--memory-ticket) 62%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 650;
}

.memory-summary-settings input[type="number"] {
  width: 64px;
  height: 34px;
  padding: 0 7px;
  font-size: 12px;
  text-align: center;
}

.memory-summary-settings input:focus-visible,
.memory-requirement-dialog textarea:focus-visible {
  outline: 1px solid var(--memory-ink);
  outline-offset: 2px;
}

.memory-summary-settings input:disabled {
  opacity: .45;
}

.memory-manual-row,
.memory-length-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

.memory-manual-row > span,
.memory-length-row > span {
  flex: 0 0 auto;
  color: var(--memory-faint);
  font-family: "Songti SC", SimSun, serif;
  font-size: 10px;
}

.memory-summary-now {
  width: 100%;
  height: 42px;
  padding: 0 18px;
  color: var(--memory-tab-active-ink);
  border: 1px solid var(--memory-tab-active);
  border-radius: 0;
  background: var(--memory-tab-active);
  font-family: "Songti SC", SimSun, serif;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: opacity .16s ease, transform .12s ease;
}

.memory-summary-now:active:not(:disabled) {
  transform: scale(.99);
}

.memory-summary-now:focus-visible {
  outline: 1px solid var(--memory-ink);
  outline-offset: 3px;
}

.memory-summary-now:disabled {
  cursor: default;
  opacity: .42;
}

.memory-last-summary {
  margin: -5px 0 0;
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}

.memory-requirement-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 3px;
  color: var(--memory-ink);
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--memory-border) 38%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--memory-border) 38%, transparent);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.memory-requirement-entry > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.memory-requirement-entry strong {
  font-family: "Songti SC", SimSun, serif;
  font-size: 12px;
  font-weight: 750;
}

.memory-requirement-entry small {
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  font-weight: 650;
}

.memory-requirement-entry i {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-top: 1px solid var(--memory-muted);
  border-right: 1px solid var(--memory-muted);
  transform: rotate(45deg);
}

.memory-requirement-entry:focus-visible {
  outline: 1px solid var(--memory-ink);
  outline-offset: 3px;
}

.memory-requirement-dialog {
  position: absolute;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--memory-paper) 74%, transparent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: none;
}

.memory-requirement-dialog.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.memory-requirement-dialog-card {
  display: grid;
  gap: 16px;
  width: min(100%, 420px);
  max-height: min(78dvh, 620px);
  overflow-y: auto;
  padding: 18px;
  color: var(--memory-ink);
  border: 1px solid var(--memory-border);
  border-radius: 0;
  background: var(--memory-paper);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .16);
  transform: translateY(12px);
  transition: none;
}

.memory-requirement-dialog.open .memory-requirement-dialog-card {
  transform: translateY(0);
}

.memory-requirement-dialog-card header {
  padding-bottom: 12px;
  border-bottom: 3px double var(--memory-border);
}

.memory-requirement-dialog-card header span {
  display: block;
  margin-bottom: 4px;
  color: var(--memory-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.memory-requirement-dialog-card h2 {
  margin: 0;
  font-family: "Songti SC", SimSun, serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
}

.memory-requirement-dialog-card label {
  display: block;
  min-width: 0;
}

.memory-requirement-dialog textarea {
  display: block;
  width: 100%;
  min-height: 164px;
  padding: 12px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.65;
}

.memory-requirement-dialog textarea::placeholder {
  color: var(--memory-faint);
  font-weight: 500;
}

.memory-requirement-dialog-status {
  margin: -4px 0 0;
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 10px;
  line-height: 1.5;
}

.memory-requirement-dialog-status[data-tone="error"] {
  color: #722f2f;
}

.memory-requirement-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.memory-requirement-dialog-actions button {
  min-height: 42px;
  padding: 0 16px;
  color: var(--memory-ink);
  border: 1px solid var(--memory-border);
  border-radius: 0;
  background: transparent;
  font-family: "Songti SC", SimSun, serif;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.memory-requirement-dialog-actions button[type="submit"] {
  color: var(--memory-tab-active-ink);
  border-color: var(--memory-tab-active);
  background: var(--memory-tab-active);
}

.memory-requirement-dialog-actions button:focus-visible {
  outline: 1px solid var(--memory-ink);
  outline-offset: 3px;
}

.memory-editor-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.memory-editor-actions button {
  padding-inline: 10px;
}

.memory-editor-actions.is-new {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.memory-editor-actions button[hidden] {
  display: none;
}

.memory-editor-actions .memory-editor-delete {
  color: #722f2f;
  border-color: color-mix(in srgb, #722f2f 60%, var(--memory-border));
}

.memory-editor-actions .memory-editor-delete[data-armed="true"] {
  color: #fff;
  border-color: #722f2f;
  background: #722f2f;
}

.memory-plot-editor-card {
  max-height: min(88dvh, 720px);
}

.memory-plot-editor-fields {
  display: grid;
  gap: 14px;
}

.memory-plot-editor-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.memory-plot-editor-field > span,
.memory-plot-editor-importance legend {
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.memory-plot-editor-field input {
  display: block;
  width: 100%;
  height: 42px;
  min-width: 0;
  padding: 0 11px;
  color: var(--memory-ink);
  border: 1px solid color-mix(in srgb, var(--memory-border) 72%, transparent);
  border-radius: 0;
  background: color-mix(in srgb, var(--memory-ticket) 62%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 650;
}

.memory-plot-editor-field input:focus-visible {
  outline: 1px solid var(--memory-ink);
  outline-offset: 2px;
}

.memory-plot-editor-importance {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.memory-plot-editor-importance legend {
  padding: 0;
}

.memory-plot-editor-rating {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  min-height: 42px;
  border-top: 1px solid color-mix(in srgb, var(--memory-border) 72%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--memory-border) 72%, transparent);
}

.memory-plot-editor-rating label {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  cursor: pointer;
}

.memory-plot-editor-rating label + label {
  border-left: 1px solid color-mix(in srgb, var(--memory-border) 36%, transparent);
}

.memory-plot-editor-rating input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.memory-plot-editor-rating label > span {
  color: var(--memory-faint);
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1;
}

.memory-plot-editor-rating label.is-active > span {
  color: var(--memory-ink);
}


.memory-plot-editor-rating input:focus-visible + span {
  outline: 1px solid var(--memory-ink);
  outline-offset: 4px;
}

#memoryPlotEditorContent {
  min-height: 136px;
}

#memoryPlotEditorTags {
  min-height: 72px;
}

#memoryCoreEditorContent {
  min-height: 176px;
}

html.night-mode .memory-editor-actions .memory-editor-delete {
  color: #f0b4b4;
}

html.night-mode .memory-editor-actions .memory-editor-delete[data-armed="true"] {
  color: #1e1b18;
  border-color: #f0b4b4;
  background: #f0b4b4;
}

.memory-summary-status {
  margin: 14px 0 0;
  padding: 12px 10px;
  color: var(--memory-muted);
  border-bottom: 3px double var(--memory-border);
  font-family: "Songti SC", SimSun, serif;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.6;
  text-align: center;
}

.memory-summary-status[data-tone="error"] {
  color: #722f2f;
}

.memory-summary-status[data-tone="success"] {
  color: var(--memory-ink);
}

html.night-mode .memory-summary-status[data-tone="error"] {
  color: #f0b4b4;
}

html.night-mode .memory-plot-ticket,
html.night-mode .memory-core-ticket {
  box-shadow:
    0 10px 22px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .10);
}

html.night-mode .memory-summary-settings input[type="number"],
html.night-mode .memory-requirement-dialog textarea {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.memory-growth-ticket {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  color: var(--memory-ink);
  border: 1px solid color-mix(in srgb, var(--memory-border) 78%, transparent);
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 49.8%, color-mix(in srgb, var(--memory-border) 45%, transparent) 50%, transparent 50.2%),
    var(--memory-ticket);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(255, 255, 255, .24);
}

.memory-growth-ticket::before,
.memory-growth-ticket::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 48px;
  bottom: 0;
  left: 50%;
  width: 8px;
  pointer-events: none;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--memory-paper) 0 2px, transparent 2.5px) center top / 8px 12px repeat-y;
}

.memory-growth-ticket::after {
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--memory-border) 0 4px, transparent 4px 9px);
}

.memory-growth-ticket-meta {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--memory-border) 58%, transparent);
}

.memory-growth-ticket-meta-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  min-width: 0;
  color: var(--memory-muted);
  font: 700 8px/1.2 Georgia, "Times New Roman", serif;
}

.memory-growth-ticket-range {
  color: var(--memory-ink);
}

.memory-growth-ticket-source {
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--memory-border) 60%, transparent);
}

.memory-growth-ticket-meta time {
  font-family: "Songti SC", SimSun, serif;
  font-weight: 600;
}

.memory-growth-ticket-edit {
  flex: 0 0 auto;
  padding: 4px 0 4px 8px;
  color: var(--memory-muted);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: "Songti SC", SimSun, serif;
  font-size: 10px;
  cursor: pointer;
}

.memory-growth-ticket-edit:focus-visible {
  outline: 1px solid var(--memory-ink);
  outline-offset: 2px;
}

.memory-growth-ticket-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.memory-growth-ticket-pane {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 16px 13px 18px;
}

.memory-growth-ticket-pane + .memory-growth-ticket-pane {
  border-left: 1px dashed color-mix(in srgb, var(--memory-border) 52%, transparent);
}

.memory-growth-ticket-pane header {
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 3px double color-mix(in srgb, var(--memory-border) 68%, transparent);
}

.memory-growth-ticket-pane header span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.memory-growth-ticket-pane small {
  color: var(--memory-muted);
  font: 700 7px/1 Georgia, "Times New Roman", serif;
}

.memory-growth-ticket-pane h3 {
  margin: 0;
  color: var(--memory-ink);
  font: 800 12px/1.35 "Songti SC", SimSun, serif;
  overflow-wrap: anywhere;
}

.memory-growth-ticket-pane p {
  margin: 0;
  color: var(--memory-ink);
  font-family: "Songti SC", SimSun, serif;
  font-size: 11px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.memory-growth-ticket-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.memory-growth-ticket-tags li {
  max-width: 100%;
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.memory-growth-update-divider {
  height: 1px;
  margin: 4px 0 14px;
  background: color-mix(in srgb, var(--memory-border) 42%, transparent);
}

.memory-growth-manual-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.memory-growth-manual-heading strong {
  color: var(--memory-ink);
  font-family: "Songti SC", SimSun, serif;
  font-size: 12px;
}

.memory-growth-manual-heading output {
  color: var(--memory-muted);
  font-family: "Songti SC", SimSun, serif;
  font-size: 10px;
}

.memory-growth-editor-card {
  width: min(100%, 520px);
}

.memory-growth-editor-fields {
  display: grid;
  gap: 18px;
  padding-right: 2px;
}

.memory-growth-editor-fields > section {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.memory-growth-editor-fields > section + section {
  padding-top: 17px;
  border-top: 3px double var(--memory-border);
}

.memory-growth-editor-fields > section > header {
  display: grid;
  gap: 3px;
}

.memory-growth-editor-fields > section > header span {
  color: var(--memory-muted);
  font: 700 8px/1 Georgia, "Times New Roman", serif;
}

.memory-growth-editor-fields h3 {
  margin: 0;
  color: var(--memory-ink);
  font: 800 14px/1.3 "Songti SC", SimSun, serif;
}

html.night-mode .memory-growth-ticket {
  box-shadow:
    0 10px 22px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

html.night-mode .memory-growth-ticket-source {
  border-color: rgba(232, 232, 226, .32);
}

@media (min-width: 601px) {
  .memory-panel-heading {
    min-height: 64px;
  }

  .memory-panel-heading h2 {
    font-size: 18px;
  }

  .memory-plot-ticket,
  .memory-core-ticket {
    --memory-plot-divider: 30%;
    grid-template-columns: minmax(128px, var(--memory-plot-divider)) minmax(0, 1fr);
    min-height: 238px;
  }

  .memory-plot-stub {
    padding: 23px 18px 20px;
  }

  .memory-plot-stub > time:first-child strong {
    font-size: 26px;
  }

  .memory-plot-body {
    padding: 21px 22px 20px 25px;
  }

  .memory-core-body {
    padding: 22px 24px 22px 28px;
  }

  .memory-plot-body > p,
  .memory-core-body > p {
    font-size: 14px;
  }

  .memory-settings-section {
    padding-right: 4px;
    padding-left: 4px;
  }
}

@media (max-width: 360px) {
  .memory-panel-heading {
    min-height: 54px;
  }

  .memory-plot-ticket,
  .memory-core-ticket {
    --memory-plot-divider: 34%;
    grid-template-columns: minmax(88px, var(--memory-plot-divider)) minmax(0, 1fr);
    min-height: 220px;
  }

  .memory-plot-stub {
    padding: 17px 10px 15px;
  }

  .memory-plot-stub > time:first-child strong {
    font-size: 19px;
  }

  .memory-plot-stars {
    font-size: 9px;
  }

  .memory-plot-body {
    padding: 15px 11px 15px 15px;
  }

  .memory-core-body {
    padding: 16px 12px 16px 16px;
  }

  .memory-plot-body > p {
    margin-top: 11px;
  }

  .memory-plot-body > p,
  .memory-core-body > p {
    font-size: 12px;
    line-height: 1.72;
  }

  .memory-settings-section {
    gap: 14px;
  }

  .memory-settings-heading {
    gap: 9px;
  }

  .memory-auto-fields {
    align-items: flex-start;
    flex-direction: column;
  }

  .memory-auto-fields output {
    text-align: left;
  }

  .memory-manual-row,
  .memory-length-row {
    gap: 6px;
  }

  .memory-summary-settings input[type="number"] {
    width: 54px;
    padding-inline: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .memory-switch > span,
  .memory-switch > span::after,
  .memory-summary-now {
    transition: none;
  }
}
