:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --border: #e6e3dd;
  --text: #2a2a28;
  --muted: #8b8880;
  --accent: #7c5cff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-size: 16px;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.title {
  margin: 0 0 24px;
  font-weight: 700;
  font-size: 1.8rem;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}

.note-input {
  flex: 1;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  resize: vertical;
  min-height: 48px;
}
.note-input:focus { border-color: var(--accent); }
.note-input::placeholder { color: var(--muted); }

.add-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  padding: 0 22px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.add-btn:hover:not(:disabled) { opacity: 0.9; }
.add-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.search {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  margin-bottom: 20px;
}
.search:focus { border-color: var(--accent); }
.search::placeholder { color: var(--muted); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.item-text {
  flex: 1;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.del-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  line-height: 1;
  font-size: 1.3rem;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.del-btn:hover { color: #e0405a; background: #f5eaec; }

.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.85rem;
}
.footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--muted);
}
.footer a:hover { color: var(--text); }