.memory-page{min-width:0}.memory-heading,.memory-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.memory-actions{justify-content:flex-start}.memory-status{min-height:1.5em;color:var(--muted,#bac4dd)}.memory-space{position:relative;width:100%;height:clamp(460px,70vh,850px);overflow:hidden;touch-action:none;border:1px solid #848dc735;border-radius:24px;background:radial-gradient(ellipse at 30% 35%,#27264c,transparent 55%),radial-gradient(ellipse at 80% 70%,#173e49,transparent 50%),#101626;isolation:isolate}.memory-space>canvas,.memory-space>svg{position:absolute;inset:0;width:100%;height:100%}.memory-edge{stroke:#aab7ed80;stroke-width:1.3;fill:none;vector-effect:non-scaling-stroke;transition:stroke .2s}.memory-edge.is-related{stroke:#d4cbff;stroke-width:2.2;stroke-dasharray:6 5;animation:memory-flow 5s linear infinite}.memory-star{cursor:grab;outline:none;--star-color:#ab9bff}.memory-star-halo{fill:var(--star-color);opacity:.12}.memory-star-core{fill:var(--star-color);filter:drop-shadow(0 0 7px var(--star-color))}.memory-star text{font:14px system-ui,sans-serif;fill:#eff1ff;pointer-events:none;paint-order:stroke;stroke:#12172e;stroke-width:4px;stroke-linejoin:round}.memory-star .memory-star-date{font-size:11px;fill:#aebbd6}.memory-star:focus .memory-star-halo,.memory-star.is-selected .memory-star-halo{opacity:.4;stroke:var(--star-color);stroke-width:1}.memory-star.is-related .memory-star-core{filter:drop-shadow(0 0 12px var(--star-color))}.memory-empty{position:absolute;inset:50% 10% auto;transform:translateY(-50%);text-align:center;color:#d8def6;pointer-events:none}.memory-empty strong{font-size:22px}.memory-zoom{position:absolute;right:14px;bottom:14px;display:flex;gap:8px}.memory-zoom button{min-width:44px;min-height:44px;background:#222d48;color:#eef1ff;border:1px solid #c1c8ff50}.memory-dialog{width:min(680px,calc(100% - 28px));max-height:calc(100dvh - 40px);box-sizing:border-box;overflow:auto;padding:24px;border-radius:24px;border:1px solid var(--line,#7d83aa60);background:var(--panel,#1c2436);color:var(--text,#eff1ff);box-shadow:0 24px 80px #0008}.memory-dialog::backdrop{background:#070c1ac9;backdrop-filter:blur(7px)}.memory-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.memory-dialog-head h3{margin:0;overflow-wrap:anywhere}.memory-close{min-width:44px;min-height:44px;font-size:25px}.memory-form{display:grid;gap:16px;margin-top:20px}.memory-field{display:grid;gap:7px}.memory-field input,.memory-field textarea,.memory-field select,.memory-dialog input[type=search],.memory-related-row>input{box-sizing:border-box;width:100%;min-width:0;padding:12px;border:1px solid var(--line,#75819a60);border-radius:12px;font:inherit;background:var(--input-bg,#ffffff0b);color:inherit}.memory-field input[type=color]{height:44px;padding:4px}.memory-description{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.memory-related-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0}.memory-related-row>button:first-child{flex:1;text-align:left;overflow-wrap:anywhere}.memory-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.memory-picker-card{display:grid;grid-template-columns:22px 1fr;gap:8px;align-content:start;border:1px solid var(--line,#8290aa60);border-radius:16px;padding:16px;min-height:88px;overflow-wrap:anywhere}.memory-picker-card small{grid-column:2}.memory-picker-card:has(input:checked){border-color:#b8a7ff;background:#a994ff18}.memory-picker-pager{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:14px 0}.memory-dialog button{min-height:44px}.memory-dialog .danger{color:#ffb5bd}.memory-dialog p[role=alert]{color:#ffb5bd;margin:0}.memory-dialog input:focus-visible,.memory-dialog textarea:focus-visible,.memory-dialog button:focus-visible{outline:2px solid #baa8ff;outline-offset:2px}@keyframes memory-flow{to{stroke-dashoffset:-44}}@media(max-width:560px){.memory-space{height:65dvh;min-height:430px;border-radius:18px}.memory-dialog{padding:18px}.memory-actions{gap:8px}.memory-heading>.memory-actions{width:100%}.memory-picker-grid{gap:8px}.memory-picker-card{padding:10px}.memory-picker-pager{font-size:12px}}@media(prefers-reduced-motion:reduce){.memory-edge.is-related{animation:none}.memory-edge{transition:none}}

:is(.memory-page,.memory-dialog) .btn{border:1px solid var(--line,#8190ac55);background:var(--card,#ffffff0a);color:inherit;padding:11px 16px;border-radius:13px;font:inherit;font-size:14px;cursor:pointer;min-height:44px;transition:background .2s,transform .2s}:is(.memory-page,.memory-dialog) .btn:hover{background:#a8b7ff20}:is(.memory-page,.memory-dialog) .btn.primary{background:var(--accent,#a2baff);border-color:transparent;color:#14213a;font-weight:650}:is(.memory-page,.memory-dialog) .btn:disabled{opacity:.45;cursor:default}

.memory-search{width:min(100%,450px);box-sizing:border-box;margin-top:18px;padding:12px 16px;border:1px solid var(--line,#8290ac55);border-radius:13px;background:var(--panel,#ffffff0a);color:inherit;font:inherit}.memory-search-results{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:10px}.memory-search-results:empty{display:none}

.memory-space .has-selection .memory-star:not(.is-related){opacity:.48}.memory-star{transition:opacity .2s}@media(prefers-reduced-motion:reduce){.memory-star{transition:none}:is(.memory-page,.memory-dialog) .btn{transition:none}}

.memory-space{background:transparent}
.memory-space::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 30% 35%,#27264c,transparent 55%),radial-gradient(ellipse at 80% 70%,#173e49,transparent 50%),#101626;opacity:var(--memory-background-opacity,1);transition:opacity .2s}
.memory-space[data-memory-theme=midnight]::before{background:radial-gradient(ellipse at 50% 20%,#1e2852,transparent 70%),#080b18}
.memory-space[data-memory-theme=aurora]::before{background:radial-gradient(ellipse at 20% 20%,#1d665a,transparent 60%),radial-gradient(ellipse at 80% 70%,#513b75,transparent 60%),#091a21}
.memory-space[data-memory-theme=image]::before{background-image:linear-gradient(#070b1830,#070b1880),var(--memory-background-image);background-position:center;background-size:cover}
.memory-tools{position:absolute;right:8px;top:8px;width:200px;height:200px;pointer-events:none;z-index:2}
.memory-tools::before{content:"";position:absolute;inset:20px;border:1px solid #c5b9f326;border-radius:50%;background:radial-gradient(circle,#b8a0ff0d,transparent 70%);opacity:0;transform:scale(.8);transition:opacity .22s,transform .22s}
.memory-tools .btn{position:absolute;left:76px;top:76px;width:48px;height:48px;min-width:48px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid #c1b9e14a;background:linear-gradient(145deg,#252d42f5,#121a2bf5);color:#e5dfff;box-shadow:0 8px 24px #05081580,inset 0 1px 0 #ffffff0d;pointer-events:auto}
.memory-tools .btn svg{display:block;flex:none;width:24px;height:24px;pointer-events:none}
.memory-tools .memory-tools-hub{left:72px;top:72px;width:56px;height:56px;background:linear-gradient(145deg,#403859,#24223b);border-color:#c3b4ff73;z-index:2;box-shadow:0 8px 28px #05081580,0 0 0 5px #b6a4ed09}
.memory-tools .memory-tools-hub svg{width:27px;height:27px}
.memory-tools .memory-tool{opacity:0;visibility:hidden;transform:translate(0,0) scale(.6);transition:transform .32s cubic-bezier(.2,.7,.2,1),opacity .32s ease,visibility .32s}
.memory-tools:is(.is-open,:has(:focus-visible))::before{opacity:1;transform:scale(1)}
.memory-tools:is(.is-open,:has(:focus-visible)) .memory-tool{opacity:1;visibility:visible;transform:translate(var(--tool-x),var(--tool-y)) scale(1)}
.memory-page .memory-tools .memory-tool,.memory-page .memory-tools .memory-tool:is(:hover,:focus-visible){background:transparent;border-color:transparent;box-shadow:none}
.memory-tools .btn:focus-visible{outline:2px solid #d0c1ff;outline-offset:4px}
@media(hover:hover){.memory-tools:hover::before{opacity:1;transform:scale(1)}.memory-tools:hover .memory-tool{opacity:1;visibility:visible;transform:translate(var(--tool-x),var(--tool-y)) scale(1)}.memory-tools .btn:hover{background:linear-gradient(145deg,#3a3b58,#22283e);border-color:#d2c5ff9c}}
.memory-star .memory-star-icon{font-size:25px;stroke-width:1px;fill:var(--star-color)}
.memory-space:fullscreen,.memory-space.is-fullscreen{width:100vw;height:100dvh!important;max-height:none;min-height:0;border:0;border-radius:0;background:#080b18}
.memory-space.is-fullscreen{position:fixed;inset:0;z-index:9999}.memory-fullscreen-open{overflow:hidden}
@media(prefers-reduced-motion:reduce){.memory-tools .memory-tool,.memory-space::before{transition:none}}

.memory-node-menu{position:fixed;z-index:12000;min-width:168px;display:grid;gap:4px;padding:6px;background:#171d2bef;color:#efedf7;border:1px solid #b8a8e64d;border-radius:14px;box-shadow:0 12px 40px #0008;backdrop-filter:blur(12px)}
.memory-node-menu button{min-height:42px;border:0;border-radius:9px;background:transparent;padding:9px 14px;text-align:left;color:inherit;font:inherit;cursor:pointer}.memory-node-menu button:hover,.memory-node-menu button:focus-visible{background:#ac97ec25;outline:none}.memory-node-menu button.danger{color:#ffb7c2}

/* Memory has its own sky; the dashboard illustration stays outside this section. */
.main[data-active-page="memory"]::before,.main[data-active-page="memory"]::after{display:none!important}
.memory-dialog{border:1px solid #b9b1dc55;background:#151b29;color:#eef0fa}
.memory-dialog-head{padding-bottom:16px;border-bottom:1px solid #b9b1dc26}
.memory-dialog-head h3{flex:1;text-align:center;padding-left:44px}
.memory-dialog :is(.memory-form,.memory-picker-grid){padding:14px;border:1px solid #b9b1dc28;border-radius:16px}
body[data-theme] dialog.memory-dialog :is(input,textarea,select){background:#0d1320;color:#eef0fa;border:1px solid #b9b1dc38;color-scheme:dark}
.memory-dialog select option{background:#0d1320;color:#eef0fa}
body[data-theme] dialog.memory-dialog input:disabled{opacity:1;color:#cbd3e7;-webkit-text-fill-color:#cbd3e7}
.memory-dialog .memory-picker-card{background:#101725}
.memory-dialog .memory-related-row>button:first-child{text-align:center}
:is(.memory-page,.memory-dialog) .btn{text-align:center;line-height:1.25}
.memory-tools .btn{display:flex;align-items:center;justify-content:center;line-height:1;padding:0;text-align:center}
.memory-zoom .btn{display:grid;place-items:center;padding:10px;min-width:44px;font-size:20px}

/* Matching surfaces and spacing inside the map tools. */
.memory-dialog{padding:26px;border-color:#b9b1dc45;background:linear-gradient(155deg,#1c2232,#111724 78%);box-shadow:0 30px 90px #03071399,inset 0 1px 0 #ffffff09}
.memory-dialog-head{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;padding-bottom:18px;border-color:#b9b1dc24}
.memory-dialog-head h3{grid-column:2;padding:0;text-align:center;font-size:21px;font-weight:650;line-height:1.35;letter-spacing:-.02em}
.memory-dialog-head .memory-close{grid-column:3;width:44px;height:44px;padding:0;border-radius:50%;border-color:#b9b1dc2b;background:#b9b1dc0b;color:#d4cee7;font-size:25px;line-height:1}
.memory-dialog .memory-form{padding:18px;gap:16px;background:#0b122044;border-color:#b9b1dc28;border-radius:18px}
.memory-dialog .memory-field>span{color:#b9c4db;font-size:13px;font-weight:550;line-height:1.4}
.memory-dialog .memory-field textarea{resize:vertical;min-height:110px;line-height:1.6}
.memory-dialog .memory-field :is(input,select,textarea){min-height:46px;border-radius:12px}
.memory-dialog .memory-field :is(input,select,textarea):focus-visible{outline:2px solid #bea9f0;outline-offset:2px}
.memory-dialog .btn{min-height:44px;border-color:#b9b1dc3d;background:#b9b1dc0c;color:#e8e5f4;font-weight:500}
.memory-dialog .btn.primary{background:#c1b3f1;border-color:#d2c5ff77;color:#211a36;font-weight:650;box-shadow:0 5px 18px #b09ae014}
.memory-dialog .btn.danger{color:#ffb5c1;border-color:#e28b9a42;background:#d7728910}
.memory-dialog>.btn{margin:8px 8px 0 0}
.memory-dialog .memory-event-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.memory-event-form>[data-memory-field=title],.memory-event-form>[data-memory-field=description],.memory-event-form>[data-memory-field=icon],.memory-event-form>:not(.memory-field){grid-column:1/-1}
.memory-dialog .memory-type-list{display:grid;gap:10px;margin:20px 0}
.memory-dialog .memory-type-row{display:grid;grid-template-columns:12px minmax(0,1fr);gap:12px;margin:0;padding:12px;border:1px solid #b9b1dc28;border-radius:14px;background:#0d1524a6}
.memory-type-dot{width:10px;height:10px;justify-self:center;border-radius:50%;box-shadow:0 0 0 4px #ffffff05}
body[data-theme] dialog.memory-dialog .memory-type-row>input:disabled{border:0;background:transparent;padding:6px 0;font-weight:500}
.memory-type-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.memory-type-actions .btn{font-size:13px;padding:9px}
.memory-dialog .memory-picker-card{border-radius:14px;border-color:#b9b1dc2b;line-height:1.45}
.memory-dialog .muted{color:#aab7d0;font-size:13px;line-height:1.6}
body[data-theme] dialog.memory-dialog input[type=range]{padding:8px 0;min-height:32px;background:transparent;border:0;accent-color:#c1b3f1}
.memory-form output{justify-self:end;margin-top:-8px;padding:5px 12px;border:1px solid #b9b1dc26;border-radius:20px;background:#b9b1dc0b;color:#d4c7ff;font-variant-numeric:tabular-nums;font-size:13px}
.memory-field input[type=file]::file-selector-button{margin-right:12px;border:1px solid #b9b1dc35;border-radius:8px;background:#b9b1dc16;color:#e8e5f4;padding:8px 10px;font:inherit;cursor:pointer}
@media(max-width:560px){.memory-dialog{padding:18px}.memory-dialog .memory-form{padding:14px}.memory-dialog-head h3{font-size:19px}.memory-dialog .memory-event-form{grid-template-columns:minmax(0,1fr);column-gap:12px}.memory-type-actions .btn{font-size:12px}}
@media(prefers-reduced-motion:reduce){.memory-tools::before,.memory-tools .btn{transition:none}}

.memory-confirm>p{text-align:center;line-height:1.6}.memory-confirm-actions{display:flex;justify-content:center;align-items:center;gap:18px;flex-wrap:wrap;margin-top:24px}.memory-confirm-actions .btn{min-width:110px;text-align:center;justify-content:center}
@media(min-width:620px){.memory-type-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}

@media(max-width:760px){.memory-search{display:block;margin-inline:auto;text-align:center}.memory-search-results{justify-content:center}.memory-picker input[type=search],.memory-dialog input[type=search]{text-align:center}}
.memory-dialog{text-align:center}
.memory-dialog-head{position:relative;justify-content:center;padding-inline:44px;min-height:44px}
.memory-dialog-head h3{width:100%;text-align:center}
@media(max-width:760px){.memory-heading.section-head--page{justify-content:center;text-align:center}.memory-heading.section-head--page>div{width:100%;min-width:0}.memory-heading.section-head--page h2{overflow-wrap:anywhere}}
.memory-dialog-head .memory-close{position:absolute;right:0;top:0}
.memory-dialog :is(.memory-actions,.memory-related-row){justify-content:center}
.memory-dialog .memory-related-row>button:first-child{text-align:center}
.memory-page .memory-status:empty{display:none}
.memory-page .memory-status:not(:empty){margin-block:8px;min-height:0}
.memory-page .memory-space{box-sizing:border-box;height:clamp(500px,75vh,900px);margin-top:12px}
@media(max-width:560px){.memory-page .memory-space{height:70dvh;min-height:470px}}
.memory-page .memory-space:is(:fullscreen,.is-fullscreen){margin-top:0;min-height:0}


.memory-heading.section-head--page{justify-content:center;text-align:center}.memory-heading.section-head--page>div{width:100%;min-width:0;text-align:center}.memory-heading.section-head--page :is(.eyebrow,h2,p){text-align:center;margin-inline:auto}

.memory-page>.memory-heading.section-head.section-head--page{display:block;width:100%;text-align:center}.memory-page>.memory-heading.section-head.section-head--page>div{width:100%;text-align:center}.memory-page>.memory-heading.section-head.section-head--page h2{text-align:center}

.memory-space{user-select:none;-webkit-user-select:none}
.memory-space .memory-star-halo{fill:transparent;pointer-events:all}
.memory-star-image{pointer-events:none;transform-box:fill-box;transform-origin:center}
.memory-star-icon{transform-box:fill-box;transform-origin:center}
.memory-page[data-memory-active=true] .memory-star:is(.is-selected,:hover,:focus-visible) :is(.memory-star-icon,.memory-star-image){animation:memoryIconLife 3.2s ease-in-out infinite}
.memory-page[data-memory-dragging=true] .memory-star :is(.memory-star-icon,.memory-star-image){animation-play-state:paused}
@keyframes memoryIconLife{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-2px) rotate(2deg)}}
.memory-icon-picker{display:grid;gap:12px;grid-column:1/-1;min-width:0;padding-block:8px}
.memory-icon-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.memory-icon-picker .memory-icon-choice{display:grid;place-items:center;min-width:0;padding:4px;background:transparent;box-shadow:none;border-color:transparent}
.memory-icon-choice img{display:block;max-width:100%;height:48px;object-fit:contain;pointer-events:none}
.memory-icon-picker .memory-icon-choice[aria-pressed=true]{border-color:#baa8ff}
.memory-icon-preview{justify-self:center;width:72px;height:72px;object-fit:contain}
.memory-icon-preview[hidden]{display:none}
.memory-icon-picker input[type=file]{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
@media(hover:hover){.memory-icon-choice:hover img{animation:memoryIconLife 2s ease-in-out infinite}}
@media(prefers-reduced-motion:reduce){.memory-star-icon,.memory-star-image,.memory-icon-choice img{animation:none!important}}
