body.pm-lock { overflow: hidden; }
#personal-memory-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: stretch; justify-content: flex-end; font-family: inherit; }
#personal-memory-modal.pm-hidden { display: none; }
.pm-backdrop { position: absolute; inset: 0; border: 0; background: rgba(15, 23, 42, .48); backdrop-filter: blur(3px); cursor: default; }
.pm-panel { position: relative; width: min(620px, 100%); height: 100%; overflow: hidden; display: flex; flex-direction: column; background: #f8fafc; box-shadow: -20px 0 60px rgba(15, 23, 42, .18); animation: pm-in .2s ease-out; }
@keyframes pm-in { from { transform: translateX(28px); opacity: .7; } to { transform: none; opacity: 1; } }
.pm-header { display: flex; justify-content: space-between; gap: 24px; padding: 28px 28px 22px; color: white; background: linear-gradient(135deg, #0f172a, #162b46); }
.pm-eyebrow { margin: 0 0 7px; color: #67e8f9; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.pm-header h2 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; }
.pm-subtitle { margin: 8px 0 0; color: #cbd5e1; font-size: 13px; line-height: 1.6; }
.pm-icon-button { flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: white; background: rgba(255,255,255,.08); cursor: pointer; }
.pm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #e2e8f0; background: white; }
#pm-count { color: #64748b; font-size: 13px; }
.pm-actions { display: flex; gap: 8px; }
.pm-actions button, .pm-note-actions button { border-radius: 9px; padding: 8px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s ease; }
.pm-secondary, .pm-note-actions button { border: 1px solid #dbe3ee; color: #475569; background: white; }
.pm-primary { border: 1px solid #0f172a; color: white; background: #0f172a; }
.pm-actions button:hover, .pm-note-actions button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.pm-status { margin: 14px 24px 0; border-radius: 10px; padding: 10px 12px; color: #475569; background: #e2e8f0; font-size: 12px; }
.pm-status.pm-error { color: #b91c1c; background: #fee2e2; }
.pm-status.pm-success { color: #047857; background: #d1fae5; }
.pm-status.pm-hidden { display: none; }
.pm-list { flex: 1; overflow-y: auto; padding: 18px 24px 28px; }
.pm-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 16px; background: white; box-shadow: 0 2px 8px rgba(15,23,42,.035); }
.pm-note-main { min-width: 0; flex: 1; }
.pm-note time { color: #94a3b8; font-size: 11px; }
.pm-note h3 { margin: 5px 0 8px; color: #0f172a; font-size: 15px; line-height: 1.45; }
.pm-note p { margin: 0; color: #64748b; font-size: 12px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pm-note-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; }
.pm-note-actions .pm-danger { color: #dc2626; }
.pm-empty { padding: 80px 20px; text-align: center; color: #64748b; }
.pm-empty span { display: block; margin-bottom: 12px; font-size: 36px; }
.pm-empty strong { display: block; color: #334155; font-size: 15px; }
.pm-empty p { margin: 8px auto 0; max-width: 320px; font-size: 12px; line-height: 1.7; }
@media (max-width: 640px) {
  .pm-header { padding: 22px 18px 18px; }
  .pm-toolbar { align-items: flex-start; padding: 14px 16px; }
  .pm-actions { flex-wrap: wrap; justify-content: flex-end; }
  .pm-list { padding: 14px 14px 24px; }
  .pm-note { display: block; }
  .pm-note-actions { flex-direction: row; margin-top: 14px; }
}
