.memory-section { padding: 0 !important; overflow: hidden; }
.memory-root { min-height: min(760px, calc(100vh - 150px)); color: var(--text); }
.memory-entrance, .memory-cover { width: 100%; min-height: inherit; }
.memory-cover { position: relative; display: block; padding: 0; overflow: hidden; border: 0; border-radius: 28px; background: #07172b; cursor: pointer; }
.memory-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.memory-cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,12,25,.02) 45%, rgba(3,12,25,.82)); }
.memory-cover-title { position: absolute; right: clamp(24px,5vw,72px); bottom: clamp(28px,7vw,76px); color: #fff; font: 750 clamp(32px,5vw,68px)/1.05 Georgia,serif; letter-spacing: -.035em; text-shadow: 0 8px 30px rgba(0,0,0,.4); }
.memory-app { min-height: inherit; padding: clamp(18px,3vw,34px); color:#eef6ff; background:radial-gradient(circle at 85% 0,rgba(79,70,229,.20),transparent 34%),linear-gradient(145deg,#07172b,#0c213d 68%,#0b1c34); border-radius: 28px; }
.memory-app-header { position:sticky; top:76px; z-index:8; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 16px; align-items: start; padding:12px; margin:-12px -12px 0; border-radius:18px; background:rgba(7,23,43,.94); backdrop-filter:blur(14px); }
.memory-app-header h2 { margin: 2px 0 4px; color:#fff; font-size: clamp(25px,3vw,38px); }.memory-app-header p{margin:0;color:#b5c8dd}
.memory-eyebrow { color: #8eb9ff; font-size: 12px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.memory-back,.memory-primary,.memory-action-button,.memory-export button,.memory-modal button,.memory-card { font: inherit; }
.memory-back { width: 42px; height: 42px; border: 1px solid rgba(142,185,255,.26); border-radius: 14px; background:rgba(14,39,70,.92); color:#dcecff; font-size: 20px; }
.memory-primary { min-height: 42px; padding: 0 16px; border: 0; border-radius: 14px; background: linear-gradient(145deg,var(--blue),#3b82f6); color:#fff; font-weight:850; box-shadow:var(--shadow-blue); }
.memory-status { min-height: 20px; margin: 12px 0 0; color:#9fc6ff; font-size:13px; font-weight:700; }.memory-status.error{color:#ffaaa3}
.memory-owner { margin-top: 8px; color:#a9bdd5; }
.memory-hub { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:24px; }
.memory-card { min-height: 128px; padding: 18px; text-align:left; border:1px solid rgba(142,185,255,.20); border-radius:20px; background:rgba(12,35,64,.86); color:#eef6ff; box-shadow:0 14px 32px rgba(0,0,0,.16); cursor:pointer; transition:.18s ease; }
.memory-card:hover,.memory-card:focus-visible { transform:translateY(-2px); border-color:rgba(37,99,235,.42); box-shadow:0 18px 34px rgba(37,99,235,.12); outline:3px solid var(--ring); }
.memory-card span { display:block; color:#82b0ff; font-size:24px; margin-bottom:14px }.memory-card strong{display:block;font-size:15px}.memory-card small{display:block;margin-top:6px;color:#a9bdd5;line-height:1.35}
.memory-browser,.memory-special{margin-top:22px}.memory-toolbar{align-items:flex-start}.memory-controls{flex:1}.memory-control{min-width:150px}.memory-control[type=search]{flex:1;min-width:220px;width:auto}
.memory-export{display:flex;flex-wrap:wrap;gap:7px}.memory-export button,.memory-action-button,.memory-modal button{min-height:38px;padding:0 12px;border:1px solid rgba(142,185,255,.24);border-radius:12px;background:#102c50;color:#dcecff;font-weight:800}
.memory-app .memory-toolbar,.memory-app .memory-item,.memory-app .memory-empty,.memory-special-card{border-color:rgba(142,185,255,.20);background:rgba(9,29,54,.86);box-shadow:0 14px 32px rgba(0,0,0,.14)}
.memory-app .memory-control{border-color:rgba(142,185,255,.24);background:#0e294a;color:#eef6ff}.memory-app .memory-control::placeholder{color:#8ea5bf}
.memory-app .memory-item h3,.memory-app .memory-item p,.memory-special-card h3{color:#eef6ff}.memory-app .memory-meta span{border-color:rgba(142,185,255,.18);background:rgba(49,91,145,.28);color:#b9cde3}.memory-app .memory-empty,.memory-special-card p{color:#a9bdd5}
.memory-item { position:relative; }.memory-item h3{margin:0;font-size:16px}.memory-item p{margin:7px 0 0;color:var(--text);white-space:pre-wrap;line-height:1.5}.memory-item .memory-actions{align-self:center}
.memory-request-grid,.memory-settings-grid{display:grid;gap:14px}.memory-special-card{padding:18px;border:1px solid rgba(142,185,255,.20);border-radius:18px}.memory-special-card h3{margin:0 0 8px}.memory-special-card p{line-height:1.5}.memory-levels{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.memory-levels button.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.memory-modal { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:20px; background:rgba(3,12,25,.68); overflow:auto }.memory-modal[hidden]{display:none}
.memory-modal-card{width:min(680px,100%);max-height:calc(100vh - 40px);overflow:auto;padding:24px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:0 30px 90px rgba(0,0,0,.28)}.memory-modal-card h3{margin:0;font-size:24px}.memory-modal-card>p{color:var(--muted)}
.memory-modal-card label,.memory-modal-card fieldset{display:grid;gap:7px;margin-top:15px;color:var(--text);font-weight:750}.memory-modal-card input:not([type=checkbox]),.memory-modal-card textarea,.memory-modal-card select{width:100%;min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);color:var(--text);font:inherit}.memory-modal-card textarea{resize:vertical}
.memory-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.memory-modal-card fieldset{border:1px solid var(--line);border-radius:14px;padding:12px}.memory-module-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.memory-module-grid label,.memory-review,.memory-health-consent{display:flex!important;align-items:flex-start;gap:8px!important;font-weight:650!important}
.memory-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.memory-danger{background:#b42318!important;color:#fff!important;border-color:#b42318!important}.memory-danger-card{border-color:#f3b7b3}
@media(max-width:900px){.memory-hub{grid-template-columns:repeat(2,minmax(0,1fr))}.memory-levels{grid-template-columns:1fr 1fr}.memory-toolbar{display:grid}.memory-export{width:100%}}
@media(max-width:600px){.memory-root{min-height:calc(100dvh - 120px)}.memory-cover{border-radius:20px}.memory-cover img{object-position:36% center}.memory-cover-title{right:20px;bottom:28px}.memory-app{padding:16px;border-radius:20px}.memory-app-header{grid-template-columns:auto minmax(0,1fr)}.memory-app-header>.memory-primary{grid-column:1/-1;width:100%}.memory-hub{grid-template-columns:1fr;gap:10px}.memory-card{min-height:92px}.memory-controls{display:grid;width:100%}.memory-control,.memory-control[type=search]{width:100%;min-width:0}.memory-form-grid,.memory-module-grid{grid-template-columns:1fr}.memory-item{grid-template-columns:1fr}.memory-actions{justify-content:flex-start}.memory-modal{padding:8px}.memory-modal-card{max-height:calc(100dvh - 16px);padding:18px;border-radius:18px}.memory-modal-actions{position:sticky;bottom:-18px;padding:12px 0 18px;background:var(--surface)}}
.profile-memory-host .memory-app{border:1px solid rgba(142,185,255,.18);border-radius:22px}.profile-memory-host .memory-app-header{top:var(--profile-global-chrome-height)}.profile-memory-host .memory-modal-card{border-color:#294964;background:#091727;color:#eef6ff}.profile-memory-host .memory-modal-card>p{color:#a9bdd5}.profile-memory-host .memory-modal-card label,.profile-memory-host .memory-modal-card fieldset{color:#dcecff}.profile-memory-host .memory-modal-card input:not([type=checkbox]),.profile-memory-host .memory-modal-card textarea,.profile-memory-host .memory-modal-card select{border-color:#36536d;background:#071522;color:#fff}.profile-memory-host .memory-danger-card{border-color:#7d3f52}
.profile-memory-host .memory-primary,.profile-memory-host .memory-action-button,.profile-memory-host .memory-export button,.profile-memory-host .memory-modal button,.profile-memory-host .memory-card{width:auto;height:auto;line-height:1.35}@media(max-width:600px){.profile-memory-host .memory-app-header>.memory-primary{width:100%}}
@media(max-width:600px){.profile-memory-host .memory-export{display:grid;grid-template-columns:1fr 1fr}.profile-memory-host .memory-export button{height:auto;min-height:48px;line-height:1.2}}
