:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e38;
  --text: #e6e8ee;
  --muted: #9aa1ae;
  --accent: #6ea8fe;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  justify-content: center;
}

main {
  width: 100%;
  max-width: 720px;
  padding: 2.5rem 1.5rem;
}

h1 { font-size: 1.4rem; margin-bottom: 1.5rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0.25rem; }

input, textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  background: #0d0f14;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
}

textarea { min-height: 90px; resize: vertical; }

button {
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #0d0f14;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

button:hover { opacity: 0.9; }

a { color: var(--accent); }

.error { color: #ff8a8a; font-size: 0.9rem; margin-top: 0.5rem; min-height: 1.2em; }

.memory-item {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.memory-item:last-child { border-bottom: none; }
.memory-item .meta { color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; }
.memory-item button { margin-top: 0.4rem; padding: 0.3rem 0.6rem; font-size: 0.8rem; background: transparent; border: 1px solid var(--border); color: var(--muted); }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.topbar button { margin-top: 0; background: transparent; border: 1px solid var(--border); color: var(--muted); }
